Replies: 1 comment
-
Resolved on issue #3829. (The two cases should now behave the same way and allocate set 0.) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, it seems that changing a parameter block from being global to being passed as an argument to the entry-point changes its binding from set 0 to set 1. Since there are no other bindings this seems like unexpected behaviour, but I am not sure, so I thought I would ask as a question here.
I used the following shader to reproduce this with the latest release (v2024.1.2):
Compiled with
slangc repro.slang -o test.glsl -entry main
this produces the expected binding (implicitly in set 0) in its output:If I change the shader to avoid declaring the parameter block globally:
Then the binding in the output changes to descriptor set 1:
My question is: is this expected behaviour? It would be useful to pass parameters blocks via the entry-point for files that contain multiple entry-points, but I would have expected these two cases to generate the same bindings.
(Interestingly if I just use the Sampler2D type directly, without wrapping in a parameter block, then globals and entry-point parameters do behave the same way and put the binding in set 0 for both cases.)
Beta Was this translation helpful? Give feedback.
All reactions