File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -857,10 +857,14 @@ ShaderGroup::generate_optix_cache_key(string_view code)
857857 safegroup = Strutil::replace (name (), " /" , " _" , true );
858858 safegroup = Strutil::replace (safegroup, " :" , " _" , true );
859859
860- // Cache key includes the groupname in addition to the serialized IR.
861- // This is because the groupname makes its way into the ptx's direct callable name,
862- // but isn't included in the serialization.
863- std::string cache_key = fmtformat (" cache-osl-ptx-{}-{}" , safegroup, ir_key);
860+ ShaderInstance* inst = layer (nlayers () - 1 );
861+ ustring layername = inst->layername ();
862+
863+ // Cache key includes group and entry layer names in addition to the serialized IR.
864+ // This is because the group and layer names make their way into the ptx's
865+ // direct callable name, but isn't included in the serialization.
866+ std::string cache_key = fmtformat (" cache-osl-ptx-{}-{}-{}" , safegroup,
867+ layername, ir_key);
864868
865869 m_optix_cache_key = cache_key;
866870}
You can’t perform that action at this time.
0 commit comments