diff --git a/reference/shaders/comp/rmw-opt.comp b/reference/shaders/comp/rmw-opt.comp new file mode 100644 index 00000000..e3fba781 --- /dev/null +++ b/reference/shaders/comp/rmw-opt.comp @@ -0,0 +1,27 @@ +#version 310 es +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; + +layout(binding = 0, std430) buffer SSBO +{ + int a; +} _9; + +void main() +{ + _9.a += 10; + _9.a -= 10; + _9.a *= 10; + _9.a /= 10; + _9.a = _9.a << 2; + _9.a = _9.a >> 3; + _9.a &= 40; + _9.a ^= 10; + _9.a %= 40; + _9.a |= 1; + bool c = false; + bool d = true; + c = c && d; + d = d || c; + _9.a = int(c && d); +} + diff --git a/shaders/comp/rmw-opt.comp b/shaders/comp/rmw-opt.comp new file mode 100644 index 00000000..a6e1e7fe --- /dev/null +++ b/shaders/comp/rmw-opt.comp @@ -0,0 +1,27 @@ +#version 310 es +layout(local_size_x = 1) in; + +layout(std430, binding = 0) buffer SSBO +{ + int a; +}; + +void main() +{ + a += 10; + a -= 10; + a *= 10; + a /= 10; + a <<= 2; + a >>= 3; + a &= 40; + a ^= 10; + a %= 40; + a |= 1; + + bool c = false; + bool d = true; + c = c && d; + d = d || c; + a = c && d ? 1 : 0; +}