GLSL samples: add empty entry point if needed.

If a WGSL test contains no entry points, add an empty one.
In that case, do not pass its name to the generator, so we
generate code for all functions, so they aren't culled for
reachability.

Add new test results for formerly empty tests.

Bug: tint:1376
Change-Id: Ibf371b943fb273d44712dfcc9dc1b7bb4ab071db
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/76540
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
Stephen White
2022-01-21 18:40:18 +00:00
committed by Tint LUCI CQ
parent b4cd255c6e
commit 671d9703f0
212 changed files with 4671 additions and 32 deletions

View File

@@ -0,0 +1,16 @@
#version 310 es
precision mediump float;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void unused_entry_point() {
return;
}
void main() {
unused_entry_point();
}
void f() {
bvec4 v = bvec4(false, false, false, false);
}

View File

@@ -0,0 +1,16 @@
#version 310 es
precision mediump float;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void unused_entry_point() {
return;
}
void main() {
unused_entry_point();
}
void f() {
vec4 v = vec4(0.0f, 0.0f, 0.0f, 0.0f);
}

View File

@@ -0,0 +1,16 @@
#version 310 es
precision mediump float;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void unused_entry_point() {
return;
}
void main() {
unused_entry_point();
}
void f() {
ivec4 v = ivec4(0, 0, 0, 0);
}

View File

@@ -0,0 +1,16 @@
#version 310 es
precision mediump float;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void unused_entry_point() {
return;
}
void main() {
unused_entry_point();
}
void f() {
uvec4 v = uvec4(0u, 0u, 0u, 0u);
}