diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2018-11-16 16:04:56 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-16 16:04:56 -0500 |
| commit | 0f67d92df9ca1f528b7a7fc8a8712aaea56f7115 (patch) | |
| tree | e254a484500bd95549689eecff7ed62463aa6e71 /tests | |
| parent | cfb1f61d478c92026718cedca4bfec8c2afc1b00 (diff) | |
Bug fix - vk::binding on structured buffers (#720)
* Fix output of binding of structured buffer on GLSL.
* Added test to check vk binding is coming thru.
* Fix closethit binding inconsistency.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bugs/vk-structured-buffer-binding.hlsl | 12 | ||||
| -rw-r--r-- | tests/bugs/vk-structured-buffer-binding.hlsl.expected | 31 | ||||
| -rw-r--r-- | tests/vkray/closesthit.slang.glsl | 4 |
3 files changed, 45 insertions, 2 deletions
diff --git a/tests/bugs/vk-structured-buffer-binding.hlsl b/tests/bugs/vk-structured-buffer-binding.hlsl new file mode 100644 index 000000000..cdfeb19ab --- /dev/null +++ b/tests/bugs/vk-structured-buffer-binding.hlsl @@ -0,0 +1,12 @@ +//TEST:SIMPLE: -profile ps_4_0 -entry main -target glsl +///////TEST:REFLECTION:-profile ps_4_0 -target spirv + +[[vk::binding(3, 4)]] +RWStructuredBuffer<uint> gDoneGroups : register(u3); + +float4 main( + float3 uv : UV) + : SV_Target +{ + return gDoneGroups[int(uv.z)]; +}
\ No newline at end of file diff --git a/tests/bugs/vk-structured-buffer-binding.hlsl.expected b/tests/bugs/vk-structured-buffer-binding.hlsl.expected new file mode 100644 index 000000000..fc1cb93ea --- /dev/null +++ b/tests/bugs/vk-structured-buffer-binding.hlsl.expected @@ -0,0 +1,31 @@ +result code = 0 +standard error = { +} +standard output = { +#version 450 +layout(row_major) uniform; +layout(row_major) buffer; + +#line 5 0 +layout(std430, binding = 3, set = 4) buffer _S1 { + uint gDoneGroups_0[]; +}; + +#line 7 +layout(location = 0) +out vec4 _S2; + + +#line 7 +layout(location = 0) +in vec3 _S3; + + +#line 7 +void main() +{ + _S2 = vec4(gDoneGroups_0[uint(int(_S3.z))]); + return; +} + +} diff --git a/tests/vkray/closesthit.slang.glsl b/tests/vkray/closesthit.slang.glsl index d4b9e7a6a..ef969ee1c 100644 --- a/tests/vkray/closesthit.slang.glsl +++ b/tests/vkray/closesthit.slang.glsl @@ -2,11 +2,11 @@ #version 460 #extension GL_NV_ray_tracing : require -layout(std430) buffer _S1 +layout(std430, binding = 0) buffer _S1 { vec4 colors_0[]; }; - + struct BuiltInTriangleIntersectionAttributes_0 { vec2 barycentrics_0; |
