Open dvicini opened 1 month ago
As a first step, we can at least fix the PTX that is generated to not be invalid: https://github.com/mitsuba-renderer/drjit-core/pull/105
The question remains if there would be some better solution. I.e., somehow updating the SBT the the inner scene refers to?
Hi @dvicini
This has always been awkward and broken. I'm not totally sure what's the best way to fix it, but what seems evident is that it would require some user directives to disambiguate which subset of targets the JIT should be considering. I'll put this on our backlog.
FWIW, in your example, the first scene should be deleted if you delete params
.
We ran into an unexpected issue in a context where different scenes are rendered and there isn't a 100% guarantee that they are not alive at the same time.
Specifically, the following code produces an error:
There are two things that happen with this code. First of all, I get warnings
After that, I get invalid PTX. My guess is that this "disabling" of the ray tracing operation does not quite work as expected:
The problem seems to related to the inner Scene object that is created to evaluate the mesh parameterization of the textured area emitter. I think the problem could be that the virtual call of the textured emitter still uses the SBT & pipeline of the first scene, but is being compiled with the second scene for the second rendering. But i am not 100% sure of this yet.
In summary: 1) the textured emitter of the first scene unintentionally affects ray tracing of the second scene and produces those warnings and 2) the disabling of the ray tracing seems to have a bug itself.
I've also attached the complete PTX output that gets logged.
optix.log