Update texture intrinsic writer tests for signed params

All unsigned texture intrinsic parameters were recently changed to signed: https://github.com/gpuweb/gpuweb/pull/1271

Update the writer tests to match. The spirv reader side of things will also need to be updated.

Bug: tint:391
Change-Id: I280f223f2556355f4b6538ae1ef446e33b017c9f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34820
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2020-12-08 19:39:34 +00:00 committed by Commit Bot service account
parent 195917c0be
commit 3982bb8c28
4 changed files with 165 additions and 173 deletions

View File

@ -74,7 +74,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
1.0f, // coords
2u); // array_index
2); // array_index
},
},
{
@ -130,7 +130,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1.f, 2.f), // coords
3u); // array_index
3); // array_index
},
},
{
@ -151,7 +151,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1.f, 2.f), // coords
3u, // array_index
3, // array_index
b->vec2<i32>(4, 5)); // offset
},
},
@ -225,7 +225,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec3<f32>(1.f, 2.f, 3.f), // coords
4u); // array_index
4); // array_index
},
},
{
@ -281,7 +281,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1.f, 2.f), // coords
3u); // array_index
3); // array_index
},
},
{
@ -302,7 +302,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1.f, 2.f), // coords
3u, // array_index
3, // array_index
b->vec2<i32>(4, 5)); // offset
},
},
@ -339,7 +339,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec3<f32>(1.f, 2.f, 3.f), // coords
4u); // array_index
4); // array_index
},
},
{
@ -400,7 +400,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1.f, 2.f), // coords
4u, // array_index
4, // array_index
3.f); // bias
},
},
@ -423,7 +423,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1.f, 2.f), // coords
3u, // array_index
3, // array_index
4.f, // bias
b->vec2<i32>(5, 6)); // offset
},
@ -505,7 +505,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec3<f32>(1.f, 2.f, 3.f), // coords
3u, // array_index
3, // array_index
4.f); // bias
},
},
@ -567,7 +567,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1.f, 2.f), // coords
3u, // array_index
3, // array_index
4.f); // level
},
},
@ -590,7 +590,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1.f, 2.f), // coords
3u, // array_index
3, // array_index
4.f, // level
b->vec2<i32>(5, 6)); // offset
},
@ -672,7 +672,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec3<f32>(1.f, 2.f, 3.f), // coords
4u, // array_index
4, // array_index
5.f); // level
},
},
@ -692,7 +692,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1.f, 2.f), // coords
3u); // level
3); // level
},
},
{
@ -713,7 +713,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1.f, 2.f), // coords
3u, // level
3, // level
b->vec2<i32>(4, 5)); // offset
},
},
@ -734,8 +734,8 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1.f, 2.f), // coords
3u, // array_index
4u); // level
3, // array_index
4); // level
},
},
{
@ -757,8 +757,8 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1.f, 2.f), // coords
3u, // array_index
4u, // level
3, // array_index
4, // level
b->vec2<i32>(5, 6)); // offset
},
},
@ -778,7 +778,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec3<f32>(1.f, 2.f, 3.f), // coords
4u); // level
4); // level
},
},
{
@ -798,8 +798,8 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec3<f32>(1.f, 2.f, 3.f), // coords
4u, // array_index
5u); // level
4, // array_index
5); // level
},
},
{
@ -865,7 +865,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1.f, 2.f), // coords
3u, // array_index
3, // array_index
b->vec2<f32>(4.f, 5.f), // ddx
b->vec2<f32>(6.f, 7.f)); // ddy
},
@ -890,7 +890,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1.f, 2.f), // coords
3u, // array_index
3, // array_index
b->vec2<f32>(4.f, 5.f), // ddx
b->vec2<f32>(6.f, 7.f), // ddy
b->vec2<i32>(8, 9)); // offset
@ -980,7 +980,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec3<f32>(1.f, 2.f, 3.f), // coords
4u, // array_index
4, // array_index
b->vec3<f32>(5.f, 6.f, 7.f), // ddx
b->vec3<f32>(8.f, 9.f, 10.f)); // ddy
},
@ -1043,7 +1043,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1.f, 2.f), // coords
4u, // array_index
4, // array_index
3.f); // depth_ref
},
},
@ -1066,7 +1066,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec2<f32>(1.f, 2.f), // coords
4u, // array_index
4, // array_index
3.f, // depth_ref
b->vec2<i32>(5, 6)); // offset
},
@ -1107,7 +1107,7 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
return b->ExprList("texture", // t
"sampler", // s
b->vec3<f32>(1.f, 2.f, 3.f), // coords
4u, // array_index
4, // array_index
5.f); // depth_ref
},
}};

View File

@ -34,15 +34,15 @@ std::string expected_texture_overload(
case ValidTextureOverload::kSample1dF32:
return R"(texture_tint_0.Sample(sampler_tint_0, 1.0f))";
case ValidTextureOverload::kSample1dArrayF32:
return R"(texture_tint_0.Sample(sampler_tint_0, float2(1.0f, float(2u))))";
return R"(texture_tint_0.Sample(sampler_tint_0, float2(1.0f, float(2))))";
case ValidTextureOverload::kSample2dF32:
return R"(texture_tint_0.Sample(sampler_tint_0, float2(1.0f, 2.0f)))";
case ValidTextureOverload::kSample2dOffsetF32:
return R"(texture_tint_0.Sample(sampler_tint_0, float2(1.0f, 2.0f), int2(3, 4)))";
case ValidTextureOverload::kSample2dArrayF32:
return R"(texture_tint_0.Sample(sampler_tint_0, float3(1.0f, 2.0f, float(3u))))";
return R"(texture_tint_0.Sample(sampler_tint_0, float3(1.0f, 2.0f, float(3))))";
case ValidTextureOverload::kSample2dArrayOffsetF32:
return R"(texture_tint_0.Sample(sampler_tint_0, float3(1.0f, 2.0f, float(3u)), int2(4, 5)))";
return R"(texture_tint_0.Sample(sampler_tint_0, float3(1.0f, 2.0f, float(3)), int2(4, 5)))";
case ValidTextureOverload::kSample3dF32:
return R"(texture_tint_0.Sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f)))";
case ValidTextureOverload::kSample3dOffsetF32:
@ -50,27 +50,27 @@ std::string expected_texture_overload(
case ValidTextureOverload::kSampleCubeF32:
return R"(texture_tint_0.Sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f)))";
case ValidTextureOverload::kSampleCubeArrayF32:
return R"(texture_tint_0.Sample(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(4u))))";
return R"(texture_tint_0.Sample(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(4))))";
case ValidTextureOverload::kSampleDepth2dF32:
return R"(texture_tint_0.Sample(sampler_tint_0, float2(1.0f, 2.0f)))";
case ValidTextureOverload::kSampleDepth2dOffsetF32:
return R"(texture_tint_0.Sample(sampler_tint_0, float2(1.0f, 2.0f), int2(3, 4)))";
case ValidTextureOverload::kSampleDepth2dArrayF32:
return R"(texture_tint_0.Sample(sampler_tint_0, float3(1.0f, 2.0f, float(3u))))";
return R"(texture_tint_0.Sample(sampler_tint_0, float3(1.0f, 2.0f, float(3))))";
case ValidTextureOverload::kSampleDepth2dArrayOffsetF32:
return R"(texture_tint_0.Sample(sampler_tint_0, float3(1.0f, 2.0f, float(3u)), int2(4, 5)))";
return R"(texture_tint_0.Sample(sampler_tint_0, float3(1.0f, 2.0f, float(3)), int2(4, 5)))";
case ValidTextureOverload::kSampleDepthCubeF32:
return R"(texture_tint_0.Sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f)))";
case ValidTextureOverload::kSampleDepthCubeArrayF32:
return R"(texture_tint_0.Sample(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(4u))))";
return R"(texture_tint_0.Sample(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(4))))";
case ValidTextureOverload::kSampleBias2dF32:
return R"(texture_tint_0.SampleBias(sampler_tint_0, float2(1.0f, 2.0f), 3.0f))";
case ValidTextureOverload::kSampleBias2dOffsetF32:
return R"(texture_tint_0.SampleBias(sampler_tint_0, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))";
case ValidTextureOverload::kSampleBias2dArrayF32:
return R"(texture_tint_0.SampleBias(sampler_tint_0, float3(1.0f, 2.0f, float(4u)), 3.0f))";
return R"(texture_tint_0.SampleBias(sampler_tint_0, float3(1.0f, 2.0f, float(4)), 3.0f))";
case ValidTextureOverload::kSampleBias2dArrayOffsetF32:
return R"(texture_tint_0.SampleBias(sampler_tint_0, float3(1.0f, 2.0f, float(3u)), 4.0f, int2(5, 6)))";
return R"(texture_tint_0.SampleBias(sampler_tint_0, float3(1.0f, 2.0f, float(3)), 4.0f, int2(5, 6)))";
case ValidTextureOverload::kSampleBias3dF32:
return R"(texture_tint_0.SampleBias(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4.0f))";
case ValidTextureOverload::kSampleBias3dOffsetF32:
@ -78,15 +78,15 @@ std::string expected_texture_overload(
case ValidTextureOverload::kSampleBiasCubeF32:
return R"(texture_tint_0.SampleBias(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4.0f))";
case ValidTextureOverload::kSampleBiasCubeArrayF32:
return R"(texture_tint_0.SampleBias(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(3u)), 4.0f))";
return R"(texture_tint_0.SampleBias(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(3)), 4.0f))";
case ValidTextureOverload::kSampleLevel2dF32:
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float2(1.0f, 2.0f), 3.0f))";
case ValidTextureOverload::kSampleLevel2dOffsetF32:
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))";
case ValidTextureOverload::kSampleLevel2dArrayF32:
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float3(1.0f, 2.0f, float(3u)), 4.0f))";
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float3(1.0f, 2.0f, float(3)), 4.0f))";
case ValidTextureOverload::kSampleLevel2dArrayOffsetF32:
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float3(1.0f, 2.0f, float(3u)), 4.0f, int2(5, 6)))";
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float3(1.0f, 2.0f, float(3)), 4.0f, int2(5, 6)))";
case ValidTextureOverload::kSampleLevel3dF32:
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4.0f))";
case ValidTextureOverload::kSampleLevel3dOffsetF32:
@ -94,27 +94,27 @@ std::string expected_texture_overload(
case ValidTextureOverload::kSampleLevelCubeF32:
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4.0f))";
case ValidTextureOverload::kSampleLevelCubeArrayF32:
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(4u)), 5.0f))";
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f))";
case ValidTextureOverload::kSampleLevelDepth2dF32:
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float2(1.0f, 2.0f), 3u))";
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float2(1.0f, 2.0f), 3))";
case ValidTextureOverload::kSampleLevelDepth2dOffsetF32:
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float2(1.0f, 2.0f), 3u, int2(4, 5)))";
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float2(1.0f, 2.0f), 3, int2(4, 5)))";
case ValidTextureOverload::kSampleLevelDepth2dArrayF32:
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float3(1.0f, 2.0f, float(3u)), 4u))";
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float3(1.0f, 2.0f, float(3)), 4))";
case ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32:
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float3(1.0f, 2.0f, float(3u)), 4u, int2(5, 6)))";
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float3(1.0f, 2.0f, float(3)), 4, int2(5, 6)))";
case ValidTextureOverload::kSampleLevelDepthCubeF32:
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4u))";
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4))";
case ValidTextureOverload::kSampleLevelDepthCubeArrayF32:
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(4u)), 5u))";
return R"(texture_tint_0.SampleLevel(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(4)), 5))";
case ValidTextureOverload::kSampleGrad2dF32:
return R"(texture_tint_0.SampleGrad(sampler_tint_0, float2(1.0f, 2.0f), float2(3.0f, 4.0f), float2(5.0f, 6.0f)))";
case ValidTextureOverload::kSampleGrad2dOffsetF32:
return R"(texture_tint_0.SampleGrad(sampler_tint_0, float2(1.0f, 2.0f), float2(3.0f, 4.0f), float2(5.0f, 6.0f), int2(7, 8)))";
case ValidTextureOverload::kSampleGrad2dArrayF32:
return R"(texture_tint_0.SampleGrad(sampler_tint_0, float3(1.0f, 2.0f, float(3u)), float2(4.0f, 5.0f), float2(6.0f, 7.0f)))";
return R"(texture_tint_0.SampleGrad(sampler_tint_0, float3(1.0f, 2.0f, float(3)), float2(4.0f, 5.0f), float2(6.0f, 7.0f)))";
case ValidTextureOverload::kSampleGrad2dArrayOffsetF32:
return R"(texture_tint_0.SampleGrad(sampler_tint_0, float3(1.0f, 2.0f, float(3u)), float2(4.0f, 5.0f), float2(6.0f, 7.0f), int2(8, 9)))";
return R"(texture_tint_0.SampleGrad(sampler_tint_0, float3(1.0f, 2.0f, float(3)), float2(4.0f, 5.0f), float2(6.0f, 7.0f), int2(8, 9)))";
case ValidTextureOverload::kSampleGrad3dF32:
return R"(texture_tint_0.SampleGrad(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f)))";
case ValidTextureOverload::kSampleGrad3dOffsetF32:
@ -122,19 +122,19 @@ std::string expected_texture_overload(
case ValidTextureOverload::kSampleGradCubeF32:
return R"(texture_tint_0.SampleGrad(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f)))";
case ValidTextureOverload::kSampleGradCubeArrayF32:
return R"(texture_tint_0.SampleGrad(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(4u)), float3(5.0f, 6.0f, 7.0f), float3(8.0f, 9.0f, 10.0f)))";
return R"(texture_tint_0.SampleGrad(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(4)), float3(5.0f, 6.0f, 7.0f), float3(8.0f, 9.0f, 10.0f)))";
case ValidTextureOverload::kSampleGradDepth2dF32:
return R"(texture_tint_0.SampleCmp(sampler_tint_0, float2(1.0f, 2.0f), 3.0f))";
case ValidTextureOverload::kSampleGradDepth2dOffsetF32:
return R"(texture_tint_0.SampleCmp(sampler_tint_0, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))";
case ValidTextureOverload::kSampleGradDepth2dArrayF32:
return R"(texture_tint_0.SampleCmp(sampler_tint_0, float3(1.0f, 2.0f, float(4u)), 3.0f))";
return R"(texture_tint_0.SampleCmp(sampler_tint_0, float3(1.0f, 2.0f, float(4)), 3.0f))";
case ValidTextureOverload::kSampleGradDepth2dArrayOffsetF32:
return R"(texture_tint_0.SampleCmp(sampler_tint_0, float3(1.0f, 2.0f, float(4u)), 3.0f, int2(5, 6)))";
return R"(texture_tint_0.SampleCmp(sampler_tint_0, float3(1.0f, 2.0f, float(4)), 3.0f, int2(5, 6)))";
case ValidTextureOverload::kSampleGradDepthCubeF32:
return R"(texture_tint_0.SampleCmp(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4.0f))";
case ValidTextureOverload::kSampleGradDepthCubeArrayF32:
return R"(texture_tint_0.SampleCmp(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(4u)), 5.0f))";
return R"(texture_tint_0.SampleCmp(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f))";
}
return "<unmatched texture overload>";
} // LINT - Ignore the length of this function

View File

@ -34,15 +34,15 @@ std::string expected_texture_overload(
case ValidTextureOverload::kSample1dF32:
return R"(texture_tint_0.sample(sampler_tint_0, 1.0f))";
case ValidTextureOverload::kSample1dArrayF32:
return R"(texture_tint_0.sample(sampler_tint_0, 1.0f, 2u))";
return R"(texture_tint_0.sample(sampler_tint_0, 1.0f, 2))";
case ValidTextureOverload::kSample2dF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f)))";
case ValidTextureOverload::kSample2dOffsetF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), int2(3, 4)))";
case ValidTextureOverload::kSample2dArrayF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3u))";
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3))";
case ValidTextureOverload::kSample2dArrayOffsetF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3u, int2(4, 5)))";
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3, int2(4, 5)))";
case ValidTextureOverload::kSample3dF32:
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f)))";
case ValidTextureOverload::kSample3dOffsetF32:
@ -50,27 +50,27 @@ std::string expected_texture_overload(
case ValidTextureOverload::kSampleCubeF32:
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f)))";
case ValidTextureOverload::kSampleCubeArrayF32:
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4u))";
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4))";
case ValidTextureOverload::kSampleDepth2dF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f)))";
case ValidTextureOverload::kSampleDepth2dOffsetF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), int2(3, 4)))";
case ValidTextureOverload::kSampleDepth2dArrayF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3u))";
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3))";
case ValidTextureOverload::kSampleDepth2dArrayOffsetF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3u, int2(4, 5)))";
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3, int2(4, 5)))";
case ValidTextureOverload::kSampleDepthCubeF32:
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f)))";
case ValidTextureOverload::kSampleDepthCubeArrayF32:
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4u))";
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4))";
case ValidTextureOverload::kSampleBias2dF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), bias(3.0f)))";
case ValidTextureOverload::kSampleBias2dOffsetF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), bias(3.0f), int2(4, 5)))";
case ValidTextureOverload::kSampleBias2dArrayF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 4u, bias(3.0f)))";
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 4, bias(3.0f)))";
case ValidTextureOverload::kSampleBias2dArrayOffsetF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3u, bias(4.0f), int2(5, 6)))";
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3, bias(4.0f), int2(5, 6)))";
case ValidTextureOverload::kSampleBias3dF32:
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), bias(4.0f)))";
case ValidTextureOverload::kSampleBias3dOffsetF32:
@ -78,15 +78,15 @@ std::string expected_texture_overload(
case ValidTextureOverload::kSampleBiasCubeF32:
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), bias(4.0f)))";
case ValidTextureOverload::kSampleBiasCubeArrayF32:
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 3u, bias(4.0f)))";
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 3, bias(4.0f)))";
case ValidTextureOverload::kSampleLevel2dF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), level(3.0f)))";
case ValidTextureOverload::kSampleLevel2dOffsetF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), level(3.0f), int2(4, 5)))";
case ValidTextureOverload::kSampleLevel2dArrayF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3u, level(4.0f)))";
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3, level(4.0f)))";
case ValidTextureOverload::kSampleLevel2dArrayOffsetF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3u, level(4.0f), int2(5, 6)))";
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3, level(4.0f), int2(5, 6)))";
case ValidTextureOverload::kSampleLevel3dF32:
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), level(4.0f)))";
case ValidTextureOverload::kSampleLevel3dOffsetF32:
@ -94,27 +94,27 @@ std::string expected_texture_overload(
case ValidTextureOverload::kSampleLevelCubeF32:
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), level(4.0f)))";
case ValidTextureOverload::kSampleLevelCubeArrayF32:
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4u, level(5.0f)))";
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4, level(5.0f)))";
case ValidTextureOverload::kSampleLevelDepth2dF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), level(3u)))";
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), level(3)))";
case ValidTextureOverload::kSampleLevelDepth2dOffsetF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), level(3u), int2(4, 5)))";
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), level(3), int2(4, 5)))";
case ValidTextureOverload::kSampleLevelDepth2dArrayF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3u, level(4u)))";
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3, level(4)))";
case ValidTextureOverload::kSampleLevelDepth2dArrayOffsetF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3u, level(4u), int2(5, 6)))";
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3, level(4), int2(5, 6)))";
case ValidTextureOverload::kSampleLevelDepthCubeF32:
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), level(4u)))";
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), level(4)))";
case ValidTextureOverload::kSampleLevelDepthCubeArrayF32:
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4u, level(5u)))";
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4, level(5)))";
case ValidTextureOverload::kSampleGrad2dF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), gradient2d(float2(3.0f, 4.0f), float2(5.0f, 6.0f))))";
case ValidTextureOverload::kSampleGrad2dOffsetF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), gradient2d(float2(3.0f, 4.0f), float2(5.0f, 6.0f)), int2(7, 8)))";
case ValidTextureOverload::kSampleGrad2dArrayF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3u, gradient2d(float2(4.0f, 5.0f), float2(6.0f, 7.0f))))";
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3, gradient2d(float2(4.0f, 5.0f), float2(6.0f, 7.0f))))";
case ValidTextureOverload::kSampleGrad2dArrayOffsetF32:
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3u, gradient2d(float2(4.0f, 5.0f), float2(6.0f, 7.0f)), int2(8, 9)))";
return R"(texture_tint_0.sample(sampler_tint_0, float2(1.0f, 2.0f), 3, gradient2d(float2(4.0f, 5.0f), float2(6.0f, 7.0f)), int2(8, 9)))";
case ValidTextureOverload::kSampleGrad3dF32:
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), gradient3d(float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f))))";
case ValidTextureOverload::kSampleGrad3dOffsetF32:
@ -122,19 +122,19 @@ std::string expected_texture_overload(
case ValidTextureOverload::kSampleGradCubeF32:
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), gradientcube(float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f))))";
case ValidTextureOverload::kSampleGradCubeArrayF32:
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4u, gradientcube(float3(5.0f, 6.0f, 7.0f), float3(8.0f, 9.0f, 10.0f))))";
return R"(texture_tint_0.sample(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4, gradientcube(float3(5.0f, 6.0f, 7.0f), float3(8.0f, 9.0f, 10.0f))))";
case ValidTextureOverload::kSampleGradDepth2dF32:
return R"(texture_tint_0.sample_compare(sampler_tint_0, float2(1.0f, 2.0f), 3.0f))";
case ValidTextureOverload::kSampleGradDepth2dOffsetF32:
return R"(texture_tint_0.sample_compare(sampler_tint_0, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))";
case ValidTextureOverload::kSampleGradDepth2dArrayF32:
return R"(texture_tint_0.sample_compare(sampler_tint_0, float2(1.0f, 2.0f), 4u, 3.0f))";
return R"(texture_tint_0.sample_compare(sampler_tint_0, float2(1.0f, 2.0f), 4, 3.0f))";
case ValidTextureOverload::kSampleGradDepth2dArrayOffsetF32:
return R"(texture_tint_0.sample_compare(sampler_tint_0, float2(1.0f, 2.0f), 4u, 3.0f, int2(5, 6)))";
return R"(texture_tint_0.sample_compare(sampler_tint_0, float2(1.0f, 2.0f), 4, 3.0f, int2(5, 6)))";
case ValidTextureOverload::kSampleGradDepthCubeF32:
return R"(texture_tint_0.sample_compare(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4.0f))";
case ValidTextureOverload::kSampleGradDepthCubeArrayF32:
return R"(texture_tint_0.sample_compare(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4u, 5.0f))";
return R"(texture_tint_0.sample_compare(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4, 5.0f))";
}
return "<unmatched texture overload>";
} // LINT - Ignore the length of this function

View File

@ -71,14 +71,14 @@ expected_texture_overload_spirv expected_texture_overload(
%12 = OpTypeSampledImage %3
%14 = OpTypeVector %4 2
%15 = OpConstant %4 1
%17 = OpTypeInt 32 0
%17 = OpTypeInt 32 1
%18 = OpConstant %17 2
)",
R"(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
%16 = OpConvertUToF %4 %18
%16 = OpConvertSToF %4 %18
%19 = OpCompositeConstruct %14 %15 %16
%8 = OpImageSampleImplicitLod %9 %13 %19
)"};
@ -148,14 +148,14 @@ expected_texture_overload_spirv expected_texture_overload(
%14 = OpTypeVector %4 3
%15 = OpConstant %4 1
%16 = OpConstant %4 2
%18 = OpTypeInt 32 0
%18 = OpTypeInt 32 1
%19 = OpConstant %18 3
)",
R"(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
%17 = OpConvertUToF %4 %19
%17 = OpConvertSToF %4 %19
%20 = OpCompositeConstruct %14 %15 %16 %17
%8 = OpImageSampleImplicitLod %9 %13 %20
)"};
@ -174,21 +174,20 @@ expected_texture_overload_spirv expected_texture_overload(
%14 = OpTypeVector %4 3
%15 = OpConstant %4 1
%16 = OpConstant %4 2
%18 = OpTypeInt 32 0
%18 = OpTypeInt 32 1
%19 = OpConstant %18 3
%22 = OpTypeInt 32 1
%21 = OpTypeVector %22 2
%23 = OpConstant %22 4
%24 = OpConstant %22 5
%25 = OpConstantComposite %21 %23 %24
%21 = OpTypeVector %18 2
%22 = OpConstant %18 4
%23 = OpConstant %18 5
%24 = OpConstantComposite %21 %22 %23
)",
R"(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
%17 = OpConvertUToF %4 %19
%17 = OpConvertSToF %4 %19
%20 = OpCompositeConstruct %14 %15 %16 %17
%8 = OpImageSampleImplicitLod %9 %13 %20 Offset %25
%8 = OpImageSampleImplicitLod %9 %13 %20 Offset %24
)"};
case ValidTextureOverload::kSample3dF32:
return {
@ -283,14 +282,14 @@ expected_texture_overload_spirv expected_texture_overload(
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%16 = OpConstant %4 3
%18 = OpTypeInt 32 0
%18 = OpTypeInt 32 1
%19 = OpConstant %18 4
)",
R"(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
%17 = OpConvertUToF %4 %19
%17 = OpConvertSToF %4 %19
%20 = OpCompositeConstruct %9 %14 %15 %16 %17
%8 = OpImageSampleImplicitLod %9 %13 %20
)"};
@ -357,14 +356,14 @@ expected_texture_overload_spirv expected_texture_overload(
%13 = OpTypeVector %4 3
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%17 = OpTypeInt 32 0
%17 = OpTypeInt 32 1
%18 = OpConstant %17 3
)",
R"(
%9 = OpLoad %7 %5
%10 = OpLoad %3 %1
%12 = OpSampledImage %11 %10 %9
%16 = OpConvertUToF %4 %18
%16 = OpConvertSToF %4 %18
%19 = OpCompositeConstruct %13 %14 %15 %16
%8 = OpImageSampleImplicitLod %4 %12 %19
)"};
@ -382,21 +381,20 @@ expected_texture_overload_spirv expected_texture_overload(
%13 = OpTypeVector %4 3
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%17 = OpTypeInt 32 0
%17 = OpTypeInt 32 1
%18 = OpConstant %17 3
%21 = OpTypeInt 32 1
%20 = OpTypeVector %21 2
%22 = OpConstant %21 4
%23 = OpConstant %21 5
%24 = OpConstantComposite %20 %22 %23
%20 = OpTypeVector %17 2
%21 = OpConstant %17 4
%22 = OpConstant %17 5
%23 = OpConstantComposite %20 %21 %22
)",
R"(
%9 = OpLoad %7 %5
%10 = OpLoad %3 %1
%12 = OpSampledImage %11 %10 %9
%16 = OpConvertUToF %4 %18
%16 = OpConvertSToF %4 %18
%19 = OpCompositeConstruct %13 %14 %15 %16
%8 = OpImageSampleImplicitLod %4 %12 %19 Offset %24
%8 = OpImageSampleImplicitLod %4 %12 %19 Offset %23
)"};
case ValidTextureOverload::kSampleDepthCubeF32:
return {
@ -436,14 +434,14 @@ expected_texture_overload_spirv expected_texture_overload(
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%16 = OpConstant %4 3
%18 = OpTypeInt 32 0
%18 = OpTypeInt 32 1
%19 = OpConstant %18 4
)",
R"(
%9 = OpLoad %7 %5
%10 = OpLoad %3 %1
%12 = OpSampledImage %11 %10 %9
%17 = OpConvertUToF %4 %19
%17 = OpConvertSToF %4 %19
%20 = OpCompositeConstruct %13 %14 %15 %16 %17
%8 = OpImageSampleImplicitLod %4 %12 %20
)"};
@ -515,7 +513,7 @@ expected_texture_overload_spirv expected_texture_overload(
%14 = OpTypeVector %4 3
%15 = OpConstant %4 1
%16 = OpConstant %4 2
%18 = OpTypeInt 32 0
%18 = OpTypeInt 32 1
%19 = OpConstant %18 4
%21 = OpConstant %4 3
)",
@ -523,7 +521,7 @@ expected_texture_overload_spirv expected_texture_overload(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
%17 = OpConvertUToF %4 %19
%17 = OpConvertSToF %4 %19
%20 = OpCompositeConstruct %14 %15 %16 %17
%8 = OpImageSampleImplicitLod %9 %13 %20 Bias %21
)"};
@ -542,22 +540,21 @@ expected_texture_overload_spirv expected_texture_overload(
%14 = OpTypeVector %4 3
%15 = OpConstant %4 1
%16 = OpConstant %4 2
%18 = OpTypeInt 32 0
%18 = OpTypeInt 32 1
%19 = OpConstant %18 3
%21 = OpConstant %4 4
%23 = OpTypeInt 32 1
%22 = OpTypeVector %23 2
%24 = OpConstant %23 5
%25 = OpConstant %23 6
%26 = OpConstantComposite %22 %24 %25
%22 = OpTypeVector %18 2
%23 = OpConstant %18 5
%24 = OpConstant %18 6
%25 = OpConstantComposite %22 %23 %24
)",
R"(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
%17 = OpConvertUToF %4 %19
%17 = OpConvertSToF %4 %19
%20 = OpCompositeConstruct %14 %15 %16 %17
%8 = OpImageSampleImplicitLod %9 %13 %20 Bias|Offset %21 %26
%8 = OpImageSampleImplicitLod %9 %13 %20 Bias|Offset %21 %25
)"};
case ValidTextureOverload::kSampleBias3dF32:
return {
@ -655,7 +652,7 @@ expected_texture_overload_spirv expected_texture_overload(
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%16 = OpConstant %4 3
%18 = OpTypeInt 32 0
%18 = OpTypeInt 32 1
%19 = OpConstant %18 3
%21 = OpConstant %4 4
)",
@ -663,7 +660,7 @@ expected_texture_overload_spirv expected_texture_overload(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
%17 = OpConvertUToF %4 %19
%17 = OpConvertSToF %4 %19
%20 = OpCompositeConstruct %9 %14 %15 %16 %17
%8 = OpImageSampleImplicitLod %9 %13 %20 Bias %21
)"};
@ -735,7 +732,7 @@ expected_texture_overload_spirv expected_texture_overload(
%14 = OpTypeVector %4 3
%15 = OpConstant %4 1
%16 = OpConstant %4 2
%18 = OpTypeInt 32 0
%18 = OpTypeInt 32 1
%19 = OpConstant %18 3
%21 = OpConstant %4 4
)",
@ -743,7 +740,7 @@ expected_texture_overload_spirv expected_texture_overload(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
%17 = OpConvertUToF %4 %19
%17 = OpConvertSToF %4 %19
%20 = OpCompositeConstruct %14 %15 %16 %17
%8 = OpImageSampleExplicitLod %9 %13 %20 Lod %21
)"};
@ -762,22 +759,21 @@ expected_texture_overload_spirv expected_texture_overload(
%14 = OpTypeVector %4 3
%15 = OpConstant %4 1
%16 = OpConstant %4 2
%18 = OpTypeInt 32 0
%18 = OpTypeInt 32 1
%19 = OpConstant %18 3
%21 = OpConstant %4 4
%23 = OpTypeInt 32 1
%22 = OpTypeVector %23 2
%24 = OpConstant %23 5
%25 = OpConstant %23 6
%26 = OpConstantComposite %22 %24 %25
%22 = OpTypeVector %18 2
%23 = OpConstant %18 5
%24 = OpConstant %18 6
%25 = OpConstantComposite %22 %23 %24
)",
R"(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
%17 = OpConvertUToF %4 %19
%17 = OpConvertSToF %4 %19
%20 = OpCompositeConstruct %14 %15 %16 %17
%8 = OpImageSampleExplicitLod %9 %13 %20 Lod|Offset %21 %26
%8 = OpImageSampleExplicitLod %9 %13 %20 Lod|Offset %21 %25
)"};
case ValidTextureOverload::kSampleLevel3dF32:
return {
@ -875,7 +871,7 @@ expected_texture_overload_spirv expected_texture_overload(
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%16 = OpConstant %4 3
%18 = OpTypeInt 32 0
%18 = OpTypeInt 32 1
%19 = OpConstant %18 4
%21 = OpConstant %4 5
)",
@ -883,7 +879,7 @@ expected_texture_overload_spirv expected_texture_overload(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
%17 = OpConvertUToF %4 %19
%17 = OpConvertSToF %4 %19
%20 = OpCompositeConstruct %9 %14 %15 %16 %17
%8 = OpImageSampleExplicitLod %9 %13 %20 Lod %21
)"};
@ -902,7 +898,7 @@ expected_texture_overload_spirv expected_texture_overload(
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%16 = OpConstantComposite %13 %14 %15
%17 = OpTypeInt 32 0
%17 = OpTypeInt 32 1
%18 = OpConstant %17 3
)",
R"(
@ -926,19 +922,18 @@ expected_texture_overload_spirv expected_texture_overload(
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%16 = OpConstantComposite %13 %14 %15
%17 = OpTypeInt 32 0
%17 = OpTypeInt 32 1
%18 = OpConstant %17 3
%20 = OpTypeInt 32 1
%19 = OpTypeVector %20 2
%21 = OpConstant %20 4
%22 = OpConstant %20 5
%23 = OpConstantComposite %19 %21 %22
%19 = OpTypeVector %17 2
%20 = OpConstant %17 4
%21 = OpConstant %17 5
%22 = OpConstantComposite %19 %20 %21
)",
R"(
%9 = OpLoad %7 %5
%10 = OpLoad %3 %1
%12 = OpSampledImage %11 %10 %9
%8 = OpImageSampleExplicitLod %4 %12 %16 Lod|Offset %18 %23
%8 = OpImageSampleExplicitLod %4 %12 %16 Lod|Offset %18 %22
)"};
case ValidTextureOverload::kSampleLevelDepth2dArrayF32:
return {
@ -954,7 +949,7 @@ expected_texture_overload_spirv expected_texture_overload(
%13 = OpTypeVector %4 3
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%17 = OpTypeInt 32 0
%17 = OpTypeInt 32 1
%18 = OpConstant %17 3
%20 = OpConstant %17 4
)",
@ -962,7 +957,7 @@ expected_texture_overload_spirv expected_texture_overload(
%9 = OpLoad %7 %5
%10 = OpLoad %3 %1
%12 = OpSampledImage %11 %10 %9
%16 = OpConvertUToF %4 %18
%16 = OpConvertSToF %4 %18
%19 = OpCompositeConstruct %13 %14 %15 %16
%8 = OpImageSampleExplicitLod %4 %12 %19 Lod %20
)"};
@ -980,22 +975,21 @@ expected_texture_overload_spirv expected_texture_overload(
%13 = OpTypeVector %4 3
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%17 = OpTypeInt 32 0
%17 = OpTypeInt 32 1
%18 = OpConstant %17 3
%20 = OpConstant %17 4
%22 = OpTypeInt 32 1
%21 = OpTypeVector %22 2
%23 = OpConstant %22 5
%24 = OpConstant %22 6
%25 = OpConstantComposite %21 %23 %24
%21 = OpTypeVector %17 2
%22 = OpConstant %17 5
%23 = OpConstant %17 6
%24 = OpConstantComposite %21 %22 %23
)",
R"(
%9 = OpLoad %7 %5
%10 = OpLoad %3 %1
%12 = OpSampledImage %11 %10 %9
%16 = OpConvertUToF %4 %18
%16 = OpConvertSToF %4 %18
%19 = OpCompositeConstruct %13 %14 %15 %16
%8 = OpImageSampleExplicitLod %4 %12 %19 Lod|Offset %20 %25
%8 = OpImageSampleExplicitLod %4 %12 %19 Lod|Offset %20 %24
)"};
case ValidTextureOverload::kSampleLevelDepthCubeF32:
return {
@ -1013,7 +1007,7 @@ expected_texture_overload_spirv expected_texture_overload(
%15 = OpConstant %4 2
%16 = OpConstant %4 3
%17 = OpConstantComposite %13 %14 %15 %16
%18 = OpTypeInt 32 0
%18 = OpTypeInt 32 1
%19 = OpConstant %18 4
)",
R"(
@ -1037,7 +1031,7 @@ expected_texture_overload_spirv expected_texture_overload(
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%16 = OpConstant %4 3
%18 = OpTypeInt 32 0
%18 = OpTypeInt 32 1
%19 = OpConstant %18 4
%21 = OpConstant %18 5
)",
@ -1045,7 +1039,7 @@ expected_texture_overload_spirv expected_texture_overload(
%9 = OpLoad %7 %5
%10 = OpLoad %3 %1
%12 = OpSampledImage %11 %10 %9
%17 = OpConvertUToF %4 %19
%17 = OpConvertSToF %4 %19
%20 = OpCompositeConstruct %13 %14 %15 %16 %17
%8 = OpImageSampleExplicitLod %4 %12 %20 Lod %21
)"};
@ -1127,7 +1121,7 @@ expected_texture_overload_spirv expected_texture_overload(
%14 = OpTypeVector %4 3
%15 = OpConstant %4 1
%16 = OpConstant %4 2
%18 = OpTypeInt 32 0
%18 = OpTypeInt 32 1
%19 = OpConstant %18 3
%21 = OpTypeVector %4 2
%22 = OpConstant %4 4
@ -1141,7 +1135,7 @@ expected_texture_overload_spirv expected_texture_overload(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
%17 = OpConvertUToF %4 %19
%17 = OpConvertSToF %4 %19
%20 = OpCompositeConstruct %14 %15 %16 %17
%8 = OpImageSampleExplicitLod %9 %13 %20 Grad %24 %27
)"};
@ -1160,7 +1154,7 @@ expected_texture_overload_spirv expected_texture_overload(
%14 = OpTypeVector %4 3
%15 = OpConstant %4 1
%16 = OpConstant %4 2
%18 = OpTypeInt 32 0
%18 = OpTypeInt 32 1
%19 = OpConstant %18 3
%21 = OpTypeVector %4 2
%22 = OpConstant %4 4
@ -1169,19 +1163,18 @@ expected_texture_overload_spirv expected_texture_overload(
%25 = OpConstant %4 6
%26 = OpConstant %4 7
%27 = OpConstantComposite %21 %25 %26
%29 = OpTypeInt 32 1
%28 = OpTypeVector %29 2
%30 = OpConstant %29 8
%31 = OpConstant %29 9
%32 = OpConstantComposite %28 %30 %31
%28 = OpTypeVector %18 2
%29 = OpConstant %18 8
%30 = OpConstant %18 9
%31 = OpConstantComposite %28 %29 %30
)",
R"(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
%17 = OpConvertUToF %4 %19
%17 = OpConvertSToF %4 %19
%20 = OpCompositeConstruct %14 %15 %16 %17
%8 = OpImageSampleExplicitLod %9 %13 %20 Grad|Offset %24 %27 %32
%8 = OpImageSampleExplicitLod %9 %13 %20 Grad|Offset %24 %27 %31
)"};
case ValidTextureOverload::kSampleGrad3dF32:
return {
@ -1300,7 +1293,7 @@ expected_texture_overload_spirv expected_texture_overload(
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%16 = OpConstant %4 3
%18 = OpTypeInt 32 0
%18 = OpTypeInt 32 1
%19 = OpConstant %18 4
%21 = OpTypeVector %4 3
%22 = OpConstant %4 5
@ -1316,7 +1309,7 @@ expected_texture_overload_spirv expected_texture_overload(
%10 = OpLoad %7 %5
%11 = OpLoad %3 %1
%13 = OpSampledImage %12 %11 %10
%17 = OpConvertUToF %4 %19
%17 = OpConvertSToF %4 %19
%20 = OpCompositeConstruct %9 %14 %15 %16 %17
%8 = OpImageSampleExplicitLod %9 %13 %20 Grad %25 %29
)"};
@ -1387,7 +1380,7 @@ expected_texture_overload_spirv expected_texture_overload(
%13 = OpTypeVector %4 3
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%17 = OpTypeInt 32 0
%17 = OpTypeInt 32 1
%18 = OpConstant %17 4
%20 = OpConstant %4 3
%21 = OpConstant %4 0
@ -1396,7 +1389,7 @@ expected_texture_overload_spirv expected_texture_overload(
%9 = OpLoad %7 %5
%10 = OpLoad %3 %1
%12 = OpSampledImage %11 %10 %9
%16 = OpConvertUToF %4 %18
%16 = OpConvertSToF %4 %18
%19 = OpCompositeConstruct %13 %14 %15 %16
%8 = OpImageSampleDrefExplicitLod %4 %12 %19 %20 Lod %21
)"};
@ -1414,23 +1407,22 @@ expected_texture_overload_spirv expected_texture_overload(
%13 = OpTypeVector %4 3
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%17 = OpTypeInt 32 0
%17 = OpTypeInt 32 1
%18 = OpConstant %17 4
%20 = OpConstant %4 3
%21 = OpConstant %4 0
%23 = OpTypeInt 32 1
%22 = OpTypeVector %23 2
%24 = OpConstant %23 5
%25 = OpConstant %23 6
%26 = OpConstantComposite %22 %24 %25
%22 = OpTypeVector %17 2
%23 = OpConstant %17 5
%24 = OpConstant %17 6
%25 = OpConstantComposite %22 %23 %24
)",
R"(
%9 = OpLoad %7 %5
%10 = OpLoad %3 %1
%12 = OpSampledImage %11 %10 %9
%16 = OpConvertUToF %4 %18
%16 = OpConvertSToF %4 %18
%19 = OpCompositeConstruct %13 %14 %15 %16
%8 = OpImageSampleDrefExplicitLod %4 %12 %19 %20 Lod|Offset %21 %26
%8 = OpImageSampleDrefExplicitLod %4 %12 %19 %20 Lod|Offset %21 %25
)"};
case ValidTextureOverload::kSampleGradDepthCubeF32:
return {
@ -1472,7 +1464,7 @@ expected_texture_overload_spirv expected_texture_overload(
%14 = OpConstant %4 1
%15 = OpConstant %4 2
%16 = OpConstant %4 3
%18 = OpTypeInt 32 0
%18 = OpTypeInt 32 1
%19 = OpConstant %18 4
%21 = OpConstant %4 5
%22 = OpConstant %4 0
@ -1481,7 +1473,7 @@ expected_texture_overload_spirv expected_texture_overload(
%9 = OpLoad %7 %5
%10 = OpLoad %3 %1
%12 = OpSampledImage %11 %10 %9
%17 = OpConvertUToF %4 %19
%17 = OpConvertSToF %4 %19
%20 = OpCompositeConstruct %13 %14 %15 %16 %17
%8 = OpImageSampleDrefExplicitLod %4 %12 %20 %21 Lod %22
)"};