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>
diff --git a/test/builtins/gen/textureNumLevels/076cb5.wgsl.expected.glsl b/test/builtins/gen/textureNumLevels/076cb5.wgsl.expected.glsl
index 8277c6d..363c8fd 100644
--- a/test/builtins/gen/textureNumLevels/076cb5.wgsl.expected.glsl
+++ b/test/builtins/gen/textureNumLevels/076cb5.wgsl.expected.glsl
@@ -1,7 +1,6 @@
SKIP: FAILED
#version 310 es
-precision mediump float;
uniform highp samplerCube arg_0_1;
void textureNumLevels_076cb5() {
@@ -21,9 +20,9 @@
return;
}
Error parsing GLSL shader:
-ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found
-ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp highp int'
-ERROR: 0:6: '' : compilation terminated
+ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found
+ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int'
+ERROR: 0:5: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
@@ -53,7 +52,6 @@
#version 310 es
-precision mediump float;
uniform highp samplerCube arg_0_1;
void textureNumLevels_076cb5() {
@@ -70,9 +68,9 @@
return;
}
Error parsing GLSL shader:
-ERROR: 0:6: 'textureQueryLevels' : no matching overloaded function found
-ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp highp int'
-ERROR: 0:6: '' : compilation terminated
+ERROR: 0:5: 'textureQueryLevels' : no matching overloaded function found
+ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp highp int'
+ERROR: 0:5: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.