f1b411c9e8
This is somewhat awkward to support, but the best effort we can do here is to analyze various Load/Store opcodes and deduce the ideal overall alignment based on this. This is not a 100% perfect solution, but should be correct for any reasonable use case. Also fix various nitpicks with BDA support while I'm at it.
29 lines
506 B
Plaintext
29 lines
506 B
Plaintext
#version 450
|
|
#extension GL_EXT_buffer_reference : require
|
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
|
|
layout(buffer_reference) buffer Bar;
|
|
layout(buffer_reference) buffer Foo;
|
|
layout(buffer_reference, buffer_reference_align = 8, std430) buffer Bar
|
|
{
|
|
uint a;
|
|
uint b;
|
|
Foo foo;
|
|
};
|
|
|
|
layout(buffer_reference, std430) buffer Foo
|
|
{
|
|
uint v;
|
|
};
|
|
|
|
layout(push_constant, std430) uniform Push
|
|
{
|
|
Bar bar;
|
|
} _15;
|
|
|
|
void main()
|
|
{
|
|
uint _31 = atomicAdd(_15.bar.a, _15.bar.b);
|
|
}
|
|
|