summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2021-03-16 15:27:34 -0700
committerGitHub <noreply@github.com>2021-03-16 15:27:34 -0700
commitb64a23cccfe9876d53cda773afc796bd975fa7e5 (patch)
treef4533f6d24f6a9cb7cb503b5426b0ab1196128f5 /source
parent210a9889ae35ac61a7f33a758e08fb51d46395e7 (diff)
Fix the "acceleration structure in compute" bug for GL_NV_ray_tracing too (#1759)
A recent change broke code that uses `RayTracingAccelerationStructure` in non-RT shader stages for Vulkan/GLSL when also *not* doing any ray tracing in the shader code. A recent fix patched that up for code using `GL_EXT_ray_tracing` and/or `GL_EXT_ray_query`, but that fix didn't apply on the path that uses `GL_NV_ray_tracing` via an opt-in. This change fixes that gap and checks in a test for it.
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-emit-glsl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp
index 86339e94b..a1142749b 100644
--- a/source/slang/slang-emit-glsl.cpp
+++ b/source/slang/slang-emit-glsl.cpp
@@ -1822,6 +1822,7 @@ void GLSLSourceEmitter::emitSimpleTypeImpl(IRType* type)
// We know that the acceleration structure type will translate
// to the one from that extension:
//
+ _requireRayTracing();
m_writer->emit("accelerationStructureNV");
}
else