From 999d4fdcddd3a0ca995a5aff5297831b8f5c4b06 Mon Sep 17 00:00:00 2001 From: alelenv <40001162+alelenv@users.noreply.github.com> Date: Mon, 1 Jun 2020 23:24:41 -0700 Subject: [PATCH] Add default descriptorset decoration for acceleration structure (#2257) variables. --- SPIRV/GlslangToSpv.cpp | 3 ++- Test/spv.ext.RayGenShader.rgen | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index e41bb5de..92cce814 100644 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -1292,7 +1292,8 @@ bool IsDescriptorResource(const glslang::TType& type) // basically samplerXXX/subpass/sampler/texture are all included // if they are the global-scope-class, not the function parameter // (or local, if they ever exist) class. - if (type.getBasicType() == glslang::EbtSampler) + if (type.getBasicType() == glslang::EbtSampler || + type.getBasicType() == glslang::EbtAccStruct) return type.getQualifier().isUniformOrBuffer(); // None of the above. diff --git a/Test/spv.ext.RayGenShader.rgen b/Test/spv.ext.RayGenShader.rgen index 27d450fb..9fedf3a5 100644 --- a/Test/spv.ext.RayGenShader.rgen +++ b/Test/spv.ext.RayGenShader.rgen @@ -1,7 +1,7 @@ #version 460 #extension GL_EXT_ray_tracing : enable #extension GL_EXT_ray_flags_primitive_culling : enable -layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT0; +layout(binding = 0) uniform accelerationStructureEXT accEXT0; layout(binding = 1, set = 0) uniform accelerationStructureEXT accEXT1; // Unused layout(binding = 2, r32ui) shadercallcoherent uniform uimage2D imageu; layout(location = 0) rayPayloadEXT vec4 payload;