mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-12-04 20:53:57 +00:00
4146cb24d0
Also fixes access to runtime sized arrays behind named blocks
23 lines
482 B
GLSL
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];
|
|
}
|