Throw an error when using [[vk::binding]]
on global shader parameters
#4251
Labels
goal:client support
Feature or fix needed for a current slang user.
kind:enhancement
a desirable new feature, option, or behavior
Discussed in #4232
Basically, when you write something like this:
The slang compiler ignores the request for the specific descriptor set and binding group and packs all uniforms into one global uniform at descriptor set 0 binding 0. As we discussed in the Discussion Thread, this is intended behavior, but the compiler should warn the user (or, I'd argue, throw a compilation error) that their request was ignored, and maybe include steps on what they need to do to get their desired outcome.
For me, this worked to force slang to abide by my
[[vk::binding]]
directives, but I don't know if it's the optimal solution:I would also suggest updating the example in the user's guide, as it does not do what the guide suggests it does.
The text was updated successfully, but these errors were encountered: