tint/intrinsics: Texture queries now return unsigned integer / vectors

To match the spec.

Also add a bunch of missing texture test cases to
src/tint/ast/builtin_texture_helper_test.cc. Fix all the tests that were
broken because these were not being exercised.

Fixed: tint:1526
Change-Id: I207b51d307bbdc054b595e0e0e0fd3330607e171
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106681
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Ben Clayton
2022-10-26 18:36:44 +00:00
committed by Dawn LUCI CQ
parent 980145bc16
commit 13f089095f
5443 changed files with 116933 additions and 115307 deletions

View File

@@ -22,7 +22,7 @@ void main_1() {
vec2 coords12 = vf12;
vec3 coords123 = vf123;
vec4 coords1234 = vf1234;
int x_99 = textureQueryLevels(x_20_1);
int x_99 = int(uint(textureQueryLevels(x_20_1)));
return;
}
@@ -36,9 +36,8 @@ void main() {
}
Error parsing GLSL shader:
ERROR: 0:23: 'textureQueryLevels' : no matching overloaded function found
ERROR: 0:23: '=' : cannot convert from ' const float' to ' temp mediump int'
ERROR: 0:23: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
ERROR: 2 compilation errors. No code generated.

View File

@@ -22,7 +22,7 @@ void main_1() {
vec2 coords12 = vf12;
vec3 coords123 = vf123;
vec4 coords1234 = vf1234;
int x_99 = textureQueryLevels(x_20_1);
int x_99 = int(uint(textureQueryLevels(x_20_1)));
return;
}
@@ -36,9 +36,8 @@ void main() {
}
Error parsing GLSL shader:
ERROR: 0:23: 'textureQueryLevels' : no matching overloaded function found
ERROR: 0:23: '=' : cannot convert from ' const float' to ' temp mediump int'
ERROR: 0:23: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
ERROR: 2 compilation errors. No code generated.

View File

@@ -22,7 +22,7 @@ void main_1() {
vec2 coords12 = vf12;
vec3 coords123 = vf123;
vec4 coords1234 = vf1234;
int x_99 = textureQueryLevels(x_20_1);
int x_99 = int(uint(textureQueryLevels(x_20_1)));
return;
}
@@ -36,9 +36,8 @@ void main() {
}
Error parsing GLSL shader:
ERROR: 0:23: 'textureQueryLevels' : no matching overloaded function found
ERROR: 0:23: '=' : cannot convert from ' const float' to ' temp mediump int'
ERROR: 0:23: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
ERROR: 2 compilation errors. No code generated.

View File

@@ -22,7 +22,7 @@ void main_1() {
vec2 coords12 = vf12;
vec3 coords123 = vf123;
vec4 coords1234 = vf1234;
int x_99 = textureQueryLevels(x_20_1);
int x_99 = int(uint(textureQueryLevels(x_20_1)));
return;
}
@@ -36,9 +36,8 @@ void main() {
}
Error parsing GLSL shader:
ERROR: 0:23: 'textureQueryLevels' : no matching overloaded function found
ERROR: 0:23: '=' : cannot convert from ' const float' to ' temp mediump int'
ERROR: 0:23: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
ERROR: 2 compilation errors. No code generated.

View File

@@ -22,7 +22,7 @@ void main_1() {
vec2 coords12 = vf12;
vec3 coords123 = vf123;
vec4 coords1234 = vf1234;
int x_99 = textureQueryLevels(x_20_1);
int x_99 = int(uint(textureQueryLevels(x_20_1)));
return;
}

View File

@@ -22,7 +22,7 @@ void main_1() {
vec2 coords12 = vf12;
vec3 coords123 = vf123;
vec4 coords1234 = vf1234;
int x_99 = textureQueryLevels(x_20_1);
int x_99 = int(uint(textureQueryLevels(x_20_1)));
return;
}
@@ -36,9 +36,8 @@ void main() {
}
Error parsing GLSL shader:
ERROR: 0:23: 'textureQueryLevels' : no matching overloaded function found
ERROR: 0:23: '=' : cannot convert from ' const float' to ' temp mediump int'
ERROR: 0:23: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
ERROR: 2 compilation errors. No code generated.

View File

@@ -22,7 +22,7 @@ void main_1() {
vec2 coords12 = vf12;
vec3 coords123 = vf123;
vec4 coords1234 = vf1234;
int x_99 = textureQueryLevels(x_20_1);
int x_99 = int(uint(textureQueryLevels(x_20_1)));
return;
}
@@ -36,9 +36,8 @@ void main() {
}
Error parsing GLSL shader:
ERROR: 0:23: 'textureQueryLevels' : no matching overloaded function found
ERROR: 0:23: '=' : cannot convert from ' const float' to ' temp mediump int'
ERROR: 0:23: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
ERROR: 2 compilation errors. No code generated.

View File

@@ -22,7 +22,7 @@ void main_1() {
vec2 coords12 = vf12;
vec3 coords123 = vf123;
vec4 coords1234 = vf1234;
int x_99 = textureQueryLevels(x_20_1);
int x_99 = int(uint(textureQueryLevels(x_20_1)));
return;
}
@@ -36,9 +36,8 @@ void main() {
}
Error parsing GLSL shader:
ERROR: 0:23: 'textureQueryLevels' : no matching overloaded function found
ERROR: 0:23: '=' : cannot convert from ' const float' to ' temp mediump int'
ERROR: 0:23: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
ERROR: 2 compilation errors. No code generated.

View File

@@ -22,7 +22,7 @@ void main_1() {
vec2 coords12 = vf12;
vec3 coords123 = vf123;
vec4 coords1234 = vf1234;
int x_99 = textureQueryLevels(x_20_1);
int x_99 = int(uint(textureQueryLevels(x_20_1)));
return;
}

View File

@@ -22,7 +22,7 @@ void main_1() {
vec2 coords12 = vf12;
vec3 coords123 = vf123;
vec4 coords1234 = vf1234;
int x_99 = textureSamples(x_20_1);
int x_99 = int(uint(textureSamples(x_20_1)));
return;
}
@@ -36,9 +36,8 @@ void main() {
}
Error parsing GLSL shader:
ERROR: 0:23: 'textureSamples' : no matching overloaded function found
ERROR: 0:23: '=' : cannot convert from ' const float' to ' temp mediump int'
ERROR: 0:23: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
ERROR: 2 compilation errors. No code generated.

View File

@@ -22,7 +22,7 @@ void main_1() {
vec2 coords12 = vf12;
vec3 coords123 = vf123;
vec4 coords1234 = vf1234;
ivec3 x_99 = ivec3(textureSize(x_20_1, i1).xy.xy, textureSize(x_20_1, 0).z);
ivec3 x_99 = ivec3(uvec3(uvec2(textureSize(x_20_1, i1).xy).xy, uint(textureSize(x_20_1, 0).z)));
return;
}

View File

@@ -22,7 +22,7 @@ void main_1() {
vec2 coords12 = vf12;
vec3 coords123 = vf123;
vec4 coords1234 = vf1234;
ivec3 x_99 = ivec3(textureSize(x_20_1, i1).xy.xy, textureSize(x_20_1, 0).z);
ivec3 x_99 = ivec3(uvec3(uvec2(textureSize(x_20_1, i1).xy).xy, uint(textureSize(x_20_1, 0).z)));
return;
}