summaryrefslogtreecommitdiff
path: root/tests/diagnostics
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2023-07-19 18:35:37 -0400
committerGitHub <noreply@github.com>2023-07-19 15:35:37 -0700
commita5987aad211d2e0b9391bdda4b67873ec9873074 (patch)
treedea1074aa3382c9c047d0102e41a82187426bcf8 /tests/diagnostics
parent1cfb1c85b52e00cde2d21874a88cda2c22d18b62 (diff)
Support for vk-shift-* without explicit bindings (#3000)
* Improvements to HLSLToVulkanLayoutOptions. * WIP vk-shift-* with HLSL like binding. Detecting clashes. * Shift example seems to be working correctly. One oddness is that "used" data is now reflected, as we only enable for D3D shader resource types. Now we use those with inferred VK mode they appear. * Implicit seems to work. * Disable inference with Sampler/CombinedTextureSampler. I guess? we could just use the HLSL texture register binding to infer. * Report overlapping ranges in diagnostic. The hlsl-to-vulkan-shift-diagnostic result might be surprising but it is correct, because u is automatically laid out so consumes DescriptorSlot 0, but that's already consumed by c. * First attempt at array layout with infer on Vulkan. * Fix the vulkan shift output. * Array example.
Diffstat (limited to 'tests/diagnostics')
-rw-r--r--tests/diagnostics/hlsl-to-vulkan-shift-diagnostic.hlsl.expected11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/diagnostics/hlsl-to-vulkan-shift-diagnostic.hlsl.expected b/tests/diagnostics/hlsl-to-vulkan-shift-diagnostic.hlsl.expected
index a7e4e27bb..907572f9e 100644
--- a/tests/diagnostics/hlsl-to-vulkan-shift-diagnostic.hlsl.expected
+++ b/tests/diagnostics/hlsl-to-vulkan-shift-diagnostic.hlsl.expected
@@ -1,9 +1,12 @@
-result code = 0
+result code = -1
standard error = {
-tests/diagnostics/hlsl-to-vulkan-shift-diagnostic.hlsl(11): warning 39016: unable to infer Vulkan binding for 'c', automatic layout will be used
+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
ConstantBuffer<Data> c : register(b2);
- ^
-tests/diagnostics/hlsl-to-vulkan-shift-diagnostic.hlsl(15): warning 39016: unable to infer Vulkan binding for 'u', automatic layout will be used
+ ^~~~~~~~
+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
+RWStructuredBuffer<Data> u : register(u11);
+ ^~~~~~~~
+tests/diagnostics/hlsl-to-vulkan-shift-diagnostic.hlsl(15): error 39025: conflicting vulkan inferred binding for parameter 'c' overlap is 0 and 0
RWStructuredBuffer<Data> u : register(u11);
^
}