Is it possible to make a global shader parameter that's a mutable non-array buffer? #5064
Unanswered
KaarelKurik
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This question was prompted by noticing that
wgsl
permits code of the formThe nearest equivalent in Slang that I was able to figure out looks like
which requires indexing into the array introduced by
RWStructuredBuffer
.Examining the spirv produced by
naga
(https://github.com/gfx-rs/naga) with debug symbols for thewgsl
code, we getwhich seems to be a little indirection through a struct (not sure why). By contrast, the spirv produced by
slangc
gives uswhich ends up being another layer of indirection through a runtime array.
Is there currently a way to get something closer to the
wgsl
model in Slang? If not, should there be a way?Beta Was this translation helpful? Give feedback.
All reactions