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

@@ -6,7 +6,7 @@ vec4 tint_symbol_1 = vec4(0.0f);
uniform highp sampler2DMS arg_0_1;
void textureNumSamples_a3c8a0() {
int res = 0;
int x_16 = textureSamples(arg_0_1);
int x_16 = int(uint(textureSamples(arg_0_1)));
res = x_16;
return;
}
@@ -42,9 +42,8 @@ void main() {
}
Error parsing GLSL shader:
ERROR: 0:7: 'textureSamples' : no matching overloaded function found
ERROR: 0:7: '=' : cannot convert from ' const float' to ' temp highp int'
ERROR: 0:7: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
ERROR: 2 compilation errors. No code generated.
@@ -54,7 +53,7 @@ precision mediump float;
uniform highp sampler2DMS arg_0_1;
void textureNumSamples_a3c8a0() {
int res = 0;
int x_16 = textureSamples(arg_0_1);
int x_16 = int(uint(textureSamples(arg_0_1)));
res = x_16;
return;
}
@@ -78,9 +77,8 @@ void main() {
}
Error parsing GLSL shader:
ERROR: 0:7: 'textureSamples' : no matching overloaded function found
ERROR: 0:7: '=' : cannot convert from ' const float' to ' temp mediump int'
ERROR: 0:7: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
ERROR: 2 compilation errors. No code generated.
@@ -89,7 +87,7 @@ ERROR: 3 compilation errors. No code generated.
uniform highp sampler2DMS arg_0_1;
void textureNumSamples_a3c8a0() {
int res = 0;
int x_16 = textureSamples(arg_0_1);
int x_16 = int(uint(textureSamples(arg_0_1)));
res = x_16;
return;
}
@@ -114,9 +112,8 @@ void main() {
}
Error parsing GLSL shader:
ERROR: 0:6: 'textureSamples' : no matching overloaded function found
ERROR: 0:6: '=' : cannot convert from ' const float' to ' temp highp int'
ERROR: 0:6: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
ERROR: 2 compilation errors. No code generated.