7b9e0fb428
This gets rather complicated because MSL does not support OpArrayLength natively. We need to pass down a buffer which contains buffer sizes, and we compute the array length on-demand. Support both discrete descriptors as well as argument buffers.
23 lines
299 B
Plaintext
23 lines
299 B
Plaintext
#version 450
|
|
layout(local_size_x = 1) in;
|
|
layout(set = 0, binding = 1, std140) buffer SSBO
|
|
{
|
|
uint size;
|
|
float v[];
|
|
};
|
|
|
|
layout(set = 0, binding = 2, std430) buffer SSBO1
|
|
{
|
|
float bz[];
|
|
} ssbos[2];
|
|
|
|
uint get_size()
|
|
{
|
|
return v.length() + ssbos[1].bz.length();
|
|
}
|
|
|
|
void main()
|
|
{
|
|
size = get_size();
|
|
}
|