-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Remove warning about unspecified vkbinding #6085
base: master
Are you sure you want to change the base?
Conversation
It is permitted that users omit explicit [vk::binding] settings on HLSL-style register definitions. They are just opting into the default implicit mapping, as they would with HLSL->VK in DXC. That does mean register IDs can clash between resources which have different register type but the same register number. Such a problem can be resolved either with explicit bindings ([vk::binding]) in source, or using the "-fvk-binding" slangc options which match DXC behavior. Closes issue shader-slang#5938
31f8eaa
to
90f8d03
Compare
/format |
🌈 Formatted, please merge the changes from this PR |
{ | ||
// If we warn due to invalid bindings and user did not set how to interpret 'hlsl style | ||
// bindings', we should map `register` 1:1 with equivlent vulkan bindings. | ||
// If the user did not set how to interpret 'hlsl style bindings', we should map |
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.
Instead of removing the warning completely, let's remove the warning only if hlslToVulkanLayoutOptions
is not set or hlslToVulkanLayoutOptions->canInfer(vulkanKind, hlslInfo.space)
is false
, and amend the warning message to ask the user to either use [vk::binding]
or specify -fvk-binding-
options.
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.
Will do
It is permitted that users omit explicit [vk::binding] settings on register definitions of HLSL-style, as they are opting into the default implicit mapping, as with DXC.
That does mean register IDs can clash between resources which have different register type but the same register number. For example:
Such a
problem can be resolved either with explicit bindings in source, or using the "-fvk-binding" slangc options which match DXC behavior.
Closes issue #5938