mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
GLSL: add .expected.glsl files for all tests.
Bug: tint:1301 Change-Id: Id3a591a2fa0dfdb112046d5c57defbae07483e0d Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/69480 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
committed by
Tint LUCI CQ
parent
2551458aef
commit
2fe0f4b42b
0
test/array/assign_to_private_var.wgsl.expected.glsl
Normal file
0
test/array/assign_to_private_var.wgsl.expected.glsl
Normal file
0
test/array/assign_to_storage_var.wgsl.expected.glsl
Normal file
0
test/array/assign_to_storage_var.wgsl.expected.glsl
Normal file
0
test/array/assign_to_subexpr.wgsl.expected.glsl
Normal file
0
test/array/assign_to_subexpr.wgsl.expected.glsl
Normal file
30
test/array/function_parameter.wgsl.expected.glsl
Normal file
30
test/array/function_parameter.wgsl.expected.glsl
Normal file
@@ -0,0 +1,30 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
float f1(float a[4]) {
|
||||
return a[3];
|
||||
}
|
||||
|
||||
float f2(float a[3][4]) {
|
||||
return a[2][3];
|
||||
}
|
||||
|
||||
float f3(float a[2][3][4]) {
|
||||
return a[1][2][3];
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void tint_symbol() {
|
||||
float a1[4] = float[4](0.0f, 0.0f, 0.0f, 0.0f);
|
||||
float a2[3][4] = float[3][4](float[4](0.0f, 0.0f, 0.0f, 0.0f), float[4](0.0f, 0.0f, 0.0f, 0.0f), float[4](0.0f, 0.0f, 0.0f, 0.0f));
|
||||
float a3[2][3][4] = float[2][3][4](float[3][4](float[4](0.0f, 0.0f, 0.0f, 0.0f), float[4](0.0f, 0.0f, 0.0f, 0.0f), float[4](0.0f, 0.0f, 0.0f, 0.0f)), float[3][4](float[4](0.0f, 0.0f, 0.0f, 0.0f), float[4](0.0f, 0.0f, 0.0f, 0.0f), float[4](0.0f, 0.0f, 0.0f, 0.0f)));
|
||||
float v1 = f1(a1);
|
||||
float v2 = f2(a2);
|
||||
float v3 = f3(a3);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
30
test/array/function_return_type.wgsl.expected.glsl
Normal file
30
test/array/function_return_type.wgsl.expected.glsl
Normal file
@@ -0,0 +1,30 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
float[4] f1() {
|
||||
float tint_symbol_1[4] = float[4](0.0f, 0.0f, 0.0f, 0.0f);
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
float[3][4] f2() {
|
||||
float tint_symbol_2[3][4] = float[3][4](f1(), f1(), f1());
|
||||
return tint_symbol_2;
|
||||
}
|
||||
|
||||
float[2][3][4] f3() {
|
||||
float tint_symbol_3[2][3][4] = float[2][3][4](f2(), f2());
|
||||
return tint_symbol_3;
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void tint_symbol() {
|
||||
float a1[4] = f1();
|
||||
float a2[3][4] = f2();
|
||||
float a3[2][3][4] = f3();
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
20
test/array/size.wgsl.expected.glsl
Normal file
20
test/array/size.wgsl.expected.glsl
Normal file
@@ -0,0 +1,20 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
const int slen = 4;
|
||||
const uint ulen = 4u;
|
||||
|
||||
void tint_symbol() {
|
||||
float signed_literal[4] = float[4](0.0f, 0.0f, 0.0f, 0.0f);
|
||||
float unsigned_literal[4] = float[4](0.0f, 0.0f, 0.0f, 0.0f);
|
||||
float signed_constant[4] = float[4](0.0f, 0.0f, 0.0f, 0.0f);
|
||||
float unsigned_constant[4] = float[4](0.0f, 0.0f, 0.0f, 0.0f);
|
||||
signed_literal = unsigned_constant;
|
||||
signed_constant = unsigned_literal;
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
45
test/array/type_constructor.wgsl.expected.glsl
Normal file
45
test/array/type_constructor.wgsl.expected.glsl
Normal file
@@ -0,0 +1,45 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void tint_symbol() {
|
||||
int x = 42;
|
||||
int empty[4] = int[4](0, 0, 0, 0);
|
||||
int nonempty[4] = int[4](1, 2, 3, 4);
|
||||
int nonempty_with_expr[4] = int[4](1, x, (x + 1), nonempty[3]);
|
||||
int nested_empty[2][3][4] = int[2][3][4](int[3][4](int[4](0, 0, 0, 0), int[4](0, 0, 0, 0), int[4](0, 0, 0, 0)), int[3][4](int[4](0, 0, 0, 0), int[4](0, 0, 0, 0), int[4](0, 0, 0, 0)));
|
||||
int tint_symbol_1[4] = int[4](1, 2, 3, 4);
|
||||
int tint_symbol_2[4] = int[4](5, 6, 7, 8);
|
||||
int tint_symbol_3[4] = int[4](9, 10, 11, 12);
|
||||
int tint_symbol_4[3][4] = int[3][4](tint_symbol_1, tint_symbol_2, tint_symbol_3);
|
||||
int tint_symbol_5[4] = int[4](13, 14, 15, 16);
|
||||
int tint_symbol_6[4] = int[4](17, 18, 19, 20);
|
||||
int tint_symbol_7[4] = int[4](21, 22, 23, 24);
|
||||
int tint_symbol_8[3][4] = int[3][4](tint_symbol_5, tint_symbol_6, tint_symbol_7);
|
||||
int nested_nonempty[2][3][4] = int[2][3][4](tint_symbol_4, tint_symbol_8);
|
||||
int tint_symbol_9[4] = int[4](1, 2, x, (x + 1));
|
||||
int tint_symbol_10[4] = int[4](5, 6, nonempty[2], (nonempty[3] + 1));
|
||||
int tint_symbol_11[3][4] = int[3][4](tint_symbol_9, tint_symbol_10, nonempty);
|
||||
int nested_nonempty_with_expr[2][3][4] = int[2][3][4](tint_symbol_11, nested_nonempty[1]);
|
||||
int tint_symbol_12[4] = int[4](0, 0, 0, 0);
|
||||
int subexpr_empty = tint_symbol_12[1];
|
||||
int tint_symbol_13[4] = int[4](1, 2, 3, 4);
|
||||
int subexpr_nonempty = tint_symbol_13[2];
|
||||
int tint_symbol_14[4] = int[4](1, x, (x + 1), nonempty[3]);
|
||||
int subexpr_nonempty_with_expr = tint_symbol_14[2];
|
||||
int tint_symbol_15[2][4] = int[2][4](int[4](0, 0, 0, 0), int[4](0, 0, 0, 0));
|
||||
int subexpr_nested_empty[4] = tint_symbol_15[1];
|
||||
int tint_symbol_16[4] = int[4](1, 2, 3, 4);
|
||||
int tint_symbol_17[4] = int[4](5, 6, 7, 8);
|
||||
int tint_symbol_18[2][4] = int[2][4](tint_symbol_16, tint_symbol_17);
|
||||
int subexpr_nested_nonempty[4] = tint_symbol_18[1];
|
||||
int tint_symbol_19[4] = int[4](1, x, (x + 1), nonempty[3]);
|
||||
int tint_symbol_20[2][4] = int[2][4](tint_symbol_19, nested_nonempty[1][2]);
|
||||
int subexpr_nested_nonempty_with_expr[4] = tint_symbol_20[1];
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user