2021-11-16 15:15:36 +00:00
|
|
|
#version 310 es
|
|
|
|
precision mediump float;
|
|
|
|
|
2021-11-19 17:46:13 +00:00
|
|
|
shared int a;
|
2021-11-16 15:15:36 +00:00
|
|
|
|
|
|
|
void uses_a() {
|
|
|
|
a = (a + 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct tint_symbol_1 {
|
|
|
|
uint local_invocation_index;
|
|
|
|
};
|
|
|
|
|
|
|
|
void main1_inner(uint local_invocation_index) {
|
|
|
|
{
|
|
|
|
a = 0;
|
|
|
|
}
|
2021-11-19 17:46:13 +00:00
|
|
|
memoryBarrierShared();
|
2021-11-16 15:15:36 +00:00
|
|
|
a = 42;
|
|
|
|
uses_a();
|
|
|
|
}
|
|
|
|
|
|
|
|
struct tint_symbol_3 {
|
|
|
|
uint local_invocation_index_1;
|
|
|
|
};
|
|
|
|
struct tint_symbol_5 {
|
|
|
|
uint local_invocation_index_2;
|
|
|
|
};
|
|
|
|
|
|
|
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
|
|
void main1(tint_symbol_1 tint_symbol) {
|
|
|
|
main1_inner(tint_symbol.local_invocation_index);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
void main() {
|
|
|
|
tint_symbol_1 inputs;
|
|
|
|
inputs.local_invocation_index = uint(gl_LocalInvocationIndex);
|
|
|
|
main1(inputs);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#version 310 es
|
|
|
|
precision mediump float;
|
|
|
|
|
2021-11-19 17:46:13 +00:00
|
|
|
shared int b;
|
2021-11-16 15:15:36 +00:00
|
|
|
|
|
|
|
void uses_b() {
|
|
|
|
b = (b * 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct tint_symbol_1 {
|
|
|
|
uint local_invocation_index;
|
|
|
|
};
|
|
|
|
struct tint_symbol_3 {
|
|
|
|
uint local_invocation_index_1;
|
|
|
|
};
|
|
|
|
|
|
|
|
void main2_inner(uint local_invocation_index_1) {
|
|
|
|
{
|
|
|
|
b = 0;
|
|
|
|
}
|
2021-11-19 17:46:13 +00:00
|
|
|
memoryBarrierShared();
|
2021-11-16 15:15:36 +00:00
|
|
|
b = 7;
|
|
|
|
uses_b();
|
|
|
|
}
|
|
|
|
|
|
|
|
struct tint_symbol_5 {
|
|
|
|
uint local_invocation_index_2;
|
|
|
|
};
|
|
|
|
|
|
|
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
|
|
void main2(tint_symbol_3 tint_symbol_2) {
|
|
|
|
main2_inner(tint_symbol_2.local_invocation_index_1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
void main() {
|
|
|
|
tint_symbol_3 inputs;
|
|
|
|
inputs.local_invocation_index_1 = uint(gl_LocalInvocationIndex);
|
|
|
|
main2(inputs);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#version 310 es
|
|
|
|
precision mediump float;
|
|
|
|
|
2021-11-19 17:46:13 +00:00
|
|
|
shared int a;
|
|
|
|
shared int b;
|
2021-11-16 15:15:36 +00:00
|
|
|
|
|
|
|
void uses_a() {
|
|
|
|
a = (a + 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uses_b() {
|
|
|
|
b = (b * 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uses_a_and_b() {
|
|
|
|
b = a;
|
|
|
|
}
|
|
|
|
|
|
|
|
void no_uses() {
|
|
|
|
}
|
|
|
|
|
|
|
|
void outer() {
|
|
|
|
a = 0;
|
|
|
|
uses_a();
|
|
|
|
uses_a_and_b();
|
|
|
|
uses_b();
|
|
|
|
no_uses();
|
|
|
|
}
|
|
|
|
|
|
|
|
struct tint_symbol_1 {
|
|
|
|
uint local_invocation_index;
|
|
|
|
};
|
|
|
|
struct tint_symbol_3 {
|
|
|
|
uint local_invocation_index_1;
|
|
|
|
};
|
|
|
|
struct tint_symbol_5 {
|
|
|
|
uint local_invocation_index_2;
|
|
|
|
};
|
|
|
|
|
|
|
|
void main3_inner(uint local_invocation_index_2) {
|
|
|
|
{
|
|
|
|
a = 0;
|
|
|
|
b = 0;
|
|
|
|
}
|
2021-11-19 17:46:13 +00:00
|
|
|
memoryBarrierShared();
|
2021-11-16 15:15:36 +00:00
|
|
|
outer();
|
|
|
|
no_uses();
|
|
|
|
}
|
|
|
|
|
|
|
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
|
|
void main3(tint_symbol_5 tint_symbol_4) {
|
|
|
|
main3_inner(tint_symbol_4.local_invocation_index_2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
void main() {
|
|
|
|
tint_symbol_5 inputs;
|
|
|
|
inputs.local_invocation_index_2 = uint(gl_LocalInvocationIndex);
|
|
|
|
main3(inputs);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#version 310 es
|
|
|
|
precision mediump float;
|
|
|
|
|
|
|
|
void no_uses() {
|
|
|
|
}
|
|
|
|
|
|
|
|
struct tint_symbol_1 {
|
|
|
|
uint local_invocation_index;
|
|
|
|
};
|
|
|
|
struct tint_symbol_3 {
|
|
|
|
uint local_invocation_index_1;
|
|
|
|
};
|
|
|
|
struct tint_symbol_5 {
|
|
|
|
uint local_invocation_index_2;
|
|
|
|
};
|
|
|
|
|
|
|
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
|
|
void main4() {
|
|
|
|
no_uses();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
void main() {
|
|
|
|
main4();
|
|
|
|
}
|
|
|
|
|
|
|
|
|