GLSL: implement interpolation qualifiers.

Bug: tint:1399 tint:451
Change-Id: Idf02a98d2c51ab4d93847fc24a9d5a447ce3aaa3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78222
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:
Stephen White
2022-01-25 21:39:05 +00:00
committed by Tint LUCI CQ
parent 800b8e3175
commit ca4cfb9d6f
26 changed files with 72 additions and 715 deletions

View File

@@ -1,64 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint x_1 = 0u;
uint x_2 = 0u;
uint x_3 = 0u;
uint x_4 = 0u;
void main_1() {
return;
}
struct main_out {
uint x_2_1;
uint x_4_1;
};
struct tint_symbol_2 {
uint x_1_param;
uint x_3_param;
};
struct tint_symbol_3 {
uint x_2_1;
uint x_4_1;
};
main_out tint_symbol_inner(uint x_1_param, uint x_3_param) {
x_1 = x_1_param;
x_3 = x_3_param;
main_1();
main_out tint_symbol_4 = main_out(x_2, x_4);
return tint_symbol_4;
}
tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
main_out inner_result = tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_3_param);
tint_symbol_3 wrapper_result = tint_symbol_3(0u, 0u);
wrapper_result.x_2_1 = inner_result.x_2_1;
wrapper_result.x_4_1 = inner_result.x_4_1;
return wrapper_result;
}
layout(location = 0) in uint x_1_param;
layout(location = 30) in uint x_3_param;
layout(location = 0) out uint x_2_1;
layout(location = 6) out uint x_4_1;
void main() {
tint_symbol_2 inputs;
inputs.x_1_param = x_1_param;
inputs.x_3_param = x_3_param;
tint_symbol_3 outputs;
outputs = tint_symbol(inputs);
x_2_1 = outputs.x_2_1;
x_4_1 = outputs.x_4_1;
}
Error parsing GLSL shader:
ERROR: 0:41: 'uint' : must be qualified as flat in
ERROR: 0:41: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.