-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix combined sampler documentation and warning #6207
Fix combined sampler documentation and warning #6207
Conversation
91f5b68
to
07279aa
Compare
a289315
to
02676d5
Compare
//DIAGNOSTIC_TEST:SIMPLE:-target glsl -profile ps_4_0 -entry main -no-codegen | ||
|
||
// This tests that combined texture sampler objects which have D3D style register assignments, but no vk::binding, show an appropriate | ||
// warning, even in the presence of -fvk-xxx-shift options. Warning should not recommend using -fvk-xxx-shift. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the comment here may need to be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, though I'm not sure if my update meets your expectations. What I said in this version of the comment is what I believe to be correct. Hoping it's just a matter of unclear wording.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, never mind, the comment is correct. I misunderstood it.
…ad of generic '-fvk-xxx-shift'
/format |
🌈 Formatted, please merge the changes from this PR |
This change updates documentation around support for combined texture/samplers
for SPIR-V. The existing text implied that it was correct to use two register assignments
for explicit binding in the SPIR-V docs, but there is actually no way for Slang to derive
one vkbinding from two registers. The warning was misleading.
Related, there is a set of -fvk-xxx-shift options in slangc that do offer a way to specify
mappings from registers to vk bindings, however, they only work for 1:1 situations, not
the 2:1 mapping that comes up with combined texture samplers.
The warning which comes up when a user specifies "register" but not "vkbinding" nor
-vk-xxx-shift, is now updated to add "-vk-xxx-shift" as a suggestion for fixing the problem,
but only for the case of non-combined texture samplers.
Closes Issue #5938