summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.structbuffer.coherent.frag
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/3rdparty/glslang/Test/hlsl.structbuffer.coherent.frag')
-rw-r--r--3rdparty/bgfx/3rdparty/glslang/Test/hlsl.structbuffer.coherent.frag23
1 files changed, 23 insertions, 0 deletions
diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.structbuffer.coherent.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.structbuffer.coherent.frag
new file mode 100644
index 00000000000..1c60ef5aa4c
--- /dev/null
+++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.structbuffer.coherent.frag
@@ -0,0 +1,23 @@
+struct sb_t
+{
+ float3 color;
+ bool test;
+};
+
+
+globallycoherent RWStructuredBuffer<sb_t> sbuf;
+globallycoherent RWStructuredBuffer<float> sbuf2;
+
+float4 main(uint pos : FOO) : SV_Target0
+{
+ sbuf2[pos+1] = 42;
+
+ uint size;
+ uint stride;
+ sbuf.GetDimensions(size, stride);
+
+ if (sbuf[pos].test)
+ return float4(sbuf[pos].color + sbuf2[pos], 0);
+ else
+ return size + stride;
+}