diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2023-07-19 18:35:37 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-19 15:35:37 -0700 |
| commit | a5987aad211d2e0b9391bdda4b67873ec9873074 (patch) | |
| tree | dea1074aa3382c9c047d0102e41a82187426bcf8 /tests/bindings/hlsl-to-vulkan-array.hlsl | |
| parent | 1cfb1c85b52e00cde2d21874a88cda2c22d18b62 (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/bindings/hlsl-to-vulkan-array.hlsl')
| -rw-r--r-- | tests/bindings/hlsl-to-vulkan-array.hlsl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/bindings/hlsl-to-vulkan-array.hlsl b/tests/bindings/hlsl-to-vulkan-array.hlsl new file mode 100644 index 000000000..072f99914 --- /dev/null +++ b/tests/bindings/hlsl-to-vulkan-array.hlsl @@ -0,0 +1,16 @@ +//TEST:REFLECTION:-target glsl -profile ps_4_0 -entry main -fvk-t-shift 10 all -fvk-s-shift 100 all -fvk-u-shift 100 all -fvk-b-shift 1000 all + +struct Data +{ + Texture2D tex; + RWStructuredBuffer<float> structuredBuffer; + float a; + int b; +}; + +Data g_data[2]; + +float4 main() : SV_TARGET +{ + return float4(1, 1, 1, 0); +}
\ No newline at end of file |
