dawn-cmake/test/bug/tint/1081.wgsl.expected.glsl
Stephen White 671d9703f0 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>
2022-01-21 18:40:18 +00:00

59 lines
1.1 KiB
GLSL

SKIP: FAILED
bug/tint/1081.wgsl:9:22 warning: integral user-defined fragment inputs must have a flat interpolation attribute
fn main(@location(1) x: vec3<i32>) -> @location(2) i32 {
^
#version 310 es
precision mediump float;
int f(int x) {
if ((x == 10)) {
discard;
}
return x;
}
struct tint_symbol_2 {
ivec3 x;
};
struct tint_symbol_3 {
int value;
};
int tint_symbol_inner(ivec3 x) {
int y = x.x;
while (true) {
int r = f(y);
if ((r == 0)) {
break;
}
}
return y;
}
tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
int inner_result = tint_symbol_inner(tint_symbol_1.x);
tint_symbol_3 wrapper_result = tint_symbol_3(0);
wrapper_result.value = inner_result;
return wrapper_result;
}
in ivec3 x;
out int value;
void main() {
tint_symbol_2 inputs;
inputs.x = x;
tint_symbol_3 outputs;
outputs = tint_symbol(inputs);
value = outputs.value;
}
Error parsing GLSL shader:
ERROR: 0:35: 'int' : must be qualified as flat in
ERROR: 0:35: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.