mirror of
https://github.com/RPCS3/glslang.git
synced 2024-11-23 19:29:44 +00:00
9a5689f632
Fixes #1870, probably others.
44 lines
897 B
GLSL
44 lines
897 B
GLSL
#version 310 es
|
|
precision mediump float;
|
|
|
|
struct S {
|
|
float buff[10];
|
|
};
|
|
|
|
layout(std430, binding=2) readonly buffer RoBuff {
|
|
float buff_ro[10];
|
|
S s_ro;
|
|
} ro_buffer;
|
|
|
|
layout(std430, binding=2) buffer Buff {
|
|
float buff[10];
|
|
S s;
|
|
} non_ro_buffer;
|
|
|
|
void non_ro_fun(float[10] buff) { }
|
|
void non_ro_funf(float el) { }
|
|
void non_ro_funS(S s) { }
|
|
|
|
out vec4 fragColor;
|
|
|
|
void main()
|
|
{
|
|
S s;
|
|
|
|
non_ro_fun(s.buff);
|
|
non_ro_funf(s.buff[3]);
|
|
non_ro_funS(s);
|
|
|
|
non_ro_fun(non_ro_buffer.buff);
|
|
non_ro_fun(non_ro_buffer.s.buff);
|
|
non_ro_funf(non_ro_buffer.buff[3]);
|
|
non_ro_funf(non_ro_buffer.s.buff[3]);
|
|
non_ro_funS(non_ro_buffer.s);
|
|
|
|
non_ro_fun(ro_buffer.buff_ro);
|
|
non_ro_fun(ro_buffer.s_ro.buff);
|
|
non_ro_funf(ro_buffer.buff_ro[3]);
|
|
non_ro_funf(ro_buffer.s_ro.buff[3]);
|
|
non_ro_funS(ro_buffer.s_ro);
|
|
}
|