wgpu/tests/in/glsl/buffer.frag
João Capucho 4146cb24d0 glsl-in: Allow nested accesses in lhs positions
Also fixes access to runtime sized arrays behind named blocks
2022-03-27 21:47:51 -07:00

23 lines
482 B
GLSL

#version 450
layout(set = 0, binding = 0) buffer testBufferBlock {
uint[] data;
} testBuffer;
layout(set = 0, binding = 1) writeonly buffer testBufferWriteOnlyBlock {
uint[] data;
} testBufferWriteOnly;
layout(set = 0, binding = 2) readonly buffer testBufferReadOnlyBlock {
uint[] data;
} testBufferReadOnly;
void main() {
uint a = testBuffer.data[0];
testBuffer.data[1] = 2;
testBufferWriteOnly.data[1] = 2;
uint b = testBufferReadOnly.data[0];
}