From 72e93672d3e0d28ec2d391a60ce297f0cd429d6e Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Tue, 22 Mar 2016 14:49:43 +0100 Subject: [PATCH] Add array-of-SSBO test. --- reference/shaders/comp/ssbo-array.comp | 14 ++++++++++++++ shaders/comp/ssbo-array.comp | 14 ++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 reference/shaders/comp/ssbo-array.comp create mode 100644 shaders/comp/ssbo-array.comp diff --git a/reference/shaders/comp/ssbo-array.comp b/reference/shaders/comp/ssbo-array.comp new file mode 100644 index 00000000..e773bd09 --- /dev/null +++ b/reference/shaders/comp/ssbo-array.comp @@ -0,0 +1,14 @@ +#version 310 es +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; + +layout(binding = 0, std430) buffer SSBO +{ + vec4 data[]; +} ssbos[2]; + +void main() +{ + uint ident = gl_GlobalInvocationID.x; + ssbos[1].data[ident] = ssbos[0].data[ident]; +} + diff --git a/shaders/comp/ssbo-array.comp b/shaders/comp/ssbo-array.comp new file mode 100644 index 00000000..da0eae08 --- /dev/null +++ b/shaders/comp/ssbo-array.comp @@ -0,0 +1,14 @@ +#version 310 es +layout(local_size_x = 1) in; + +layout(std430, binding = 0) buffer SSBO +{ + vec4 data[]; +} ssbos[2]; + +void main() +{ + uint ident = gl_GlobalInvocationID.x; + ssbos[1].data[ident] = ssbos[0].data[ident]; +} +