feat(device): CRAFTER_GRAPHICS_NO_AS_WORKAROUND turns the NVIDIA AS rewrite off
The SPIR-V rewrite for NVIDIA's descriptor-heap acceleration-structure read fault (#7, #15) was keyed on the driver ID alone, so nothing could check whether a newer driver still needs it. With CRAFTER_GRAPHICS_NO_AS_WORKAROUND set, to any value like the other CRAFTER_GRAPHICS_* switches, Device leaves it off. On 615.78.08 it is still needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e5cfbd249c
commit
cb217e22a6
2 changed files with 10 additions and 4 deletions
|
|
@ -1061,9 +1061,12 @@ void Device::Initialize() {
|
||||||
// the heap, so it is off whenever the heap is: otherwise a forced-fallback
|
// the heap, so it is off whenever the heap is: otherwise a forced-fallback
|
||||||
// run on NVIDIA would still rewrite SPIR-V, enable shaderInt64 and push the
|
// run on NVIDIA would still rewrite SPIR-V, enable shaderInt64 and push the
|
||||||
// TLAS address through vkCmdPushDataEXT, none of which a real heap-less
|
// TLAS address through vkCmdPushDataEXT, none of which a real heap-less
|
||||||
// driver does.
|
// driver does. Still needed on 615.78.08. CRAFTER_GRAPHICS_NO_AS_WORKAROUND,
|
||||||
|
// set to any value like the other CRAFTER_GRAPHICS_* switches, turns it off,
|
||||||
|
// which is how a new driver gets checked (tests/HeapASRead --no-workaround).
|
||||||
workaroundDescriptorHeapAS = descriptorHeapSupported
|
workaroundDescriptorHeapAS = descriptorHeapSupported
|
||||||
&& driverProperties.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY;
|
&& driverProperties.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY
|
||||||
|
&& std::getenv("CRAFTER_GRAPHICS_NO_AS_WORKAROUND") == nullptr;
|
||||||
|
|
||||||
// Sanity-gate: GDeflate 1.0 must actually be in the supported method set.
|
// Sanity-gate: GDeflate 1.0 must actually be in the supported method set.
|
||||||
if (memoryDecompressionSupported &&
|
if (memoryDecompressionSupported &&
|
||||||
|
|
|
||||||
|
|
@ -281,8 +281,11 @@ export namespace Crafter {
|
||||||
// VK_ERROR_DEVICE_LOST (a brand-new-extension driver fault, verified
|
// VK_ERROR_DEVICE_LOST (a brand-new-extension driver fault, verified
|
||||||
// engine-clean in #7). When set, VulkanShader rewrites heap AS reads
|
// engine-clean in #7). When set, VulkanShader rewrites heap AS reads
|
||||||
// into a TLAS-device-address + OpConvertUToAccelerationStructureKHR
|
// into a TLAS-device-address + OpConvertUToAccelerationStructureKHR
|
||||||
// path and RTPass pushes the active TLAS address as push data. Delete
|
// path and RTPass pushes the active TLAS address as push data. Still
|
||||||
// this flag and everything keyed on it once a fixed driver ships.
|
// needed on 615.78.08. CRAFTER_GRAPHICS_NO_AS_WORKAROUND, set to any
|
||||||
|
// value, turns it off to check a newer driver (tests/HeapASRead
|
||||||
|
// --no-workaround). Delete this flag and everything keyed on it once a
|
||||||
|
// fixed driver ships.
|
||||||
inline static bool workaroundDescriptorHeapAS = false;
|
inline static bool workaroundDescriptorHeapAS = false;
|
||||||
|
|
||||||
// Count of ERROR-severity validation messages seen by the debug
|
// Count of ERROR-severity validation messages seen by the debug
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue