BredaUniversityGames / DXX-Raytracer

DXX Raytracer is a fork of the DXX Retro project for Windows. DXX Raytracer uses modern raytracing techniques to update the graphics of the beloved retro game known as Descent.
Other
216 stars 10 forks source link

Fix crash for loading into a level #10

Closed Contingencyy closed 7 months ago

Contingencyy commented 7 months ago

The program crashes with DEVICE LOST (GPU device hung) inside the indirect_lighting.hlsl shader. For some reason the tracing of rays inside that shader broke, which is very odd because the shader table for the previous two shaders were valid. Will investigate further and hopefully find a fix.

Contingencyy commented 7 months ago

Related to #8

Contingencyy commented 7 months ago

Fixed! NVIDIA drivers seem to have changed its implementation of how shader identifiers are being generated in raytracing pipelines, which led to the identifiers being DIFFERENT between the primary/direct lighting pipelines and the indirect pipeline. This meant that the miss shader records and hitgroup shader records were using the correct shader identifiers for the first two pipelines, but the indirect pipeline expected a different identifier in those records, therefore not being able to call the right shaders.

As the DXR spec states: "An application might create the same shader multiple times. This could be the same code but with same or different export names, potentially across separate raytracing pipelines or collections of code. In this case the seemingly identical shaders may or may not return the same identifier depending on the implementation. Regardless, execution behavior will be consistent with the specified shader code."