GLSL: use "Offset" forms of texture intrinsics when appropriate.
Also ensure correct paramter ordering: bias is always after offset.
Bug: tint:1351
Change-Id: I41ee66b86cd9d912f3857e5377b660c50d035c6e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/73720
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
diff --git a/src/writer/glsl/generator_impl.cc b/src/writer/glsl/generator_impl.cc
index 8e2cc8e..6c83e58 100644
--- a/src/writer/glsl/generator_impl.cc
+++ b/src/writer/glsl/generator_impl.cc
@@ -1188,33 +1188,28 @@
switch (intrinsic->Type()) {
case sem::IntrinsicType::kTextureSample:
case sem::IntrinsicType::kTextureSampleBias:
- out << "texture(";
+ out << "texture";
break;
case sem::IntrinsicType::kTextureSampleLevel:
- out << "textureLod(";
+ out << "textureLod";
break;
case sem::IntrinsicType::kTextureGather:
case sem::IntrinsicType::kTextureGatherCompare:
- out << (intrinsic->Signature().IndexOf(sem::ParameterUsage::kOffset) < 0
- ? "textureGather("
- : "textureGatherOffset(");
+ out << "textureGather";
break;
case sem::IntrinsicType::kTextureSampleGrad:
- out << "textureGrad(";
+ out << "textureGrad";
break;
case sem::IntrinsicType::kTextureSampleCompare:
- out << "texture(";
- glsl_ret_width = 1;
- break;
case sem::IntrinsicType::kTextureSampleCompareLevel:
- out << "texture(";
+ out << "texture";
glsl_ret_width = 1;
break;
case sem::IntrinsicType::kTextureLoad:
- out << "texelFetch(";
+ out << "texelFetch";
break;
case sem::IntrinsicType::kTextureStore:
- out << "imageStore(";
+ out << "imageStore";
break;
default:
diagnostics_.add_error(
@@ -1224,6 +1219,12 @@
return false;
}
+ if (intrinsic->Signature().IndexOf(sem::ParameterUsage::kOffset) >= 0) {
+ out << "Offset";
+ }
+
+ out << "(";
+
if (!EmitExpression(out, texture))
return false;
@@ -1247,8 +1248,8 @@
}
}
- for (auto usage : {Usage::kDepthRef, Usage::kBias, Usage::kLevel, Usage::kDdx,
- Usage::kDdy, Usage::kSampleIndex, Usage::kOffset,
+ for (auto usage : {Usage::kDepthRef, Usage::kLevel, Usage::kDdx, Usage::kDdy,
+ Usage::kSampleIndex, Usage::kOffset, Usage::kBias,
Usage::kComponent, Usage::kValue}) {
if (auto* e = arg(usage)) {
out << ", ";
diff --git a/src/writer/glsl/generator_impl_intrinsic_texture_test.cc b/src/writer/glsl/generator_impl_intrinsic_texture_test.cc
index 1aca03e..56e6104 100644
--- a/src/writer/glsl/generator_impl_intrinsic_texture_test.cc
+++ b/src/writer/glsl/generator_impl_intrinsic_texture_test.cc
@@ -122,15 +122,15 @@
case ValidTextureOverload::kSample2dF32:
return R"(texture(tint_symbol, vec2(1.0f, 2.0f));)";
case ValidTextureOverload::kSample2dOffsetF32:
- return R"(texture(tint_symbol, vec2(1.0f, 2.0f), ivec2(3, 4));)";
+ return R"(textureOffset(tint_symbol, vec2(1.0f, 2.0f), ivec2(3, 4));)";
case ValidTextureOverload::kSample2dArrayF32:
return R"(texture(tint_symbol, vec3(1.0f, 2.0f, float(3)));)";
case ValidTextureOverload::kSample2dArrayOffsetF32:
- return R"(texture(tint_symbol, vec3(1.0f, 2.0f, float(3)), ivec2(4, 5));)";
+ return R"(textureOffset(tint_symbol, vec3(1.0f, 2.0f, float(3)), ivec2(4, 5));)";
case ValidTextureOverload::kSample3dF32:
return R"(texture(tint_symbol, vec3(1.0f, 2.0f, 3.0f));)";
case ValidTextureOverload::kSample3dOffsetF32:
- return R"(texture(tint_symbol, vec3(1.0f, 2.0f, 3.0f), ivec3(4, 5, 6));)";
+ return R"(textureOffset(tint_symbol, vec3(1.0f, 2.0f, 3.0f), ivec3(4, 5, 6));)";
case ValidTextureOverload::kSampleCubeF32:
return R"(texture(tint_symbol, vec3(1.0f, 2.0f, 3.0f));)";
case ValidTextureOverload::kSampleCubeArrayF32:
@@ -138,11 +138,11 @@
case ValidTextureOverload::kSampleDepth2dF32:
return R"(texture(tint_symbol, vec2(1.0f, 2.0f)).x;)";
case ValidTextureOverload::kSampleDepth2dOffsetF32:
- return R"(texture(tint_symbol, vec2(1.0f, 2.0f), ivec2(3, 4)).x;)";
+ return R"(textureOffset(tint_symbol, vec2(1.0f, 2.0f), ivec2(3, 4)).x;)";
case ValidTextureOverload::kSampleDepth2dArrayF32:
return R"(texture(tint_symbol, vec3(1.0f, 2.0f, float(3))).x;)";
case ValidTextureOverload::kSampleDepth2dArrayOffsetF32:
- return R"(texture(tint_symbol, vec3(1.0f, 2.0f, float(3)), ivec2(4, 5)).x;)";
+ return R"(textureOffset(tint_symbol, vec3(1.0f, 2.0f, float(3)), ivec2(4, 5)).x;)";
case ValidTextureOverload::kSampleDepthCubeF32:
return R"(texture(tint_symbol, vec3(1.0f, 2.0f, 3.0f)).x;)";
case ValidTextureOverload::kSampleDepthCubeArrayF32:
@@ -150,15 +150,15 @@
case ValidTextureOverload::kSampleBias2dF32:
return R"(texture(tint_symbol, vec2(1.0f, 2.0f), 3.0f);)";
case ValidTextureOverload::kSampleBias2dOffsetF32:
- return R"(texture(tint_symbol, vec2(1.0f, 2.0f), 3.0f, ivec2(4, 5));)";
+ return R"(textureOffset(tint_symbol, vec2(1.0f, 2.0f), ivec2(4, 5), 3.0f);)";
case ValidTextureOverload::kSampleBias2dArrayF32:
return R"(texture(tint_symbol, vec3(1.0f, 2.0f, float(4)), 3.0f);)";
case ValidTextureOverload::kSampleBias2dArrayOffsetF32:
- return R"(texture(tint_symbol, vec3(1.0f, 2.0f, float(3)), 4.0f, ivec2(5, 6));)";
+ return R"(textureOffset(tint_symbol, vec3(1.0f, 2.0f, float(3)), ivec2(5, 6), 4.0f);)";
case ValidTextureOverload::kSampleBias3dF32:
return R"(texture(tint_symbol, vec3(1.0f, 2.0f, 3.0f), 4.0f);)";
case ValidTextureOverload::kSampleBias3dOffsetF32:
- return R"(texture(tint_symbol, vec3(1.0f, 2.0f, 3.0f), 4.0f, ivec3(5, 6, 7));)";
+ return R"(textureOffset(tint_symbol, vec3(1.0f, 2.0f, 3.0f), ivec3(5, 6, 7), 4.0f);)";
case ValidTextureOverload::kSampleBiasCubeF32:
return R"(texture(tint_symbol, vec3(1.0f, 2.0f, 3.0f), 4.0f);)";
case ValidTextureOverload::kSampleBiasCubeArrayF32:
@@ -166,15 +166,15 @@
case ValidTextureOverload::kSampleLevel2dF32:
return R"(textureLod(tint_symbol, vec2(1.0f, 2.0f), 3.0f);)";
case ValidTextureOverload::kSampleLevel2dOffsetF32:
- return R"(textureLod(tint_symbol, vec2(1.0f, 2.0f), 3.0f, ivec2(4, 5));)";
+ return R"(textureLodOffset(tint_symbol, vec2(1.0f, 2.0f), 3.0f, ivec2(4, 5));)";
case ValidTextureOverload::kSampleLevel2dArrayF32:
return R"(textureLod(tint_symbol, vec3(1.0f, 2.0f, float(3)), 4.0f);)";
case ValidTextureOverload::kSampleLevel2dArrayOffsetF32:
- return R"(textureLod(tint_symbol, vec3(1.0f, 2.0f, float(3)), 4.0f, ivec2(5, 6));)";
+ return R"(textureLodOffset(tint_symbol, vec3(1.0f, 2.0f, float(3)), 4.0f, ivec2(5, 6));)";
case ValidTextureOverload::kSampleLevel3dF32:
return R"(textureLod(tint_symbol, vec3(1.0f, 2.0f, 3.0f), 4.0f);)";
case ValidTextureOverload::kSampleLevel3dOffsetF32:
- return R"(textureLod(tint_symbol, vec3(1.0f, 2.0f, 3.0f), 4.0f, ivec3(5, 6, 7));)";
+ return R"(textureLodOffset(tint_symbol, vec3(1.0f, 2.0f, 3.0f), 4.0f, ivec3(5, 6, 7));)";
case ValidTextureOverload::kSampleLevelCubeF32:
return R"(textureLod(tint_symbol, vec3(1.0f, 2.0f, 3.0f), 4.0f);)";
case ValidTextureOverload::kSampleLevelCubeArrayF32:
@@ -182,11 +182,11 @@
case ValidTextureOverload::kSampleLevelDepth2dF32:
return R"(textureLod(tint_symbol, vec2(1.0f, 2.0f), 3).x;)";
case ValidTextureOverload::kSampleLevelDepth2dOffsetF32:
- return R"(textureLod(tint_symbol, vec2(1.0f, 2.0f), 3, ivec2(4, 5)).x;)";
+ return R"(textureLodOffset(tint_symbol, vec2(1.0f, 2.0f), 3, ivec2(4, 5)).x;)";
case ValidTextureOverload::kSampleLevelDepth2dArrayF32:
return R"(textureLod(tint_symbol, vec3(1.0f, 2.0f, float(3)), 4).x;)";
case ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32:
- return R"(textureLod(tint_symbol, vec3(1.0f, 2.0f, float(3)), 4, ivec2(5, 6)).x;)";
+ return R"(textureLodOffset(tint_symbol, vec3(1.0f, 2.0f, float(3)), 4, ivec2(5, 6)).x;)";
case ValidTextureOverload::kSampleLevelDepthCubeF32:
return R"(textureLod(tint_symbol, vec3(1.0f, 2.0f, 3.0f), 4).x;)";
case ValidTextureOverload::kSampleLevelDepthCubeArrayF32:
@@ -194,15 +194,15 @@
case ValidTextureOverload::kSampleGrad2dF32:
return R"(textureGrad(tint_symbol, vec2(1.0f, 2.0f), vec2(3.0f, 4.0f), vec2(5.0f, 6.0f));)";
case ValidTextureOverload::kSampleGrad2dOffsetF32:
- return R"(textureGrad(tint_symbol, vec2(1.0f, 2.0f), vec2(3.0f, 4.0f), vec2(5.0f, 6.0f), ivec2(7, 7));)";
+ return R"(textureGradOffset(tint_symbol, vec2(1.0f, 2.0f), vec2(3.0f, 4.0f), vec2(5.0f, 6.0f), ivec2(7, 7));)";
case ValidTextureOverload::kSampleGrad2dArrayF32:
return R"(textureGrad(tint_symbol, vec3(1.0f, 2.0f, float(3)), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f));)";
case ValidTextureOverload::kSampleGrad2dArrayOffsetF32:
- return R"(textureGrad(tint_symbol, vec3(1.0f, 2.0f, float(3)), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f), ivec2(6, 7));)";
+ return R"(textureGradOffset(tint_symbol, vec3(1.0f, 2.0f, float(3)), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f), ivec2(6, 7));)";
case ValidTextureOverload::kSampleGrad3dF32:
return R"(textureGrad(tint_symbol, vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f));)";
case ValidTextureOverload::kSampleGrad3dOffsetF32:
- return R"(textureGrad(tint_symbol, vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f), ivec3(0, 1, 2));)";
+ return R"(textureGradOffset(tint_symbol, vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f), ivec3(0, 1, 2));)";
case ValidTextureOverload::kSampleGradCubeF32:
return R"(textureGrad(tint_symbol, vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f));)";
case ValidTextureOverload::kSampleGradCubeArrayF32:
@@ -210,11 +210,11 @@
case ValidTextureOverload::kSampleCompareDepth2dF32:
return R"(texture(tint_symbol, vec2(1.0f, 2.0f), 3.0f);)";
case ValidTextureOverload::kSampleCompareDepth2dOffsetF32:
- return R"(texture(tint_symbol, vec2(1.0f, 2.0f), 3.0f, ivec2(4, 5));)";
+ return R"(textureOffset(tint_symbol, vec2(1.0f, 2.0f), 3.0f, ivec2(4, 5));)";
case ValidTextureOverload::kSampleCompareDepth2dArrayF32:
return R"(texture(tint_symbol, vec3(1.0f, 2.0f, float(4)), 3.0f);)";
case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32:
- return R"(texture(tint_symbol, vec3(1.0f, 2.0f, float(4)), 3.0f, ivec2(5, 6));)";
+ return R"(textureOffset(tint_symbol, vec3(1.0f, 2.0f, float(4)), 3.0f, ivec2(5, 6));)";
case ValidTextureOverload::kSampleCompareDepthCubeF32:
return R"(texture(tint_symbol, vec3(1.0f, 2.0f, 3.0f), 4.0f);)";
case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
@@ -222,11 +222,11 @@
case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
return R"(texture(tint_symbol, vec2(1.0f, 2.0f), 3.0f);)";
case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
- return R"(texture(tint_symbol, vec2(1.0f, 2.0f), 3.0f, ivec2(4, 5));)";
+ return R"(textureOffset(tint_symbol, vec2(1.0f, 2.0f), 3.0f, ivec2(4, 5));)";
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
return R"(texture(tint_symbol, vec3(1.0f, 2.0f, float(4)), 3.0f);)";
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
- return R"(texture(tint_symbol, vec3(1.0f, 2.0f, float(4)), 3.0f, ivec2(5, 6));)";
+ return R"(textureOffset(tint_symbol, vec3(1.0f, 2.0f, float(4)), 3.0f, ivec2(5, 6));)";
case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
return R"(texture(tint_symbol, vec3(1.0f, 2.0f, 3.0f), 4.0f);)";
case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
diff --git a/test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.glsl b/test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.glsl
index 9c76023..beb2323 100644
--- a/test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSample/02aa9b.wgsl.expected.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
precision mediump float;
@@ -7,7 +5,7 @@
void textureSample_02aa9b() {
- vec4 res = texture(arg_0, vec3(0.0f, 0.0f, float(1)), ivec2(0, 0));
+ vec4 res = textureOffset(arg_0, vec3(0.0f, 0.0f, float(1)), ivec2(0, 0));
}
void fragment_main() {
@@ -19,11 +17,3 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'texture' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
diff --git a/test/intrinsics/gen/textureSample/100dc0.wgsl.expected.glsl b/test/intrinsics/gen/textureSample/100dc0.wgsl.expected.glsl
index db28188..e4db7a3 100644
--- a/test/intrinsics/gen/textureSample/100dc0.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSample/100dc0.wgsl.expected.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
precision mediump float;
@@ -7,7 +5,7 @@
void textureSample_100dc0() {
- vec4 res = texture(arg_0, vec3(0.0f, 0.0f, 0.0f), ivec3(0, 0, 0));
+ vec4 res = textureOffset(arg_0, vec3(0.0f, 0.0f, 0.0f), ivec3(0, 0, 0));
}
void fragment_main() {
@@ -19,11 +17,3 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'texture' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
diff --git a/test/intrinsics/gen/textureSample/667d76.wgsl.expected.glsl b/test/intrinsics/gen/textureSample/667d76.wgsl.expected.glsl
index 50c9125..a5776ac 100644
--- a/test/intrinsics/gen/textureSample/667d76.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSample/667d76.wgsl.expected.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
precision mediump float;
@@ -7,7 +5,7 @@
void textureSample_667d76() {
- float res = texture(arg_0, vec2(0.0f, 0.0f), ivec2(0, 0)).x;
+ float res = textureOffset(arg_0, vec2(0.0f, 0.0f), ivec2(0, 0)).x;
}
void fragment_main() {
@@ -19,10 +17,3 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'texture' : no matching overloaded function found
-ERROR: 0:8: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
diff --git a/test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.glsl b/test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.glsl
index de9813f..b75e5db 100644
--- a/test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSample/7c3baa.wgsl.expected.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
precision mediump float;
@@ -7,7 +5,7 @@
void textureSample_7c3baa() {
- vec4 res = texture(arg_0, vec2(0.0f, 0.0f), ivec2(0, 0));
+ vec4 res = textureOffset(arg_0, vec2(0.0f, 0.0f), ivec2(0, 0));
}
void fragment_main() {
@@ -19,11 +17,3 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'texture' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
diff --git a/test/intrinsics/gen/textureSample/8522e7.wgsl.expected.glsl b/test/intrinsics/gen/textureSample/8522e7.wgsl.expected.glsl
index 4770a5f..073841b 100644
--- a/test/intrinsics/gen/textureSample/8522e7.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSample/8522e7.wgsl.expected.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
precision mediump float;
@@ -7,7 +5,7 @@
void textureSample_8522e7() {
- float res = texture(arg_0, vec3(0.0f, 0.0f, float(1)), ivec2(0, 0)).x;
+ float res = textureOffset(arg_0, vec3(0.0f, 0.0f, float(1)), ivec2(0, 0)).x;
}
void fragment_main() {
@@ -19,10 +17,3 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'texture' : no matching overloaded function found
-ERROR: 0:8: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
diff --git a/test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.glsl b/test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.glsl
index 0bec9b8..ccf71c0 100644
--- a/test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSampleBias/65ac50.wgsl.expected.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
precision mediump float;
@@ -7,7 +5,7 @@
void textureSampleBias_65ac50() {
- vec4 res = texture(arg_0, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0, 0));
+ vec4 res = textureOffset(arg_0, vec3(0.0f, 0.0f, float(1)), ivec2(0, 0), 1.0f);
}
void fragment_main() {
@@ -19,11 +17,3 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'texture' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
diff --git a/test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.glsl b/test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.glsl
index 41a4646..e9eaaf4 100644
--- a/test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSampleBias/81c19a.wgsl.expected.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
precision mediump float;
@@ -7,7 +5,7 @@
void textureSampleBias_81c19a() {
- vec4 res = texture(arg_0, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
+ vec4 res = textureOffset(arg_0, vec2(0.0f, 0.0f), ivec2(0, 0), 1.0f);
}
void fragment_main() {
@@ -19,11 +17,3 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'texture' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
diff --git a/test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.glsl b/test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.glsl
index d774879..25c3507 100644
--- a/test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSampleBias/df91bb.wgsl.expected.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
precision mediump float;
@@ -7,7 +5,7 @@
void textureSampleBias_df91bb() {
- vec4 res = texture(arg_0, vec3(0.0f, 0.0f, 0.0f), 1.0f, ivec3(0, 0, 0));
+ vec4 res = textureOffset(arg_0, vec3(0.0f, 0.0f, 0.0f), ivec3(0, 0, 0), 1.0f);
}
void fragment_main() {
@@ -19,11 +17,3 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'texture' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
diff --git a/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.glsl b/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.glsl
index 33a587d..52f9d18 100644
--- a/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSampleCompare/25fcd1.wgsl.expected.glsl
@@ -7,7 +7,7 @@
void textureSampleCompare_25fcd1() {
- float res = texture(arg_0, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
+ float res = textureOffset(arg_0, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
}
void fragment_main() {
@@ -20,7 +20,7 @@
Error parsing GLSL shader:
-ERROR: 0:8: 'texture' : no matching overloaded function found
+ERROR: 0:8: 'textureOffset' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
diff --git a/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.glsl b/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.glsl
index 890afeb..c76e41e 100644
--- a/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSampleCompare/98b85c.wgsl.expected.glsl
@@ -7,7 +7,7 @@
void textureSampleCompare_98b85c() {
- float res = texture(arg_0, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0, 0));
+ float res = textureOffset(arg_0, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0, 0));
}
void fragment_main() {
@@ -20,7 +20,7 @@
Error parsing GLSL shader:
-ERROR: 0:8: 'texture' : no matching overloaded function found
+ERROR: 0:8: 'textureOffset' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.glsl b/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.glsl
index a95a718..ac11422 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/011a8f.wgsl.expected.glsl
@@ -7,7 +7,7 @@
void textureSampleCompareLevel_011a8f() {
- float res = texture(arg_0, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0, 0));
+ float res = textureOffset(arg_0, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0, 0));
}
struct tint_symbol {
@@ -34,7 +34,7 @@
Error parsing GLSL shader:
-ERROR: 0:8: 'texture' : no matching overloaded function found
+ERROR: 0:8: 'textureOffset' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
@@ -47,7 +47,7 @@
void textureSampleCompareLevel_011a8f() {
- float res = texture(arg_0, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0, 0));
+ float res = textureOffset(arg_0, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0, 0));
}
struct tint_symbol {
@@ -64,7 +64,7 @@
Error parsing GLSL shader:
-ERROR: 0:8: 'texture' : no matching overloaded function found
+ERROR: 0:8: 'textureOffset' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
@@ -77,7 +77,7 @@
void textureSampleCompareLevel_011a8f() {
- float res = texture(arg_0, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0, 0));
+ float res = textureOffset(arg_0, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0, 0));
}
struct tint_symbol {
@@ -95,7 +95,7 @@
Error parsing GLSL shader:
-ERROR: 0:8: 'texture' : no matching overloaded function found
+ERROR: 0:8: 'textureOffset' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
diff --git a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.glsl b/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.glsl
index b2d5096..228b5dd 100644
--- a/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSampleCompareLevel/f8121c.wgsl.expected.glsl
@@ -7,7 +7,7 @@
void textureSampleCompareLevel_f8121c() {
- float res = texture(arg_0, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
+ float res = textureOffset(arg_0, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
}
struct tint_symbol {
@@ -34,7 +34,7 @@
Error parsing GLSL shader:
-ERROR: 0:8: 'texture' : no matching overloaded function found
+ERROR: 0:8: 'textureOffset' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
@@ -47,7 +47,7 @@
void textureSampleCompareLevel_f8121c() {
- float res = texture(arg_0, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
+ float res = textureOffset(arg_0, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
}
struct tint_symbol {
@@ -64,7 +64,7 @@
Error parsing GLSL shader:
-ERROR: 0:8: 'texture' : no matching overloaded function found
+ERROR: 0:8: 'textureOffset' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
@@ -77,7 +77,7 @@
void textureSampleCompareLevel_f8121c() {
- float res = texture(arg_0, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
+ float res = textureOffset(arg_0, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
}
struct tint_symbol {
@@ -95,7 +95,7 @@
Error parsing GLSL shader:
-ERROR: 0:8: 'texture' : no matching overloaded function found
+ERROR: 0:8: 'textureOffset' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
diff --git a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.glsl b/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.glsl
index 97fc7d7..1a2c90c 100644
--- a/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSampleGrad/468f88.wgsl.expected.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
precision mediump float;
@@ -7,7 +5,7 @@
void textureSampleGrad_468f88() {
- vec4 res = textureGrad(arg_0, vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), ivec2(0, 0));
+ vec4 res = textureGradOffset(arg_0, vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), ivec2(0, 0));
}
struct tint_symbol {
@@ -33,14 +31,6 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureGrad' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
#version 310 es
precision mediump float;
@@ -48,7 +38,7 @@
void textureSampleGrad_468f88() {
- vec4 res = textureGrad(arg_0, vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), ivec2(0, 0));
+ vec4 res = textureGradOffset(arg_0, vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), ivec2(0, 0));
}
struct tint_symbol {
@@ -64,14 +54,6 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureGrad' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
#version 310 es
precision mediump float;
@@ -79,7 +61,7 @@
void textureSampleGrad_468f88() {
- vec4 res = textureGrad(arg_0, vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), ivec2(0, 0));
+ vec4 res = textureGradOffset(arg_0, vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), ivec2(0, 0));
}
struct tint_symbol {
@@ -96,11 +78,3 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureGrad' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
diff --git a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.glsl b/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.glsl
index 68389a9..627e86b 100644
--- a/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSampleGrad/872f00.wgsl.expected.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
precision mediump float;
@@ -7,7 +5,7 @@
void textureSampleGrad_872f00() {
- vec4 res = textureGrad(arg_0, vec3(0.0f, 0.0f, float(1)), vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), ivec2(0, 0));
+ vec4 res = textureGradOffset(arg_0, vec3(0.0f, 0.0f, float(1)), vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), ivec2(0, 0));
}
struct tint_symbol {
@@ -33,14 +31,6 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureGrad' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
#version 310 es
precision mediump float;
@@ -48,7 +38,7 @@
void textureSampleGrad_872f00() {
- vec4 res = textureGrad(arg_0, vec3(0.0f, 0.0f, float(1)), vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), ivec2(0, 0));
+ vec4 res = textureGradOffset(arg_0, vec3(0.0f, 0.0f, float(1)), vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), ivec2(0, 0));
}
struct tint_symbol {
@@ -64,14 +54,6 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureGrad' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
#version 310 es
precision mediump float;
@@ -79,7 +61,7 @@
void textureSampleGrad_872f00() {
- vec4 res = textureGrad(arg_0, vec3(0.0f, 0.0f, float(1)), vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), ivec2(0, 0));
+ vec4 res = textureGradOffset(arg_0, vec3(0.0f, 0.0f, float(1)), vec2(0.0f, 0.0f), vec2(0.0f, 0.0f), ivec2(0, 0));
}
struct tint_symbol {
@@ -96,11 +78,3 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureGrad' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
diff --git a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.glsl b/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.glsl
index e2bad29..50c3d24 100644
--- a/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSampleGrad/e9a2f7.wgsl.expected.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
precision mediump float;
@@ -7,7 +5,7 @@
void textureSampleGrad_e9a2f7() {
- vec4 res = textureGrad(arg_0, vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f), ivec3(0, 0, 0));
+ vec4 res = textureGradOffset(arg_0, vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f), ivec3(0, 0, 0));
}
struct tint_symbol {
@@ -33,14 +31,6 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureGrad' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
#version 310 es
precision mediump float;
@@ -48,7 +38,7 @@
void textureSampleGrad_e9a2f7() {
- vec4 res = textureGrad(arg_0, vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f), ivec3(0, 0, 0));
+ vec4 res = textureGradOffset(arg_0, vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f), ivec3(0, 0, 0));
}
struct tint_symbol {
@@ -64,14 +54,6 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureGrad' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
#version 310 es
precision mediump float;
@@ -79,7 +61,7 @@
void textureSampleGrad_e9a2f7() {
- vec4 res = textureGrad(arg_0, vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f), ivec3(0, 0, 0));
+ vec4 res = textureGradOffset(arg_0, vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f), vec3(0.0f, 0.0f, 0.0f), ivec3(0, 0, 0));
}
struct tint_symbol {
@@ -96,11 +78,3 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureGrad' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
diff --git a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.glsl b/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.glsl
index 1862a92..1ab5521 100644
--- a/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSampleLevel/47daa4.wgsl.expected.glsl
@@ -7,7 +7,7 @@
void textureSampleLevel_47daa4() {
- float res = textureLod(arg_0, vec2(0.0f, 0.0f), 0, ivec2(0, 0)).x;
+ float res = textureLodOffset(arg_0, vec2(0.0f, 0.0f), 0, ivec2(0, 0)).x;
}
struct tint_symbol {
@@ -34,7 +34,7 @@
Error parsing GLSL shader:
-ERROR: 0:8: 'textureLod' : no matching overloaded function found
+ERROR: 0:8: 'textureLodOffset' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
@@ -47,7 +47,7 @@
void textureSampleLevel_47daa4() {
- float res = textureLod(arg_0, vec2(0.0f, 0.0f), 0, ivec2(0, 0)).x;
+ float res = textureLodOffset(arg_0, vec2(0.0f, 0.0f), 0, ivec2(0, 0)).x;
}
struct tint_symbol {
@@ -64,7 +64,7 @@
Error parsing GLSL shader:
-ERROR: 0:8: 'textureLod' : no matching overloaded function found
+ERROR: 0:8: 'textureLodOffset' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
@@ -77,7 +77,7 @@
void textureSampleLevel_47daa4() {
- float res = textureLod(arg_0, vec2(0.0f, 0.0f), 0, ivec2(0, 0)).x;
+ float res = textureLodOffset(arg_0, vec2(0.0f, 0.0f), 0, ivec2(0, 0)).x;
}
struct tint_symbol {
@@ -95,7 +95,7 @@
Error parsing GLSL shader:
-ERROR: 0:8: 'textureLod' : no matching overloaded function found
+ERROR: 0:8: 'textureLodOffset' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
diff --git a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.glsl b/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.glsl
index a6d8d40..8d561bb 100644
--- a/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSampleLevel/690d95.wgsl.expected.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
precision mediump float;
@@ -7,7 +5,7 @@
void textureSampleLevel_690d95() {
- vec4 res = textureLod(arg_0, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
+ vec4 res = textureLodOffset(arg_0, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
}
struct tint_symbol {
@@ -33,14 +31,6 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureLod' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
#version 310 es
precision mediump float;
@@ -48,7 +38,7 @@
void textureSampleLevel_690d95() {
- vec4 res = textureLod(arg_0, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
+ vec4 res = textureLodOffset(arg_0, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
}
struct tint_symbol {
@@ -64,14 +54,6 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureLod' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
#version 310 es
precision mediump float;
@@ -79,7 +61,7 @@
void textureSampleLevel_690d95() {
- vec4 res = textureLod(arg_0, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
+ vec4 res = textureLodOffset(arg_0, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
}
struct tint_symbol {
@@ -96,11 +78,3 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureLod' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
diff --git a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.glsl b/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.glsl
index f35b44f..9efead9 100644
--- a/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSampleLevel/9bd37b.wgsl.expected.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
precision mediump float;
@@ -7,7 +5,7 @@
void textureSampleLevel_9bd37b() {
- vec4 res = textureLod(arg_0, vec3(0.0f, 0.0f, 0.0f), 1.0f, ivec3(0, 0, 0));
+ vec4 res = textureLodOffset(arg_0, vec3(0.0f, 0.0f, 0.0f), 1.0f, ivec3(0, 0, 0));
}
struct tint_symbol {
@@ -33,14 +31,6 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureLod' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
#version 310 es
precision mediump float;
@@ -48,7 +38,7 @@
void textureSampleLevel_9bd37b() {
- vec4 res = textureLod(arg_0, vec3(0.0f, 0.0f, 0.0f), 1.0f, ivec3(0, 0, 0));
+ vec4 res = textureLodOffset(arg_0, vec3(0.0f, 0.0f, 0.0f), 1.0f, ivec3(0, 0, 0));
}
struct tint_symbol {
@@ -64,14 +54,6 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureLod' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
#version 310 es
precision mediump float;
@@ -79,7 +61,7 @@
void textureSampleLevel_9bd37b() {
- vec4 res = textureLod(arg_0, vec3(0.0f, 0.0f, 0.0f), 1.0f, ivec3(0, 0, 0));
+ vec4 res = textureLodOffset(arg_0, vec3(0.0f, 0.0f, 0.0f), 1.0f, ivec3(0, 0, 0));
}
struct tint_symbol {
@@ -96,11 +78,3 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureLod' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
diff --git a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.glsl b/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.glsl
index 7e5d37e..59142f3 100644
--- a/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSampleLevel/a4af26.wgsl.expected.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
precision mediump float;
@@ -7,7 +5,7 @@
void textureSampleLevel_a4af26() {
- vec4 res = textureLod(arg_0, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0, 0));
+ vec4 res = textureLodOffset(arg_0, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0, 0));
}
struct tint_symbol {
@@ -33,14 +31,6 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureLod' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
#version 310 es
precision mediump float;
@@ -48,7 +38,7 @@
void textureSampleLevel_a4af26() {
- vec4 res = textureLod(arg_0, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0, 0));
+ vec4 res = textureLodOffset(arg_0, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0, 0));
}
struct tint_symbol {
@@ -64,14 +54,6 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureLod' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
#version 310 es
precision mediump float;
@@ -79,7 +61,7 @@
void textureSampleLevel_a4af26() {
- vec4 res = textureLod(arg_0, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0, 0));
+ vec4 res = textureLodOffset(arg_0, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0, 0));
}
struct tint_symbol {
@@ -96,11 +78,3 @@
}
-Error parsing GLSL shader:
-ERROR: 0:8: 'textureLod' : no matching overloaded function found
-ERROR: 0:8: '=' : cannot convert from ' const float' to ' temp mediump 4-component vector of float'
-ERROR: 0:8: '' : compilation terminated
-ERROR: 3 compilation errors. No code generated.
-
-
-
diff --git a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.glsl b/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.glsl
index 4940678..72dc47a 100644
--- a/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.glsl
+++ b/test/intrinsics/gen/textureSampleLevel/ba93b3.wgsl.expected.glsl
@@ -7,7 +7,7 @@
void textureSampleLevel_ba93b3() {
- float res = textureLod(arg_0, vec3(0.0f, 0.0f, float(1)), 0, ivec2(0, 0)).x;
+ float res = textureLodOffset(arg_0, vec3(0.0f, 0.0f, float(1)), 0, ivec2(0, 0)).x;
}
struct tint_symbol {
@@ -34,7 +34,7 @@
Error parsing GLSL shader:
-ERROR: 0:8: 'textureLod' : no matching overloaded function found
+ERROR: 0:8: 'textureLodOffset' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
@@ -47,7 +47,7 @@
void textureSampleLevel_ba93b3() {
- float res = textureLod(arg_0, vec3(0.0f, 0.0f, float(1)), 0, ivec2(0, 0)).x;
+ float res = textureLodOffset(arg_0, vec3(0.0f, 0.0f, float(1)), 0, ivec2(0, 0)).x;
}
struct tint_symbol {
@@ -64,7 +64,7 @@
Error parsing GLSL shader:
-ERROR: 0:8: 'textureLod' : no matching overloaded function found
+ERROR: 0:8: 'textureLodOffset' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
@@ -77,7 +77,7 @@
void textureSampleLevel_ba93b3() {
- float res = textureLod(arg_0, vec3(0.0f, 0.0f, float(1)), 0, ivec2(0, 0)).x;
+ float res = textureLodOffset(arg_0, vec3(0.0f, 0.0f, float(1)), 0, ivec2(0, 0)).x;
}
struct tint_symbol {
@@ -95,7 +95,7 @@
Error parsing GLSL shader:
-ERROR: 0:8: 'textureLod' : no matching overloaded function found
+ERROR: 0:8: 'textureLodOffset' : no matching overloaded function found
ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.