GLSL: only emit default precision qualifier for frag shader.

Other shader types don't need this.
Also fix code style of member var.

Bug: tint:1360
Change-Id: Ic3600ec7c6da9b85b57655fabbf1f2e44b0ea7d3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/79640
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-02-07 18:49:46 +00:00
committed by Tint LUCI CQ
parent 89c730dbf3
commit bf0180bcee
1358 changed files with 1274 additions and 3256 deletions

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint tint_pack4x8snorm(vec4 param_0) {
int4 i = int4(round(clamp(param_0, -1.0, 1.0) * 127.0)) & 0xff;
@@ -46,8 +45,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:5: 'int4' : undeclared identifier
ERROR: 0:5: '' : compilation terminated
ERROR: 0:4: 'int4' : undeclared identifier
ERROR: 0:4: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint tint_pack4x8unorm(vec4 param_0) {
uint4 i = uint4(round(clamp(param_0, 0.0, 1.0) * 255.0));
@@ -46,8 +45,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:5: 'uint4' : undeclared identifier
ERROR: 0:5: '' : compilation terminated
ERROR: 0:4: 'uint4' : undeclared identifier
ERROR: 0:4: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint tint_pack2x16snorm(vec2 param_0) {
int2 i = int2(round(clamp(param_0, -1.0, 1.0) * 32767.0)) & 0xffff;
@@ -46,8 +45,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:5: 'int2' : undeclared identifier
ERROR: 0:5: '' : compilation terminated
ERROR: 0:4: 'int2' : undeclared identifier
ERROR: 0:4: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint tint_pack2x16unorm(vec2 param_0) {
uint2 i = uint2(round(clamp(param_0, 0.0, 1.0) * 65535.0));
@@ -46,8 +45,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:5: 'uint2' : undeclared identifier
ERROR: 0:5: '' : compilation terminated
ERROR: 0:4: 'uint2' : undeclared identifier
ERROR: 0:4: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint tint_pack2x16float(vec2 param_0) {
uint2 i = f32tof16(param_0);
@@ -46,8 +45,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:5: 'uint2' : undeclared identifier
ERROR: 0:5: '' : compilation terminated
ERROR: 0:4: 'uint2' : undeclared identifier
ERROR: 0:4: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
vec4 tint_unpack4x8snorm(uint param_0) {
int j = int(param_0);
@@ -47,8 +46,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:6: 'int4' : undeclared identifier
ERROR: 0:6: '' : compilation terminated
ERROR: 0:5: 'int4' : undeclared identifier
ERROR: 0:5: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
vec4 tint_unpack4x8unorm(uint param_0) {
uint j = param_0;
@@ -47,8 +46,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:6: 'uint4' : undeclared identifier
ERROR: 0:6: '' : compilation terminated
ERROR: 0:5: 'uint4' : undeclared identifier
ERROR: 0:5: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
vec2 tint_unpack2x16snorm(uint param_0) {
int j = int(param_0);
@@ -47,8 +46,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:6: 'int2' : undeclared identifier
ERROR: 0:6: '' : compilation terminated
ERROR: 0:5: 'int2' : undeclared identifier
ERROR: 0:5: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
vec2 tint_unpack2x16unorm(uint param_0) {
uint j = param_0;
@@ -47,8 +46,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:6: 'uint2' : undeclared identifier
ERROR: 0:6: '' : compilation terminated
ERROR: 0:5: 'uint2' : undeclared identifier
ERROR: 0:5: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
vec2 tint_unpack2x16float(uint param_0) {
uint i = param_0;
@@ -46,8 +45,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:6: '&' : wrong operand types: no operation '&' exists that takes a left-hand operand of type ' temp highp uint' and a right operand of type ' const int' (or there is no acceptable conversion)
ERROR: 0:6: '' : compilation terminated
ERROR: 0:5: '&' : wrong operand types: no operation '&' exists that takes a left-hand operand of type ' temp highp uint' and a right operand of type ' const int' (or there is no acceptable conversion)
ERROR: 0:5: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -40,8 +39,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:27: 'mad' : no matching overloaded function found
ERROR: 0:27: '' : compilation terminated
ERROR: 0:26: 'mad' : no matching overloaded function found
ERROR: 0:26: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -40,9 +39,9 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:27: 'mad' : no matching overloaded function found
ERROR: 0:27: '=' : cannot convert from ' const float' to ' temp mediump 2-component vector of float'
ERROR: 0:27: '' : compilation terminated
ERROR: 0:26: 'mad' : no matching overloaded function found
ERROR: 0:26: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of float'
ERROR: 0:26: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -40,8 +39,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:27: 'frac' : no matching overloaded function found
ERROR: 0:27: '' : compilation terminated
ERROR: 0:26: 'frac' : no matching overloaded function found
ERROR: 0:26: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -40,8 +39,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:27: 'rsqrt' : no matching overloaded function found
ERROR: 0:27: '' : compilation terminated
ERROR: 0:26: 'rsqrt' : no matching overloaded function found
ERROR: 0:26: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -40,9 +39,9 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:27: 'frac' : no matching overloaded function found
ERROR: 0:27: '=' : cannot convert from ' const float' to ' temp mediump 2-component vector of float'
ERROR: 0:27: '' : compilation terminated
ERROR: 0:26: 'frac' : no matching overloaded function found
ERROR: 0:26: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of float'
ERROR: 0:26: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -40,9 +39,9 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:27: 'rsqrt' : no matching overloaded function found
ERROR: 0:27: '=' : cannot convert from ' const float' to ' temp mediump 2-component vector of float'
ERROR: 0:27: '' : compilation terminated
ERROR: 0:26: 'rsqrt' : no matching overloaded function found
ERROR: 0:26: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of float'
ERROR: 0:26: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
layout(location = 1) flat in uint x_1_param_1;
layout(location = 2) flat in uvec2 x_2_param_1;
@@ -44,8 +43,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:4: '' : vertex input cannot be further qualified
ERROR: 0:4: '' : compilation terminated
ERROR: 0:3: '' : vertex input cannot be further qualified
ERROR: 0:3: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -22,9 +21,9 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:9: 'countbits' : no matching overloaded function found
ERROR: 0:9: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of int'
ERROR: 0:9: '' : compilation terminated
ERROR: 0:8: 'countbits' : no matching overloaded function found
ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of int'
ERROR: 0:8: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -22,8 +21,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:9: 'countbits' : no matching overloaded function found
ERROR: 0:9: '' : compilation terminated
ERROR: 0:8: 'countbits' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -22,9 +21,9 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:9: 'countbits' : no matching overloaded function found
ERROR: 0:9: '=' : cannot convert from ' const float' to ' temp highp int'
ERROR: 0:9: '' : compilation terminated
ERROR: 0:8: 'countbits' : no matching overloaded function found
ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp highp int'
ERROR: 0:8: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -22,8 +21,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:9: 'countbits' : no matching overloaded function found
ERROR: 0:9: '' : compilation terminated
ERROR: 0:8: 'countbits' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -22,8 +21,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:9: 'countbits' : no matching overloaded function found
ERROR: 0:9: '' : compilation terminated
ERROR: 0:8: 'countbits' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -22,9 +21,9 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:9: 'countbits' : no matching overloaded function found
ERROR: 0:9: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of uint'
ERROR: 0:9: '' : compilation terminated
ERROR: 0:8: 'countbits' : no matching overloaded function found
ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of uint'
ERROR: 0:8: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -22,8 +21,8 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:9: 'countbits' : no matching overloaded function found
ERROR: 0:9: '' : compilation terminated
ERROR: 0:8: 'countbits' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -22,9 +21,9 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:9: 'countbits' : no matching overloaded function found
ERROR: 0:9: '=' : cannot convert from ' const float' to ' temp highp uint'
ERROR: 0:9: '' : compilation terminated
ERROR: 0:8: 'countbits' : no matching overloaded function found
ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp highp uint'
ERROR: 0:8: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -22,9 +21,9 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:9: 'reversebits' : no matching overloaded function found
ERROR: 0:9: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of int'
ERROR: 0:9: '' : compilation terminated
ERROR: 0:8: 'reversebits' : no matching overloaded function found
ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of int'
ERROR: 0:8: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -22,9 +21,9 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:9: 'reversebits' : no matching overloaded function found
ERROR: 0:9: '=' : cannot convert from ' const float' to ' temp highp int'
ERROR: 0:9: '' : compilation terminated
ERROR: 0:8: 'reversebits' : no matching overloaded function found
ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp highp int'
ERROR: 0:8: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -22,9 +21,9 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:9: 'reversebits' : no matching overloaded function found
ERROR: 0:9: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of uint'
ERROR: 0:9: '' : compilation terminated
ERROR: 0:8: 'reversebits' : no matching overloaded function found
ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp highp 2-component vector of uint'
ERROR: 0:8: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.

View File

@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
precision mediump float;
void main_1() {
uint u1 = 10u;
@@ -22,9 +21,9 @@ void main() {
return;
}
Error parsing GLSL shader:
ERROR: 0:9: 'reversebits' : no matching overloaded function found
ERROR: 0:9: '=' : cannot convert from ' const float' to ' temp highp uint'
ERROR: 0:9: '' : compilation terminated
ERROR: 0:8: 'reversebits' : no matching overloaded function found
ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp highp uint'
ERROR: 0:8: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.