summaryrefslogtreecommitdiff
path: root/tests/testdata/webgpu/hellotriangle_shader.wgsl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testdata/webgpu/hellotriangle_shader.wgsl')
-rw-r--r--tests/testdata/webgpu/hellotriangle_shader.wgsl9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/testdata/webgpu/hellotriangle_shader.wgsl b/tests/testdata/webgpu/hellotriangle_shader.wgsl
index f84ccfe94..9359c11ad 100644
--- a/tests/testdata/webgpu/hellotriangle_shader.wgsl
+++ b/tests/testdata/webgpu/hellotriangle_shader.wgsl
@@ -1,5 +1,11 @@
+// only test purpose
+override value: f32;
+
@vertex
fn vs_main(@builtin(vertex_index) in_vertex_index: u32) -> @builtin(position) vec4<f32> {
+ // only test purpose
+ _ = value;
+
let x = f32(i32(in_vertex_index) - 1);
let y = f32(i32(in_vertex_index & 1u) * 2 - 1);
return vec4<f32>(x, y, 0.0, 1.0);
@@ -7,5 +13,8 @@ fn vs_main(@builtin(vertex_index) in_vertex_index: u32) -> @builtin(position) ve
@fragment
fn fs_main() -> @location(0) vec4<f32> {
+ // only test purpose
+ _ = value;
+
return vec4<f32>(1.0, 0.0, 0.0, 1.0);
}