You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardexpand all lines: tests/diagnostics/hlsl-to-vulkan-shift-diagnostic.hlsl.expected
-6
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,5 @@
1
1
result code = -1
2
2
standard error = {
3
-
tests/diagnostics/hlsl-to-vulkan-shift-diagnostic.hlsl(11): warning 39013: shader parameter 'c' has a 'register' specified for D3D, but no '[[vk::binding(...)]]` specified for Vulkan
4
-
ConstantBuffer<Data> c : register(b2);
5
-
^~~~~~~~
6
-
tests/diagnostics/hlsl-to-vulkan-shift-diagnostic.hlsl(15): warning 39013: shader parameter 'u' has a 'register' specified for D3D, but no '[[vk::binding(...)]]` specified for Vulkan
7
-
RWStructuredBuffer<Data> u : register(u11);
8
-
^~~~~~~~
9
3
tests/diagnostics/hlsl-to-vulkan-shift-diagnostic.hlsl(15): error 39025: conflicting vulkan inferred binding for parameter 'c' overlap is 0 and 0
Copy file name to clipboardexpand all lines: tests/diagnostics/vk-bindings.slang.expected
-3
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,5 @@
1
1
result code = -1
2
2
standard error = {
3
-
tests/diagnostics/vk-bindings.slang(6): warning 39013: shader parameter 't' has a 'register' specified for D3D, but no '[[vk::binding(...)]]` specified for Vulkan
4
-
Texture2D t : register(t0);
5
-
^~~~~~~~
6
3
tests/diagnostics/vk-bindings.slang(14): error 39015: shader parameter 'b' consumes whole descriptor sets, so the binding must be in the form '[[vk::binding(0, ...)]]'; the non-zero binding '2' is not allowed
0 commit comments