examples/Sponza does not build natively: glslang rejects the descriptor_heap combined image sampler in closesthit.glsl #164
Labels
No labels
claude:blocked
claude:done
claude:failed
claude:in-progress
claude:ready
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Catcrafts/Crafter.Graphics#164
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
At
2b6f90b,examples/Sponzadoes not build for the native target. The shader compile fails:Every other native example builds. The system
glslangCLI (16.4.0) rejects the file with the same message.Cause
examples/Sponza/closesthit.glsl:18declares a combined image sampler in the heap and samples it at line 25:glslang has refused that since upstream commit
c8253623("Reject descriptor_heap combined image samplers", 2026-06-30). crafter-build links an unpinned glslang, so any crafter-build built after that date fails here. On the reporting machine the last successfulclosesthit.spvdates from 2026-06-16.This is the only such declaration in the repository. The file was last touched in
42a4795(the SPDX update), so the breakage is unrelated to the descriptor-set fallback that landed in48aa9be. Nothing caught it because no check builds the examples, and SponzaBench deliberately avoids the texture sample.Suggested fix
Declare the texture and the sampler separately, as
shaders/ui-shared.glsldoes:A copy of the shader with exactly this change compiles with glslang 16.4.0 and passes
spirv-val. It has not been run.The C++ side in
examples/Sponza/main.cpphas to follow:Initialize(2, 1, 0)at line 80) and needs one;VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and the sampler goes into the sampler heap withvkWriteSamplerDescriptorsEXT, the wayUIRenderer::RegisterSamplerdoes it.Both indices should stay constant (a spec constant or a literal): the README notes that a runtime
descriptor_heapindex inside a hit shader device-losts on the current NVIDIA driver.README.md(the "Native RT limitation" note) andexamples/Sponza/README.mdquote the oldalbedo[albedoSlot]form and need the same update.