mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 14:08:04 +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,0 +1,15 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void f() {
|
||||
mat2x4 a = mat2x4(vec4(1.0f, 2.0f, 3.0f, 4.0f), vec4(5.0f, 6.0f, 7.0f, 8.0f));
|
||||
mat4x2 b = mat4x2(vec2(-1.0f, -2.0f), vec2(-3.0f, -4.0f), vec2(-5.0f, -6.0f), vec2(-7.0f, -8.0f));
|
||||
mat4 r = (a * b);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
f();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
|
||||
layout (binding = 0) uniform S_1 {
|
||||
mat3x2 matrix;
|
||||
vec3 vector;
|
||||
} data;
|
||||
|
||||
void tint_symbol() {
|
||||
vec2 x = (data.matrix * data.vector);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void f() {
|
||||
mat3 a = mat3(vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f));
|
||||
mat3 b = mat3(vec3(-1.0f, -2.0f, -3.0f), vec3(-4.0f, -5.0f, -6.0f), vec3(-7.0f, -8.0f, -9.0f));
|
||||
mat3 r = (a * b);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
f();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
|
||||
layout (binding = 0) uniform S_1 {
|
||||
mat3 matrix;
|
||||
vec3 vector;
|
||||
} data;
|
||||
|
||||
void tint_symbol() {
|
||||
vec3 x = (data.matrix * data.vector);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void f() {
|
||||
mat4x2 a = mat4x2(vec2(-1.0f, -2.0f), vec2(-3.0f, -4.0f), vec2(-5.0f, -6.0f), vec2(-7.0f, -8.0f));
|
||||
mat2x4 b = mat2x4(vec4(1.0f, 2.0f, 3.0f, 4.0f), vec4(5.0f, 6.0f, 7.0f, 8.0f));
|
||||
mat2 r = (a * b);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
f();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void f() {
|
||||
float r = (1.0f * 2.0f);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
f();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void f() {
|
||||
int r = (1 * 2);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
f();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void f() {
|
||||
uint r = (1u * 2u);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
f();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void f() {
|
||||
float a = 4.0f;
|
||||
vec3 b = vec3(1.0f, 2.0f, 3.0f);
|
||||
vec3 r = (a * b);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
f();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void f() {
|
||||
int a = 4;
|
||||
ivec3 b = ivec3(1, 2, 3);
|
||||
ivec3 r = (a * b);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
f();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void f() {
|
||||
uint a = 4u;
|
||||
uvec3 b = uvec3(1u, 2u, 3u);
|
||||
uvec3 r = (a * b);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
f();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
|
||||
layout (binding = 0) uniform S_1 {
|
||||
mat3 matrix;
|
||||
vec3 vector;
|
||||
} data;
|
||||
|
||||
void tint_symbol() {
|
||||
vec3 x = (data.vector * data.matrix);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
|
||||
layout (binding = 0) uniform S_1 {
|
||||
mat4x3 matrix;
|
||||
vec3 vector;
|
||||
} data;
|
||||
|
||||
void tint_symbol() {
|
||||
vec4 x = (data.vector * data.matrix);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
tint_symbol();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void f() {
|
||||
vec3 a = vec3(1.0f, 2.0f, 3.0f);
|
||||
vec3 r = (a * 4.0f);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
f();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void f() {
|
||||
ivec3 a = ivec3(1, 2, 3);
|
||||
ivec3 r = (a * 4);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
f();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void f() {
|
||||
uvec3 a = uvec3(1u, 2u, 3u);
|
||||
uvec3 r = (a * 4u);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
f();
|
||||
}
|
||||
|
||||
|
||||
15
test/expressions/binary/mul/vec3-vec3/f32.wgsl.expected.glsl
Normal file
15
test/expressions/binary/mul/vec3-vec3/f32.wgsl.expected.glsl
Normal file
@@ -0,0 +1,15 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void f() {
|
||||
vec3 a = vec3(1.0f, 2.0f, 3.0f);
|
||||
vec3 b = vec3(4.0f, 5.0f, 6.0f);
|
||||
vec3 r = (a * b);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
f();
|
||||
}
|
||||
|
||||
|
||||
15
test/expressions/binary/mul/vec3-vec3/i32.wgsl.expected.glsl
Normal file
15
test/expressions/binary/mul/vec3-vec3/i32.wgsl.expected.glsl
Normal file
@@ -0,0 +1,15 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void f() {
|
||||
ivec3 a = ivec3(1, 2, 3);
|
||||
ivec3 b = ivec3(4, 5, 6);
|
||||
ivec3 r = (a * b);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
f();
|
||||
}
|
||||
|
||||
|
||||
15
test/expressions/binary/mul/vec3-vec3/u32.wgsl.expected.glsl
Normal file
15
test/expressions/binary/mul/vec3-vec3/u32.wgsl.expected.glsl
Normal file
@@ -0,0 +1,15 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void f() {
|
||||
uvec3 a = uvec3(1u, 2u, 3u);
|
||||
uvec3 b = uvec3(4u, 5u, 6u);
|
||||
uvec3 r = (a * b);
|
||||
return;
|
||||
}
|
||||
void main() {
|
||||
f();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user