mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-25 08:51:05 +01:00
73 lines
1.4 KiB
GLSL
73 lines
1.4 KiB
GLSL
#version 310 es
|
|
|
|
precision highp float;
|
|
precision highp int;
|
|
|
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
|
|
const int FOUR = 4;
|
|
const int FOUR_ALIAS = 4;
|
|
const int TEST_CONSTANT_ADDITION = 8;
|
|
const int TEST_CONSTANT_ALIAS_ADDITION = 8;
|
|
|
|
layout(std430) buffer type_block_0Compute { ivec4 _group_0_binding_0_cs; };
|
|
|
|
layout(std430) buffer type_1_block_1Compute { int _group_0_binding_1_cs; };
|
|
|
|
|
|
void swizzle_of_compose() {
|
|
_group_0_binding_0_cs = ivec4(4, 3, 2, 1);
|
|
return;
|
|
}
|
|
|
|
void index_of_compose() {
|
|
int _e2 = _group_0_binding_1_cs;
|
|
_group_0_binding_1_cs = (_e2 + 2);
|
|
return;
|
|
}
|
|
|
|
void compose_three_deep() {
|
|
int _e2 = _group_0_binding_1_cs;
|
|
_group_0_binding_1_cs = (_e2 + 6);
|
|
return;
|
|
}
|
|
|
|
void non_constant_initializers() {
|
|
int w = 30;
|
|
int x = 0;
|
|
int y = 0;
|
|
int z = 70;
|
|
int _e2 = w;
|
|
x = _e2;
|
|
int _e4 = x;
|
|
y = _e4;
|
|
int _e9 = w;
|
|
int _e10 = x;
|
|
int _e11 = y;
|
|
int _e12 = z;
|
|
ivec4 _e14 = _group_0_binding_0_cs;
|
|
_group_0_binding_0_cs = (_e14 + ivec4(_e9, _e10, _e11, _e12));
|
|
return;
|
|
}
|
|
|
|
void splat_of_constant() {
|
|
_group_0_binding_0_cs = ivec4(-4, -4, -4, -4);
|
|
return;
|
|
}
|
|
|
|
void compose_of_constant() {
|
|
_group_0_binding_0_cs = ivec4(-4, -4, -4, -4);
|
|
return;
|
|
}
|
|
|
|
void main() {
|
|
swizzle_of_compose();
|
|
index_of_compose();
|
|
compose_three_deep();
|
|
non_constant_initializers();
|
|
splat_of_constant();
|
|
compose_of_constant();
|
|
return;
|
|
}
|
|
|