Reland "Remove deprecated textureLoad overloads with no level param"
This is a reland of cc4c22ebaa
Original change's description:
> Remove deprecated textureLoad overloads with no level param
>
> BUG=tint:516
>
> Change-Id: I7004e0dbd44d703c684118136b05b84cf609c6ba
> Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/42703
> Reviewed-by: Ben Clayton <bclayton@google.com>
> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Bug: tint:516
Change-Id: Ic52893c78046cd54575cea51c244f6df5a4f843c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/43620
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
e879143801
commit
2f8df72930
|
@ -1661,45 +1661,6 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
|
||||||
5.f); // depth_ref
|
5.f); // depth_ref
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
ValidTextureOverload::kLoad1dF32,
|
|
||||||
"textureLoad(t : texture_1d<f32>,\n"
|
|
||||||
" coords : i32) -> vec4<f32>",
|
|
||||||
TextureKind::kRegular,
|
|
||||||
type::TextureDimension::k1d,
|
|
||||||
TextureDataType::kF32,
|
|
||||||
"textureLoad",
|
|
||||||
[](ProgramBuilder* b) {
|
|
||||||
return b->ExprList("texture", // t
|
|
||||||
1); // coords
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ValidTextureOverload::kLoad1dU32,
|
|
||||||
"textureLoad(t : texture_1d<u32>,\n"
|
|
||||||
" coords : i32) -> vec4<u32>",
|
|
||||||
TextureKind::kRegular,
|
|
||||||
type::TextureDimension::k1d,
|
|
||||||
TextureDataType::kU32,
|
|
||||||
"textureLoad",
|
|
||||||
[](ProgramBuilder* b) {
|
|
||||||
return b->ExprList("texture", // t
|
|
||||||
1); // coords
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ValidTextureOverload::kLoad1dI32,
|
|
||||||
"textureLoad(t : texture_1d<i32>,\n"
|
|
||||||
" coords : i32) -> vec4<i32>",
|
|
||||||
TextureKind::kRegular,
|
|
||||||
type::TextureDimension::k1d,
|
|
||||||
TextureDataType::kI32,
|
|
||||||
"textureLoad",
|
|
||||||
[](ProgramBuilder* b) {
|
|
||||||
return b->ExprList("texture", // t
|
|
||||||
1); // coords
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
ValidTextureOverload::kLoad1dLevelF32,
|
ValidTextureOverload::kLoad1dLevelF32,
|
||||||
"textureLoad(t : texture_1d<f32>,\n"
|
"textureLoad(t : texture_1d<f32>,\n"
|
||||||
|
@ -1745,45 +1706,6 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
|
||||||
3); // level
|
3); // level
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
ValidTextureOverload::kLoad2dF32,
|
|
||||||
"textureLoad(t : texture_2d<f32>,\n"
|
|
||||||
" coords : vec2<i32>) -> vec4<f32>",
|
|
||||||
TextureKind::kRegular,
|
|
||||||
type::TextureDimension::k2d,
|
|
||||||
TextureDataType::kF32,
|
|
||||||
"textureLoad",
|
|
||||||
[](ProgramBuilder* b) {
|
|
||||||
return b->ExprList("texture", // t
|
|
||||||
b->vec2<i32>(1, 2)); // coords
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ValidTextureOverload::kLoad2dU32,
|
|
||||||
"textureLoad(t : texture_2d<u32>,\n"
|
|
||||||
" coords : vec2<i32>) -> vec4<u32>",
|
|
||||||
TextureKind::kRegular,
|
|
||||||
type::TextureDimension::k2d,
|
|
||||||
TextureDataType::kU32,
|
|
||||||
"textureLoad",
|
|
||||||
[](ProgramBuilder* b) {
|
|
||||||
return b->ExprList("texture", // t
|
|
||||||
b->vec2<i32>(1, 2)); // coords
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ValidTextureOverload::kLoad2dI32,
|
|
||||||
"textureLoad(t : texture_2d<i32>,\n"
|
|
||||||
" coords : vec2<i32>) -> vec4<i32>",
|
|
||||||
TextureKind::kRegular,
|
|
||||||
type::TextureDimension::k2d,
|
|
||||||
TextureDataType::kI32,
|
|
||||||
"textureLoad",
|
|
||||||
[](ProgramBuilder* b) {
|
|
||||||
return b->ExprList("texture", // t
|
|
||||||
b->vec2<i32>(1, 2)); // coords
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
ValidTextureOverload::kLoad2dLevelF32,
|
ValidTextureOverload::kLoad2dLevelF32,
|
||||||
"textureLoad(t : texture_2d<f32>,\n"
|
"textureLoad(t : texture_2d<f32>,\n"
|
||||||
|
@ -1829,51 +1751,6 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
|
||||||
3); // level
|
3); // level
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
ValidTextureOverload::kLoad2dArrayF32,
|
|
||||||
"textureLoad(t : texture_2d_array<f32>,\n"
|
|
||||||
" coords : vec2<i32>,\n"
|
|
||||||
" array_index : i32) -> vec4<f32>",
|
|
||||||
TextureKind::kRegular,
|
|
||||||
type::TextureDimension::k2dArray,
|
|
||||||
TextureDataType::kF32,
|
|
||||||
"textureLoad",
|
|
||||||
[](ProgramBuilder* b) {
|
|
||||||
return b->ExprList("texture", // t
|
|
||||||
b->vec2<i32>(1, 2), // coords
|
|
||||||
3); // array_index
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ValidTextureOverload::kLoad2dArrayU32,
|
|
||||||
"textureLoad(t : texture_2d_array<u32>,\n"
|
|
||||||
" coords : vec2<i32>,\n"
|
|
||||||
" array_index : i32) -> vec4<u32>",
|
|
||||||
TextureKind::kRegular,
|
|
||||||
type::TextureDimension::k2dArray,
|
|
||||||
TextureDataType::kU32,
|
|
||||||
"textureLoad",
|
|
||||||
[](ProgramBuilder* b) {
|
|
||||||
return b->ExprList("texture", // t
|
|
||||||
b->vec2<i32>(1, 2), // coords
|
|
||||||
3); // array_index
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ValidTextureOverload::kLoad2dArrayI32,
|
|
||||||
"textureLoad(t : texture_2d_array<i32>,\n"
|
|
||||||
" coords : vec2<i32>,\n"
|
|
||||||
" array_index : i32) -> vec4<i32>",
|
|
||||||
TextureKind::kRegular,
|
|
||||||
type::TextureDimension::k2dArray,
|
|
||||||
TextureDataType::kI32,
|
|
||||||
"textureLoad",
|
|
||||||
[](ProgramBuilder* b) {
|
|
||||||
return b->ExprList("texture", // t
|
|
||||||
b->vec2<i32>(1, 2), // coords
|
|
||||||
3); // array_index
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
ValidTextureOverload::kLoad2dArrayLevelF32,
|
ValidTextureOverload::kLoad2dArrayLevelF32,
|
||||||
"textureLoad(t : texture_2d_array<f32>,\n"
|
"textureLoad(t : texture_2d_array<f32>,\n"
|
||||||
|
@ -1925,45 +1802,6 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
|
||||||
4); // level
|
4); // level
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
ValidTextureOverload::kLoad3dF32,
|
|
||||||
"textureLoad(t : texture_3d<f32>,\n"
|
|
||||||
" coords : vec3<i32>) -> vec4<f32>",
|
|
||||||
TextureKind::kRegular,
|
|
||||||
type::TextureDimension::k3d,
|
|
||||||
TextureDataType::kF32,
|
|
||||||
"textureLoad",
|
|
||||||
[](ProgramBuilder* b) {
|
|
||||||
return b->ExprList("texture", // t
|
|
||||||
b->vec3<i32>(1, 2, 3)); // coords
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ValidTextureOverload::kLoad3dU32,
|
|
||||||
"textureLoad(t : texture_3d<u32>,\n"
|
|
||||||
" coords : vec3<i32>) -> vec4<u32>",
|
|
||||||
TextureKind::kRegular,
|
|
||||||
type::TextureDimension::k3d,
|
|
||||||
TextureDataType::kU32,
|
|
||||||
"textureLoad",
|
|
||||||
[](ProgramBuilder* b) {
|
|
||||||
return b->ExprList("texture", // t
|
|
||||||
b->vec3<i32>(1, 2, 3)); // coords
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ValidTextureOverload::kLoad3dI32,
|
|
||||||
"textureLoad(t : texture_3d<i32>,\n"
|
|
||||||
" coords : vec3<i32>) -> vec4<i32>",
|
|
||||||
TextureKind::kRegular,
|
|
||||||
type::TextureDimension::k3d,
|
|
||||||
TextureDataType::kI32,
|
|
||||||
"textureLoad",
|
|
||||||
[](ProgramBuilder* b) {
|
|
||||||
return b->ExprList("texture", // t
|
|
||||||
b->vec3<i32>(1, 2, 3)); // coords
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
ValidTextureOverload::kLoad3dLevelF32,
|
ValidTextureOverload::kLoad3dLevelF32,
|
||||||
"textureLoad(t : texture_3d<f32>,\n"
|
"textureLoad(t : texture_3d<f32>,\n"
|
||||||
|
@ -2105,19 +1943,6 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
|
||||||
4); // sample_index
|
4); // sample_index
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
ValidTextureOverload::kLoadDepth2dF32,
|
|
||||||
"textureLoad(t : texture_depth_2d,\n"
|
|
||||||
" coords : vec2<i32>) -> f32",
|
|
||||||
TextureKind::kDepth,
|
|
||||||
type::TextureDimension::k2d,
|
|
||||||
TextureDataType::kF32,
|
|
||||||
"textureLoad",
|
|
||||||
[](ProgramBuilder* b) {
|
|
||||||
return b->ExprList("texture", // t
|
|
||||||
b->vec2<i32>(1, 2)); // coords
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
ValidTextureOverload::kLoadDepth2dLevelF32,
|
ValidTextureOverload::kLoadDepth2dLevelF32,
|
||||||
"textureLoad(t : texture_depth_2d,\n"
|
"textureLoad(t : texture_depth_2d,\n"
|
||||||
|
@ -2133,21 +1958,6 @@ std::vector<TextureOverloadCase> TextureOverloadCase::ValidCases() {
|
||||||
3); // level
|
3); // level
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
ValidTextureOverload::kLoadDepth2dArrayF32,
|
|
||||||
"textureLoad(t : texture_depth_2d_array,\n"
|
|
||||||
" coords : vec2<i32>,\n"
|
|
||||||
" array_index : i32) -> f32",
|
|
||||||
TextureKind::kDepth,
|
|
||||||
type::TextureDimension::k2dArray,
|
|
||||||
TextureDataType::kF32,
|
|
||||||
"textureLoad",
|
|
||||||
[](ProgramBuilder* b) {
|
|
||||||
return b->ExprList("texture", // t
|
|
||||||
b->vec2<i32>(1, 2), // coords
|
|
||||||
3); // array_index
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
ValidTextureOverload::kLoadDepth2dArrayLevelF32,
|
ValidTextureOverload::kLoadDepth2dArrayLevelF32,
|
||||||
"textureLoad(t : texture_depth_2d_array,\n"
|
"textureLoad(t : texture_depth_2d_array,\n"
|
||||||
|
|
|
@ -134,27 +134,15 @@ enum class ValidTextureOverload {
|
||||||
kSampleCompareDepth2dArrayOffsetF32,
|
kSampleCompareDepth2dArrayOffsetF32,
|
||||||
kSampleCompareDepthCubeF32,
|
kSampleCompareDepthCubeF32,
|
||||||
kSampleCompareDepthCubeArrayF32,
|
kSampleCompareDepthCubeArrayF32,
|
||||||
kLoad1dF32,
|
|
||||||
kLoad1dU32,
|
|
||||||
kLoad1dI32,
|
|
||||||
kLoad1dLevelF32,
|
kLoad1dLevelF32,
|
||||||
kLoad1dLevelU32,
|
kLoad1dLevelU32,
|
||||||
kLoad1dLevelI32,
|
kLoad1dLevelI32,
|
||||||
kLoad2dF32,
|
|
||||||
kLoad2dU32,
|
|
||||||
kLoad2dI32,
|
|
||||||
kLoad2dLevelF32,
|
kLoad2dLevelF32,
|
||||||
kLoad2dLevelU32,
|
kLoad2dLevelU32,
|
||||||
kLoad2dLevelI32,
|
kLoad2dLevelI32,
|
||||||
kLoad2dArrayF32,
|
|
||||||
kLoad2dArrayU32,
|
|
||||||
kLoad2dArrayI32,
|
|
||||||
kLoad2dArrayLevelF32,
|
kLoad2dArrayLevelF32,
|
||||||
kLoad2dArrayLevelU32,
|
kLoad2dArrayLevelU32,
|
||||||
kLoad2dArrayLevelI32,
|
kLoad2dArrayLevelI32,
|
||||||
kLoad3dF32,
|
|
||||||
kLoad3dU32,
|
|
||||||
kLoad3dI32,
|
|
||||||
kLoad3dLevelF32,
|
kLoad3dLevelF32,
|
||||||
kLoad3dLevelU32,
|
kLoad3dLevelU32,
|
||||||
kLoad3dLevelI32,
|
kLoad3dLevelI32,
|
||||||
|
@ -164,9 +152,7 @@ enum class ValidTextureOverload {
|
||||||
kLoadMultisampled2dArrayF32,
|
kLoadMultisampled2dArrayF32,
|
||||||
kLoadMultisampled2dArrayU32,
|
kLoadMultisampled2dArrayU32,
|
||||||
kLoadMultisampled2dArrayI32,
|
kLoadMultisampled2dArrayI32,
|
||||||
kLoadDepth2dF32,
|
|
||||||
kLoadDepth2dLevelF32,
|
kLoadDepth2dLevelF32,
|
||||||
kLoadDepth2dArrayF32,
|
|
||||||
kLoadDepth2dArrayLevelF32,
|
kLoadDepth2dArrayLevelF32,
|
||||||
kLoadStorageRO1dRgba32float, // Not permutated for all texel formats
|
kLoadStorageRO1dRgba32float, // Not permutated for all texel formats
|
||||||
kLoadStorageRO2dRgba8unorm,
|
kLoadStorageRO2dRgba8unorm,
|
||||||
|
|
|
@ -1241,6 +1241,7 @@ Impl::Impl() {
|
||||||
Register(I::kTextureStore, void_, {{t, tex_storage_wo_2d_array_FT},{coords, vec2_i32}, {array_index, i32}, {value, vec4_T}, }); // NOLINT
|
Register(I::kTextureStore, void_, {{t, tex_storage_wo_2d_array_FT},{coords, vec2_i32}, {array_index, i32}, {value, vec4_T}, }); // NOLINT
|
||||||
Register(I::kTextureStore, void_, {{t, tex_storage_wo_3d_FT}, {coords, vec3_i32}, {value, vec4_T}, }); // NOLINT
|
Register(I::kTextureStore, void_, {{t, tex_storage_wo_3d_FT}, {coords, vec3_i32}, {value, vec4_T}, }); // NOLINT
|
||||||
|
|
||||||
|
Register(I::kTextureLoad, vec4_T, {{t, tex_1d_T}, {coords, i32}, {level, i32}, }); // NOLINT
|
||||||
Register(I::kTextureLoad, vec4_T, {{t, tex_2d_T}, {coords, vec2_i32}, {level, i32}, }); // NOLINT
|
Register(I::kTextureLoad, vec4_T, {{t, tex_2d_T}, {coords, vec2_i32}, {level, i32}, }); // NOLINT
|
||||||
Register(I::kTextureLoad, vec4_T, {{t, tex_2d_array_T}, {coords, vec2_i32}, {array_index, i32}, {level, i32}, }); // NOLINT
|
Register(I::kTextureLoad, vec4_T, {{t, tex_2d_array_T}, {coords, vec2_i32}, {array_index, i32}, {level, i32}, }); // NOLINT
|
||||||
Register(I::kTextureLoad, vec4_T, {{t, tex_3d_T}, {coords, vec3_i32}, {level, i32}, }); // NOLINT
|
Register(I::kTextureLoad, vec4_T, {{t, tex_3d_T}, {coords, vec3_i32}, {level, i32}, }); // NOLINT
|
||||||
|
@ -1253,20 +1254,6 @@ Impl::Impl() {
|
||||||
Register(I::kTextureLoad, vec4_T, {{t, tex_storage_ro_2d_array_FT},{coords, vec2_i32}, {array_index, i32}, }); // NOLINT
|
Register(I::kTextureLoad, vec4_T, {{t, tex_storage_ro_2d_array_FT},{coords, vec2_i32}, {array_index, i32}, }); // NOLINT
|
||||||
Register(I::kTextureLoad, vec4_T, {{t, tex_storage_ro_3d_FT}, {coords, vec3_i32}, }); // NOLINT
|
Register(I::kTextureLoad, vec4_T, {{t, tex_storage_ro_3d_FT}, {coords, vec3_i32}, }); // NOLINT
|
||||||
|
|
||||||
// TODO(bclayton): Update the rest of tint to reflect the spec changes made in
|
|
||||||
// https://github.com/gpuweb/gpuweb/pull/1301:
|
|
||||||
|
|
||||||
// Overloads added in https://github.com/gpuweb/gpuweb/pull/1301
|
|
||||||
Register(I::kTextureLoad, vec4_T, {{t, tex_1d_T}, {coords, i32}, {level, i32}, }); // NOLINT
|
|
||||||
|
|
||||||
// Overloads removed in https://github.com/gpuweb/gpuweb/pull/1301
|
|
||||||
Register(I::kTextureLoad, vec4_T, {{t, tex_1d_T}, {coords, i32}, }); // NOLINT
|
|
||||||
Register(I::kTextureLoad, vec4_T, {{t, tex_2d_T}, {coords, vec2_i32}, }); // NOLINT
|
|
||||||
Register(I::kTextureLoad, vec4_T, {{t, tex_2d_array_T}, {coords, vec2_i32}, {array_index, i32}, }); // NOLINT
|
|
||||||
Register(I::kTextureLoad, vec4_T, {{t, tex_3d_T}, {coords, vec3_i32}, }); // NOLINT
|
|
||||||
Register(I::kTextureLoad, f32, {{t, tex_depth_2d}, {coords, vec2_i32}, }); // NOLINT
|
|
||||||
Register(I::kTextureLoad, f32, {{t, tex_depth_2d_array}, {coords, vec2_i32}, {array_index, i32}, }); // NOLINT
|
|
||||||
|
|
||||||
// clang-format on
|
// clang-format on
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,14 +73,15 @@ TEST_F(IntrinsicTableTest, MatchI32) {
|
||||||
auto* tex =
|
auto* tex =
|
||||||
create<type::SampledTexture>(type::TextureDimension::k1d, ty.f32());
|
create<type::SampledTexture>(type::TextureDimension::k1d, ty.f32());
|
||||||
auto result = table->Lookup(*this, IntrinsicType::kTextureLoad,
|
auto result = table->Lookup(*this, IntrinsicType::kTextureLoad,
|
||||||
{tex, ty.i32()}, Source{});
|
{tex, ty.i32(), ty.i32()}, Source{});
|
||||||
ASSERT_NE(result.intrinsic, nullptr);
|
ASSERT_NE(result.intrinsic, nullptr);
|
||||||
ASSERT_EQ(result.diagnostics.str(), "");
|
ASSERT_EQ(result.diagnostics.str(), "");
|
||||||
EXPECT_THAT(result.intrinsic->Type(), IntrinsicType::kTextureLoad);
|
EXPECT_THAT(result.intrinsic->Type(), IntrinsicType::kTextureLoad);
|
||||||
EXPECT_THAT(result.intrinsic->ReturnType(), ty.vec4<f32>());
|
EXPECT_THAT(result.intrinsic->ReturnType(), ty.vec4<f32>());
|
||||||
EXPECT_THAT(result.intrinsic->Parameters(),
|
EXPECT_THAT(result.intrinsic->Parameters(),
|
||||||
ElementsAre(Parameter{tex, Parameter::Usage::kTexture},
|
ElementsAre(Parameter{tex, Parameter::Usage::kTexture},
|
||||||
Parameter{ty.i32(), Parameter::Usage::kCoords}));
|
Parameter{ty.i32(), Parameter::Usage::kCoords},
|
||||||
|
Parameter{ty.i32(), Parameter::Usage::kLevel}));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(IntrinsicTableTest, MismatchI32) {
|
TEST_F(IntrinsicTableTest, MismatchI32) {
|
||||||
|
@ -250,15 +251,15 @@ TEST_F(IntrinsicTableTest, MatchSampledTexture) {
|
||||||
auto* tex =
|
auto* tex =
|
||||||
create<type::SampledTexture>(type::TextureDimension::k2d, ty.f32());
|
create<type::SampledTexture>(type::TextureDimension::k2d, ty.f32());
|
||||||
auto result = table->Lookup(*this, IntrinsicType::kTextureLoad,
|
auto result = table->Lookup(*this, IntrinsicType::kTextureLoad,
|
||||||
{tex, ty.vec2<i32>()}, Source{});
|
{tex, ty.vec2<i32>(), ty.i32()}, Source{});
|
||||||
ASSERT_NE(result.intrinsic, nullptr);
|
ASSERT_NE(result.intrinsic, nullptr);
|
||||||
ASSERT_EQ(result.diagnostics.str(), "");
|
ASSERT_EQ(result.diagnostics.str(), "");
|
||||||
EXPECT_THAT(result.intrinsic->Type(), IntrinsicType::kTextureLoad);
|
EXPECT_THAT(result.intrinsic->Type(), IntrinsicType::kTextureLoad);
|
||||||
EXPECT_THAT(result.intrinsic->ReturnType(), ty.vec4<f32>());
|
EXPECT_THAT(result.intrinsic->ReturnType(), ty.vec4<f32>());
|
||||||
EXPECT_THAT(
|
EXPECT_THAT(result.intrinsic->Parameters(),
|
||||||
result.intrinsic->Parameters(),
|
ElementsAre(Parameter{tex, Parameter::Usage::kTexture},
|
||||||
ElementsAre(Parameter{tex, Parameter::Usage::kTexture},
|
Parameter{ty.vec2<i32>(), Parameter::Usage::kCoords},
|
||||||
Parameter{ty.vec2<i32>(), Parameter::Usage::kCoords}));
|
Parameter{ty.i32(), Parameter::Usage::kLevel}));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(IntrinsicTableTest, MatchMultisampledTexture) {
|
TEST_F(IntrinsicTableTest, MatchMultisampledTexture) {
|
||||||
|
@ -279,15 +280,15 @@ TEST_F(IntrinsicTableTest, MatchMultisampledTexture) {
|
||||||
TEST_F(IntrinsicTableTest, MatchDepthTexture) {
|
TEST_F(IntrinsicTableTest, MatchDepthTexture) {
|
||||||
auto* tex = create<type::DepthTexture>(type::TextureDimension::k2d);
|
auto* tex = create<type::DepthTexture>(type::TextureDimension::k2d);
|
||||||
auto result = table->Lookup(*this, IntrinsicType::kTextureLoad,
|
auto result = table->Lookup(*this, IntrinsicType::kTextureLoad,
|
||||||
{tex, ty.vec2<i32>()}, Source{});
|
{tex, ty.vec2<i32>(), ty.i32()}, Source{});
|
||||||
ASSERT_NE(result.intrinsic, nullptr);
|
ASSERT_NE(result.intrinsic, nullptr);
|
||||||
ASSERT_EQ(result.diagnostics.str(), "");
|
ASSERT_EQ(result.diagnostics.str(), "");
|
||||||
EXPECT_THAT(result.intrinsic->Type(), IntrinsicType::kTextureLoad);
|
EXPECT_THAT(result.intrinsic->Type(), IntrinsicType::kTextureLoad);
|
||||||
EXPECT_THAT(result.intrinsic->ReturnType(), ty.f32());
|
EXPECT_THAT(result.intrinsic->ReturnType(), ty.f32());
|
||||||
EXPECT_THAT(
|
EXPECT_THAT(result.intrinsic->Parameters(),
|
||||||
result.intrinsic->Parameters(),
|
ElementsAre(Parameter{tex, Parameter::Usage::kTexture},
|
||||||
ElementsAre(Parameter{tex, Parameter::Usage::kTexture},
|
Parameter{ty.vec2<i32>(), Parameter::Usage::kCoords},
|
||||||
Parameter{ty.vec2<i32>(), Parameter::Usage::kCoords}));
|
Parameter{ty.i32(), Parameter::Usage::kLevel}));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(IntrinsicTableTest, MatchROStorageTexture) {
|
TEST_F(IntrinsicTableTest, MatchROStorageTexture) {
|
||||||
|
|
|
@ -1746,7 +1746,10 @@ TEST_P(Intrinsic_SampledTextureOperation, TextureLoadSampled) {
|
||||||
|
|
||||||
add_call_param("texture", texture_type, &call_params);
|
add_call_param("texture", texture_type, &call_params);
|
||||||
add_call_param("coords", coords_type, &call_params);
|
add_call_param("coords", coords_type, &call_params);
|
||||||
add_call_param("lod", ty.i32(), &call_params);
|
if (dim == type::TextureDimension::k2dArray) {
|
||||||
|
add_call_param("array_index", ty.i32(), &call_params);
|
||||||
|
}
|
||||||
|
add_call_param("level", ty.i32(), &call_params);
|
||||||
|
|
||||||
auto* expr = Call("textureLoad", call_params);
|
auto* expr = Call("textureLoad", call_params);
|
||||||
WrapInFunction(expr);
|
WrapInFunction(expr);
|
||||||
|
@ -3447,48 +3450,24 @@ const char* expected_texture_overload(
|
||||||
return R"(textureSampleCompare(texture, sampler, coords, depth_ref))";
|
return R"(textureSampleCompare(texture, sampler, coords, depth_ref))";
|
||||||
case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
|
case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
|
||||||
return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))";
|
return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))";
|
||||||
case ValidTextureOverload::kLoad1dF32:
|
|
||||||
return R"(textureLoad(texture, coords))";
|
|
||||||
case ValidTextureOverload::kLoad1dU32:
|
|
||||||
return R"(textureLoad(texture, coords))";
|
|
||||||
case ValidTextureOverload::kLoad1dI32:
|
|
||||||
return R"(textureLoad(texture, coords))";
|
|
||||||
case ValidTextureOverload::kLoad1dLevelF32:
|
case ValidTextureOverload::kLoad1dLevelF32:
|
||||||
return R"(textureLoad(texture, coords, level))";
|
return R"(textureLoad(texture, coords, level))";
|
||||||
case ValidTextureOverload::kLoad1dLevelU32:
|
case ValidTextureOverload::kLoad1dLevelU32:
|
||||||
return R"(textureLoad(texture, coords, level))";
|
return R"(textureLoad(texture, coords, level))";
|
||||||
case ValidTextureOverload::kLoad1dLevelI32:
|
case ValidTextureOverload::kLoad1dLevelI32:
|
||||||
return R"(textureLoad(texture, coords, level))";
|
return R"(textureLoad(texture, coords, level))";
|
||||||
case ValidTextureOverload::kLoad2dF32:
|
|
||||||
return R"(textureLoad(texture, coords))";
|
|
||||||
case ValidTextureOverload::kLoad2dU32:
|
|
||||||
return R"(textureLoad(texture, coords))";
|
|
||||||
case ValidTextureOverload::kLoad2dI32:
|
|
||||||
return R"(textureLoad(texture, coords))";
|
|
||||||
case ValidTextureOverload::kLoad2dLevelF32:
|
case ValidTextureOverload::kLoad2dLevelF32:
|
||||||
return R"(textureLoad(texture, coords, level))";
|
return R"(textureLoad(texture, coords, level))";
|
||||||
case ValidTextureOverload::kLoad2dLevelU32:
|
case ValidTextureOverload::kLoad2dLevelU32:
|
||||||
return R"(textureLoad(texture, coords, level))";
|
return R"(textureLoad(texture, coords, level))";
|
||||||
case ValidTextureOverload::kLoad2dLevelI32:
|
case ValidTextureOverload::kLoad2dLevelI32:
|
||||||
return R"(textureLoad(texture, coords, level))";
|
return R"(textureLoad(texture, coords, level))";
|
||||||
case ValidTextureOverload::kLoad2dArrayF32:
|
|
||||||
return R"(textureLoad(texture, coords, array_index))";
|
|
||||||
case ValidTextureOverload::kLoad2dArrayU32:
|
|
||||||
return R"(textureLoad(texture, coords, array_index))";
|
|
||||||
case ValidTextureOverload::kLoad2dArrayI32:
|
|
||||||
return R"(textureLoad(texture, coords, array_index))";
|
|
||||||
case ValidTextureOverload::kLoad2dArrayLevelF32:
|
case ValidTextureOverload::kLoad2dArrayLevelF32:
|
||||||
return R"(textureLoad(texture, coords, array_index, level))";
|
return R"(textureLoad(texture, coords, array_index, level))";
|
||||||
case ValidTextureOverload::kLoad2dArrayLevelU32:
|
case ValidTextureOverload::kLoad2dArrayLevelU32:
|
||||||
return R"(textureLoad(texture, coords, array_index, level))";
|
return R"(textureLoad(texture, coords, array_index, level))";
|
||||||
case ValidTextureOverload::kLoad2dArrayLevelI32:
|
case ValidTextureOverload::kLoad2dArrayLevelI32:
|
||||||
return R"(textureLoad(texture, coords, array_index, level))";
|
return R"(textureLoad(texture, coords, array_index, level))";
|
||||||
case ValidTextureOverload::kLoad3dF32:
|
|
||||||
return R"(textureLoad(texture, coords))";
|
|
||||||
case ValidTextureOverload::kLoad3dU32:
|
|
||||||
return R"(textureLoad(texture, coords))";
|
|
||||||
case ValidTextureOverload::kLoad3dI32:
|
|
||||||
return R"(textureLoad(texture, coords))";
|
|
||||||
case ValidTextureOverload::kLoad3dLevelF32:
|
case ValidTextureOverload::kLoad3dLevelF32:
|
||||||
return R"(textureLoad(texture, coords, level))";
|
return R"(textureLoad(texture, coords, level))";
|
||||||
case ValidTextureOverload::kLoad3dLevelU32:
|
case ValidTextureOverload::kLoad3dLevelU32:
|
||||||
|
@ -3507,12 +3486,8 @@ const char* expected_texture_overload(
|
||||||
return R"(textureLoad(texture, coords, array_index, sample_index))";
|
return R"(textureLoad(texture, coords, array_index, sample_index))";
|
||||||
case ValidTextureOverload::kLoadMultisampled2dArrayI32:
|
case ValidTextureOverload::kLoadMultisampled2dArrayI32:
|
||||||
return R"(textureLoad(texture, coords, array_index, sample_index))";
|
return R"(textureLoad(texture, coords, array_index, sample_index))";
|
||||||
case ValidTextureOverload::kLoadDepth2dF32:
|
|
||||||
return R"(textureLoad(texture, coords))";
|
|
||||||
case ValidTextureOverload::kLoadDepth2dLevelF32:
|
case ValidTextureOverload::kLoadDepth2dLevelF32:
|
||||||
return R"(textureLoad(texture, coords, level))";
|
return R"(textureLoad(texture, coords, level))";
|
||||||
case ValidTextureOverload::kLoadDepth2dArrayF32:
|
|
||||||
return R"(textureLoad(texture, coords, array_index))";
|
|
||||||
case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
|
case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
|
||||||
return R"(textureLoad(texture, coords, array_index, level))";
|
return R"(textureLoad(texture, coords, array_index, level))";
|
||||||
case ValidTextureOverload::kLoadStorageRO1dRgba32float:
|
case ValidTextureOverload::kLoadStorageRO1dRgba32float:
|
||||||
|
|
|
@ -305,48 +305,24 @@ texture_tint_0.GetDimensions(_tint_tmp.x, _tint_tmp.y, _tint_tmp.z, _tint_tmp.w)
|
||||||
return R"(texture_tint_0.SampleCmp(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4.0f))";
|
return R"(texture_tint_0.SampleCmp(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4.0f))";
|
||||||
case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
|
case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
|
||||||
return R"(texture_tint_0.SampleCmp(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f))";
|
return R"(texture_tint_0.SampleCmp(sampler_tint_0, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f))";
|
||||||
case ValidTextureOverload::kLoad1dF32:
|
|
||||||
return R"(texture_tint_0.Load(int2(1, 0)))";
|
|
||||||
case ValidTextureOverload::kLoad1dU32:
|
|
||||||
return R"(texture_tint_0.Load(int2(1, 0)))";
|
|
||||||
case ValidTextureOverload::kLoad1dI32:
|
|
||||||
return R"(texture_tint_0.Load(int2(1, 0)))";
|
|
||||||
case ValidTextureOverload::kLoad1dLevelF32:
|
case ValidTextureOverload::kLoad1dLevelF32:
|
||||||
return R"(texture_tint_0.Load(int2(1, 0), 3))";
|
return R"(texture_tint_0.Load(int2(1, 0), 3))";
|
||||||
case ValidTextureOverload::kLoad1dLevelU32:
|
case ValidTextureOverload::kLoad1dLevelU32:
|
||||||
return R"(texture_tint_0.Load(int2(1, 0), 3))";
|
return R"(texture_tint_0.Load(int2(1, 0), 3))";
|
||||||
case ValidTextureOverload::kLoad1dLevelI32:
|
case ValidTextureOverload::kLoad1dLevelI32:
|
||||||
return R"(texture_tint_0.Load(int2(1, 0), 3))";
|
return R"(texture_tint_0.Load(int2(1, 0), 3))";
|
||||||
case ValidTextureOverload::kLoad2dF32:
|
|
||||||
return R"(texture_tint_0.Load(int3(1, 2, 0)))";
|
|
||||||
case ValidTextureOverload::kLoad2dU32:
|
|
||||||
return R"(texture_tint_0.Load(int3(1, 2, 0)))";
|
|
||||||
case ValidTextureOverload::kLoad2dI32:
|
|
||||||
return R"(texture_tint_0.Load(int3(1, 2, 0)))";
|
|
||||||
case ValidTextureOverload::kLoad2dLevelF32:
|
case ValidTextureOverload::kLoad2dLevelF32:
|
||||||
return R"(texture_tint_0.Load(int3(1, 2, 0), 3))";
|
return R"(texture_tint_0.Load(int3(1, 2, 0), 3))";
|
||||||
case ValidTextureOverload::kLoad2dLevelU32:
|
case ValidTextureOverload::kLoad2dLevelU32:
|
||||||
return R"(texture_tint_0.Load(int3(1, 2, 0), 3))";
|
return R"(texture_tint_0.Load(int3(1, 2, 0), 3))";
|
||||||
case ValidTextureOverload::kLoad2dLevelI32:
|
case ValidTextureOverload::kLoad2dLevelI32:
|
||||||
return R"(texture_tint_0.Load(int3(1, 2, 0), 3))";
|
return R"(texture_tint_0.Load(int3(1, 2, 0), 3))";
|
||||||
case ValidTextureOverload::kLoad2dArrayF32:
|
|
||||||
return R"(texture_tint_0.Load(int4(1, 2, 3, 0)))";
|
|
||||||
case ValidTextureOverload::kLoad2dArrayU32:
|
|
||||||
return R"(texture_tint_0.Load(int4(1, 2, 3, 0)))";
|
|
||||||
case ValidTextureOverload::kLoad2dArrayI32:
|
|
||||||
return R"(texture_tint_0.Load(int4(1, 2, 3, 0)))";
|
|
||||||
case ValidTextureOverload::kLoad2dArrayLevelF32:
|
case ValidTextureOverload::kLoad2dArrayLevelF32:
|
||||||
return R"(texture_tint_0.Load(int4(1, 2, 3, 0), 4))";
|
return R"(texture_tint_0.Load(int4(1, 2, 3, 0), 4))";
|
||||||
case ValidTextureOverload::kLoad2dArrayLevelU32:
|
case ValidTextureOverload::kLoad2dArrayLevelU32:
|
||||||
return R"(texture_tint_0.Load(int4(1, 2, 3, 0), 4))";
|
return R"(texture_tint_0.Load(int4(1, 2, 3, 0), 4))";
|
||||||
case ValidTextureOverload::kLoad2dArrayLevelI32:
|
case ValidTextureOverload::kLoad2dArrayLevelI32:
|
||||||
return R"(texture_tint_0.Load(int4(1, 2, 3, 0), 4))";
|
return R"(texture_tint_0.Load(int4(1, 2, 3, 0), 4))";
|
||||||
case ValidTextureOverload::kLoad3dF32:
|
|
||||||
return R"(texture_tint_0.Load(int4(1, 2, 3, 0)))";
|
|
||||||
case ValidTextureOverload::kLoad3dU32:
|
|
||||||
return R"(texture_tint_0.Load(int4(1, 2, 3, 0)))";
|
|
||||||
case ValidTextureOverload::kLoad3dI32:
|
|
||||||
return R"(texture_tint_0.Load(int4(1, 2, 3, 0)))";
|
|
||||||
case ValidTextureOverload::kLoad3dLevelF32:
|
case ValidTextureOverload::kLoad3dLevelF32:
|
||||||
return R"(texture_tint_0.Load(int4(1, 2, 3, 0), 4))";
|
return R"(texture_tint_0.Load(int4(1, 2, 3, 0), 4))";
|
||||||
case ValidTextureOverload::kLoad3dLevelU32:
|
case ValidTextureOverload::kLoad3dLevelU32:
|
||||||
|
@ -365,12 +341,8 @@ texture_tint_0.GetDimensions(_tint_tmp.x, _tint_tmp.y, _tint_tmp.z, _tint_tmp.w)
|
||||||
return R"(texture_tint_0.Load(int4(1, 2, 3, 0), 4))";
|
return R"(texture_tint_0.Load(int4(1, 2, 3, 0), 4))";
|
||||||
case ValidTextureOverload::kLoadMultisampled2dArrayI32:
|
case ValidTextureOverload::kLoadMultisampled2dArrayI32:
|
||||||
return R"(texture_tint_0.Load(int4(1, 2, 3, 0), 4))";
|
return R"(texture_tint_0.Load(int4(1, 2, 3, 0), 4))";
|
||||||
case ValidTextureOverload::kLoadDepth2dF32:
|
|
||||||
return R"(texture_tint_0.Load(int3(1, 2, 0)))";
|
|
||||||
case ValidTextureOverload::kLoadDepth2dLevelF32:
|
case ValidTextureOverload::kLoadDepth2dLevelF32:
|
||||||
return R"(texture_tint_0.Load(int3(1, 2, 0), 3))";
|
return R"(texture_tint_0.Load(int3(1, 2, 0), 3))";
|
||||||
case ValidTextureOverload::kLoadDepth2dArrayF32:
|
|
||||||
return R"(texture_tint_0.Load(int4(1, 2, 3, 0)))";
|
|
||||||
case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
|
case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
|
||||||
return R"(texture_tint_0.Load(int4(1, 2, 3, 0), 4))";
|
return R"(texture_tint_0.Load(int4(1, 2, 3, 0), 4))";
|
||||||
case ValidTextureOverload::kLoadStorageRO1dRgba32float:
|
case ValidTextureOverload::kLoadStorageRO1dRgba32float:
|
||||||
|
|
|
@ -190,48 +190,24 @@ std::string expected_texture_overload(
|
||||||
return R"(texture_tint_0.sample_compare(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4.0f))";
|
return R"(texture_tint_0.sample_compare(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4.0f))";
|
||||||
case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
|
case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
|
||||||
return R"(texture_tint_0.sample_compare(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4, 5.0f))";
|
return R"(texture_tint_0.sample_compare(sampler_tint_0, float3(1.0f, 2.0f, 3.0f), 4, 5.0f))";
|
||||||
case ValidTextureOverload::kLoad1dF32:
|
|
||||||
return R"(texture_tint_0.read(1))";
|
|
||||||
case ValidTextureOverload::kLoad1dU32:
|
|
||||||
return R"(texture_tint_0.read(1))";
|
|
||||||
case ValidTextureOverload::kLoad1dI32:
|
|
||||||
return R"(texture_tint_0.read(1))";
|
|
||||||
case ValidTextureOverload::kLoad1dLevelF32:
|
case ValidTextureOverload::kLoad1dLevelF32:
|
||||||
return R"(texture_tint_0.read(1, 3))";
|
return R"(texture_tint_0.read(1, 3))";
|
||||||
case ValidTextureOverload::kLoad1dLevelU32:
|
case ValidTextureOverload::kLoad1dLevelU32:
|
||||||
return R"(texture_tint_0.read(1, 3))";
|
return R"(texture_tint_0.read(1, 3))";
|
||||||
case ValidTextureOverload::kLoad1dLevelI32:
|
case ValidTextureOverload::kLoad1dLevelI32:
|
||||||
return R"(texture_tint_0.read(1, 3))";
|
return R"(texture_tint_0.read(1, 3))";
|
||||||
case ValidTextureOverload::kLoad2dF32:
|
|
||||||
return R"(texture_tint_0.read(int2(1, 2)))";
|
|
||||||
case ValidTextureOverload::kLoad2dU32:
|
|
||||||
return R"(texture_tint_0.read(int2(1, 2)))";
|
|
||||||
case ValidTextureOverload::kLoad2dI32:
|
|
||||||
return R"(texture_tint_0.read(int2(1, 2)))";
|
|
||||||
case ValidTextureOverload::kLoad2dLevelF32:
|
case ValidTextureOverload::kLoad2dLevelF32:
|
||||||
return R"(texture_tint_0.read(int2(1, 2), 3))";
|
return R"(texture_tint_0.read(int2(1, 2), 3))";
|
||||||
case ValidTextureOverload::kLoad2dLevelU32:
|
case ValidTextureOverload::kLoad2dLevelU32:
|
||||||
return R"(texture_tint_0.read(int2(1, 2), 3))";
|
return R"(texture_tint_0.read(int2(1, 2), 3))";
|
||||||
case ValidTextureOverload::kLoad2dLevelI32:
|
case ValidTextureOverload::kLoad2dLevelI32:
|
||||||
return R"(texture_tint_0.read(int2(1, 2), 3))";
|
return R"(texture_tint_0.read(int2(1, 2), 3))";
|
||||||
case ValidTextureOverload::kLoad2dArrayF32:
|
|
||||||
return R"(texture_tint_0.read(int2(1, 2), 3))";
|
|
||||||
case ValidTextureOverload::kLoad2dArrayU32:
|
|
||||||
return R"(texture_tint_0.read(int2(1, 2), 3))";
|
|
||||||
case ValidTextureOverload::kLoad2dArrayI32:
|
|
||||||
return R"(texture_tint_0.read(int2(1, 2), 3))";
|
|
||||||
case ValidTextureOverload::kLoad2dArrayLevelF32:
|
case ValidTextureOverload::kLoad2dArrayLevelF32:
|
||||||
return R"(texture_tint_0.read(int2(1, 2), 3, 4))";
|
return R"(texture_tint_0.read(int2(1, 2), 3, 4))";
|
||||||
case ValidTextureOverload::kLoad2dArrayLevelU32:
|
case ValidTextureOverload::kLoad2dArrayLevelU32:
|
||||||
return R"(texture_tint_0.read(int2(1, 2), 3, 4))";
|
return R"(texture_tint_0.read(int2(1, 2), 3, 4))";
|
||||||
case ValidTextureOverload::kLoad2dArrayLevelI32:
|
case ValidTextureOverload::kLoad2dArrayLevelI32:
|
||||||
return R"(texture_tint_0.read(int2(1, 2), 3, 4))";
|
return R"(texture_tint_0.read(int2(1, 2), 3, 4))";
|
||||||
case ValidTextureOverload::kLoad3dF32:
|
|
||||||
return R"(texture_tint_0.read(int3(1, 2, 3)))";
|
|
||||||
case ValidTextureOverload::kLoad3dU32:
|
|
||||||
return R"(texture_tint_0.read(int3(1, 2, 3)))";
|
|
||||||
case ValidTextureOverload::kLoad3dI32:
|
|
||||||
return R"(texture_tint_0.read(int3(1, 2, 3)))";
|
|
||||||
case ValidTextureOverload::kLoad3dLevelF32:
|
case ValidTextureOverload::kLoad3dLevelF32:
|
||||||
return R"(texture_tint_0.read(int3(1, 2, 3), 4))";
|
return R"(texture_tint_0.read(int3(1, 2, 3), 4))";
|
||||||
case ValidTextureOverload::kLoad3dLevelU32:
|
case ValidTextureOverload::kLoad3dLevelU32:
|
||||||
|
@ -250,12 +226,8 @@ std::string expected_texture_overload(
|
||||||
return R"(texture_tint_0.read(int2(1, 2), 3, 4))";
|
return R"(texture_tint_0.read(int2(1, 2), 3, 4))";
|
||||||
case ValidTextureOverload::kLoadMultisampled2dArrayI32:
|
case ValidTextureOverload::kLoadMultisampled2dArrayI32:
|
||||||
return R"(texture_tint_0.read(int2(1, 2), 3, 4))";
|
return R"(texture_tint_0.read(int2(1, 2), 3, 4))";
|
||||||
case ValidTextureOverload::kLoadDepth2dF32:
|
|
||||||
return R"(texture_tint_0.read(int2(1, 2)))";
|
|
||||||
case ValidTextureOverload::kLoadDepth2dLevelF32:
|
case ValidTextureOverload::kLoadDepth2dLevelF32:
|
||||||
return R"(texture_tint_0.read(int2(1, 2), 3))";
|
return R"(texture_tint_0.read(int2(1, 2), 3))";
|
||||||
case ValidTextureOverload::kLoadDepth2dArrayF32:
|
|
||||||
return R"(texture_tint_0.read(int2(1, 2), 3))";
|
|
||||||
case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
|
case ValidTextureOverload::kLoadDepth2dArrayLevelF32:
|
||||||
return R"(texture_tint_0.read(int2(1, 2), 3, 4))";
|
return R"(texture_tint_0.read(int2(1, 2), 3, 4))";
|
||||||
case ValidTextureOverload::kLoadStorageRO1dRgba32float:
|
case ValidTextureOverload::kLoadStorageRO1dRgba32float:
|
||||||
|
|
|
@ -2549,68 +2549,6 @@ OpCapability SampledCubeArray
|
||||||
)",
|
)",
|
||||||
R"(
|
R"(
|
||||||
OpCapability SampledCubeArray
|
OpCapability SampledCubeArray
|
||||||
)"};
|
|
||||||
case ValidTextureOverload::kLoad1dF32:
|
|
||||||
return {
|
|
||||||
R"(
|
|
||||||
%4 = OpTypeFloat 32
|
|
||||||
%3 = OpTypeImage %4 1D 0 0 0 1 Unknown
|
|
||||||
%2 = OpTypePointer UniformConstant %3
|
|
||||||
%1 = OpVariable %2 UniformConstant
|
|
||||||
%7 = OpTypeSampler
|
|
||||||
%6 = OpTypePointer UniformConstant %7
|
|
||||||
%5 = OpVariable %6 UniformConstant
|
|
||||||
%9 = OpTypeVector %4 4
|
|
||||||
%11 = OpTypeInt 32 1
|
|
||||||
%12 = OpConstant %11 1
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
%10 = OpLoad %3 %1
|
|
||||||
%8 = OpImageFetch %9 %10 %12
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
OpCapability Sampled1D
|
|
||||||
)"};
|
|
||||||
case ValidTextureOverload::kLoad1dU32:
|
|
||||||
return {
|
|
||||||
R"(
|
|
||||||
%4 = OpTypeInt 32 0
|
|
||||||
%3 = OpTypeImage %4 1D 0 0 0 1 Unknown
|
|
||||||
%2 = OpTypePointer UniformConstant %3
|
|
||||||
%1 = OpVariable %2 UniformConstant
|
|
||||||
%7 = OpTypeSampler
|
|
||||||
%6 = OpTypePointer UniformConstant %7
|
|
||||||
%5 = OpVariable %6 UniformConstant
|
|
||||||
%9 = OpTypeVector %4 4
|
|
||||||
%11 = OpTypeInt 32 1
|
|
||||||
%12 = OpConstant %11 1
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
%10 = OpLoad %3 %1
|
|
||||||
%8 = OpImageFetch %9 %10 %12
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
OpCapability Sampled1D
|
|
||||||
)"};
|
|
||||||
case ValidTextureOverload::kLoad1dI32:
|
|
||||||
return {
|
|
||||||
R"(
|
|
||||||
%4 = OpTypeInt 32 1
|
|
||||||
%3 = OpTypeImage %4 1D 0 0 0 1 Unknown
|
|
||||||
%2 = OpTypePointer UniformConstant %3
|
|
||||||
%1 = OpVariable %2 UniformConstant
|
|
||||||
%7 = OpTypeSampler
|
|
||||||
%6 = OpTypePointer UniformConstant %7
|
|
||||||
%5 = OpVariable %6 UniformConstant
|
|
||||||
%9 = OpTypeVector %4 4
|
|
||||||
%11 = OpConstant %4 1
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
%10 = OpLoad %3 %1
|
|
||||||
%8 = OpImageFetch %9 %10 %11
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
OpCapability Sampled1D
|
|
||||||
)"};
|
)"};
|
||||||
case ValidTextureOverload::kLoad1dLevelF32:
|
case ValidTextureOverload::kLoad1dLevelF32:
|
||||||
return {
|
return {
|
||||||
|
@ -2676,74 +2614,6 @@ OpCapability Sampled1D
|
||||||
)",
|
)",
|
||||||
R"(
|
R"(
|
||||||
OpCapability Sampled1D
|
OpCapability Sampled1D
|
||||||
)"};
|
|
||||||
case ValidTextureOverload::kLoad2dF32:
|
|
||||||
return {
|
|
||||||
R"(
|
|
||||||
%4 = OpTypeFloat 32
|
|
||||||
%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
|
|
||||||
%2 = OpTypePointer UniformConstant %3
|
|
||||||
%1 = OpVariable %2 UniformConstant
|
|
||||||
%7 = OpTypeSampler
|
|
||||||
%6 = OpTypePointer UniformConstant %7
|
|
||||||
%5 = OpVariable %6 UniformConstant
|
|
||||||
%9 = OpTypeVector %4 4
|
|
||||||
%12 = OpTypeInt 32 1
|
|
||||||
%11 = OpTypeVector %12 2
|
|
||||||
%13 = OpConstant %12 1
|
|
||||||
%14 = OpConstant %12 2
|
|
||||||
%15 = OpConstantComposite %11 %13 %14
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
%10 = OpLoad %3 %1
|
|
||||||
%8 = OpImageFetch %9 %10 %15
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
)"};
|
|
||||||
case ValidTextureOverload::kLoad2dU32:
|
|
||||||
return {
|
|
||||||
R"(
|
|
||||||
%4 = OpTypeInt 32 0
|
|
||||||
%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
|
|
||||||
%2 = OpTypePointer UniformConstant %3
|
|
||||||
%1 = OpVariable %2 UniformConstant
|
|
||||||
%7 = OpTypeSampler
|
|
||||||
%6 = OpTypePointer UniformConstant %7
|
|
||||||
%5 = OpVariable %6 UniformConstant
|
|
||||||
%9 = OpTypeVector %4 4
|
|
||||||
%12 = OpTypeInt 32 1
|
|
||||||
%11 = OpTypeVector %12 2
|
|
||||||
%13 = OpConstant %12 1
|
|
||||||
%14 = OpConstant %12 2
|
|
||||||
%15 = OpConstantComposite %11 %13 %14
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
%10 = OpLoad %3 %1
|
|
||||||
%8 = OpImageFetch %9 %10 %15
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
)"};
|
|
||||||
case ValidTextureOverload::kLoad2dI32:
|
|
||||||
return {
|
|
||||||
R"(
|
|
||||||
%4 = OpTypeInt 32 1
|
|
||||||
%3 = OpTypeImage %4 2D 0 0 0 1 Unknown
|
|
||||||
%2 = OpTypePointer UniformConstant %3
|
|
||||||
%1 = OpVariable %2 UniformConstant
|
|
||||||
%7 = OpTypeSampler
|
|
||||||
%6 = OpTypePointer UniformConstant %7
|
|
||||||
%5 = OpVariable %6 UniformConstant
|
|
||||||
%9 = OpTypeVector %4 4
|
|
||||||
%11 = OpTypeVector %4 2
|
|
||||||
%12 = OpConstant %4 1
|
|
||||||
%13 = OpConstant %4 2
|
|
||||||
%14 = OpConstantComposite %11 %12 %13
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
%10 = OpLoad %3 %1
|
|
||||||
%8 = OpImageFetch %9 %10 %14
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
)"};
|
)"};
|
||||||
case ValidTextureOverload::kLoad2dLevelF32:
|
case ValidTextureOverload::kLoad2dLevelF32:
|
||||||
return {
|
return {
|
||||||
|
@ -2813,77 +2683,6 @@ OpCapability Sampled1D
|
||||||
R"(
|
R"(
|
||||||
%10 = OpLoad %3 %1
|
%10 = OpLoad %3 %1
|
||||||
%8 = OpImageFetch %9 %10 %14 Lod %15
|
%8 = OpImageFetch %9 %10 %14 Lod %15
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
)"};
|
|
||||||
case ValidTextureOverload::kLoad2dArrayF32:
|
|
||||||
return {
|
|
||||||
R"(
|
|
||||||
%4 = OpTypeFloat 32
|
|
||||||
%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
|
|
||||||
%2 = OpTypePointer UniformConstant %3
|
|
||||||
%1 = OpVariable %2 UniformConstant
|
|
||||||
%7 = OpTypeSampler
|
|
||||||
%6 = OpTypePointer UniformConstant %7
|
|
||||||
%5 = OpVariable %6 UniformConstant
|
|
||||||
%9 = OpTypeVector %4 4
|
|
||||||
%12 = OpTypeInt 32 1
|
|
||||||
%11 = OpTypeVector %12 3
|
|
||||||
%13 = OpConstant %12 1
|
|
||||||
%14 = OpConstant %12 2
|
|
||||||
%15 = OpConstant %12 3
|
|
||||||
%16 = OpConstantComposite %11 %13 %14 %15
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
%10 = OpLoad %3 %1
|
|
||||||
%8 = OpImageFetch %9 %10 %16
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
)"};
|
|
||||||
case ValidTextureOverload::kLoad2dArrayU32:
|
|
||||||
return {
|
|
||||||
R"(
|
|
||||||
%4 = OpTypeInt 32 0
|
|
||||||
%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
|
|
||||||
%2 = OpTypePointer UniformConstant %3
|
|
||||||
%1 = OpVariable %2 UniformConstant
|
|
||||||
%7 = OpTypeSampler
|
|
||||||
%6 = OpTypePointer UniformConstant %7
|
|
||||||
%5 = OpVariable %6 UniformConstant
|
|
||||||
%9 = OpTypeVector %4 4
|
|
||||||
%12 = OpTypeInt 32 1
|
|
||||||
%11 = OpTypeVector %12 3
|
|
||||||
%13 = OpConstant %12 1
|
|
||||||
%14 = OpConstant %12 2
|
|
||||||
%15 = OpConstant %12 3
|
|
||||||
%16 = OpConstantComposite %11 %13 %14 %15
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
%10 = OpLoad %3 %1
|
|
||||||
%8 = OpImageFetch %9 %10 %16
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
)"};
|
|
||||||
case ValidTextureOverload::kLoad2dArrayI32:
|
|
||||||
return {
|
|
||||||
R"(
|
|
||||||
%4 = OpTypeInt 32 1
|
|
||||||
%3 = OpTypeImage %4 2D 0 1 0 1 Unknown
|
|
||||||
%2 = OpTypePointer UniformConstant %3
|
|
||||||
%1 = OpVariable %2 UniformConstant
|
|
||||||
%7 = OpTypeSampler
|
|
||||||
%6 = OpTypePointer UniformConstant %7
|
|
||||||
%5 = OpVariable %6 UniformConstant
|
|
||||||
%9 = OpTypeVector %4 4
|
|
||||||
%11 = OpTypeVector %4 3
|
|
||||||
%12 = OpConstant %4 1
|
|
||||||
%13 = OpConstant %4 2
|
|
||||||
%14 = OpConstant %4 3
|
|
||||||
%15 = OpConstantComposite %11 %12 %13 %14
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
%10 = OpLoad %3 %1
|
|
||||||
%8 = OpImageFetch %9 %10 %15
|
|
||||||
)",
|
)",
|
||||||
R"(
|
R"(
|
||||||
)"};
|
)"};
|
||||||
|
@ -2958,77 +2757,6 @@ OpCapability Sampled1D
|
||||||
R"(
|
R"(
|
||||||
%10 = OpLoad %3 %1
|
%10 = OpLoad %3 %1
|
||||||
%8 = OpImageFetch %9 %10 %15 Lod %16
|
%8 = OpImageFetch %9 %10 %15 Lod %16
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
)"};
|
|
||||||
case ValidTextureOverload::kLoad3dF32:
|
|
||||||
return {
|
|
||||||
R"(
|
|
||||||
%4 = OpTypeFloat 32
|
|
||||||
%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
|
|
||||||
%2 = OpTypePointer UniformConstant %3
|
|
||||||
%1 = OpVariable %2 UniformConstant
|
|
||||||
%7 = OpTypeSampler
|
|
||||||
%6 = OpTypePointer UniformConstant %7
|
|
||||||
%5 = OpVariable %6 UniformConstant
|
|
||||||
%9 = OpTypeVector %4 4
|
|
||||||
%12 = OpTypeInt 32 1
|
|
||||||
%11 = OpTypeVector %12 3
|
|
||||||
%13 = OpConstant %12 1
|
|
||||||
%14 = OpConstant %12 2
|
|
||||||
%15 = OpConstant %12 3
|
|
||||||
%16 = OpConstantComposite %11 %13 %14 %15
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
%10 = OpLoad %3 %1
|
|
||||||
%8 = OpImageFetch %9 %10 %16
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
)"};
|
|
||||||
case ValidTextureOverload::kLoad3dU32:
|
|
||||||
return {
|
|
||||||
R"(
|
|
||||||
%4 = OpTypeInt 32 0
|
|
||||||
%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
|
|
||||||
%2 = OpTypePointer UniformConstant %3
|
|
||||||
%1 = OpVariable %2 UniformConstant
|
|
||||||
%7 = OpTypeSampler
|
|
||||||
%6 = OpTypePointer UniformConstant %7
|
|
||||||
%5 = OpVariable %6 UniformConstant
|
|
||||||
%9 = OpTypeVector %4 4
|
|
||||||
%12 = OpTypeInt 32 1
|
|
||||||
%11 = OpTypeVector %12 3
|
|
||||||
%13 = OpConstant %12 1
|
|
||||||
%14 = OpConstant %12 2
|
|
||||||
%15 = OpConstant %12 3
|
|
||||||
%16 = OpConstantComposite %11 %13 %14 %15
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
%10 = OpLoad %3 %1
|
|
||||||
%8 = OpImageFetch %9 %10 %16
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
)"};
|
|
||||||
case ValidTextureOverload::kLoad3dI32:
|
|
||||||
return {
|
|
||||||
R"(
|
|
||||||
%4 = OpTypeInt 32 1
|
|
||||||
%3 = OpTypeImage %4 3D 0 0 0 1 Unknown
|
|
||||||
%2 = OpTypePointer UniformConstant %3
|
|
||||||
%1 = OpVariable %2 UniformConstant
|
|
||||||
%7 = OpTypeSampler
|
|
||||||
%6 = OpTypePointer UniformConstant %7
|
|
||||||
%5 = OpVariable %6 UniformConstant
|
|
||||||
%9 = OpTypeVector %4 4
|
|
||||||
%11 = OpTypeVector %4 3
|
|
||||||
%12 = OpConstant %4 1
|
|
||||||
%13 = OpConstant %4 2
|
|
||||||
%14 = OpConstant %4 3
|
|
||||||
%15 = OpConstantComposite %11 %12 %13 %14
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
%10 = OpLoad %3 %1
|
|
||||||
%8 = OpImageFetch %9 %10 %15
|
|
||||||
)",
|
)",
|
||||||
R"(
|
R"(
|
||||||
)"};
|
)"};
|
||||||
|
@ -3248,30 +2976,6 @@ OpCapability Sampled1D
|
||||||
R"(
|
R"(
|
||||||
%10 = OpLoad %3 %1
|
%10 = OpLoad %3 %1
|
||||||
%8 = OpImageFetch %9 %10 %15 Sample %16
|
%8 = OpImageFetch %9 %10 %15 Sample %16
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
)"};
|
|
||||||
case ValidTextureOverload::kLoadDepth2dF32:
|
|
||||||
return {
|
|
||||||
R"(
|
|
||||||
%4 = OpTypeFloat 32
|
|
||||||
%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
|
|
||||||
%2 = OpTypePointer UniformConstant %3
|
|
||||||
%1 = OpVariable %2 UniformConstant
|
|
||||||
%7 = OpTypeSampler
|
|
||||||
%6 = OpTypePointer UniformConstant %7
|
|
||||||
%5 = OpVariable %6 UniformConstant
|
|
||||||
%10 = OpTypeVector %4 4
|
|
||||||
%13 = OpTypeInt 32 1
|
|
||||||
%12 = OpTypeVector %13 2
|
|
||||||
%14 = OpConstant %13 1
|
|
||||||
%15 = OpConstant %13 2
|
|
||||||
%16 = OpConstantComposite %12 %14 %15
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
%11 = OpLoad %3 %1
|
|
||||||
%9 = OpImageFetch %10 %11 %16
|
|
||||||
%8 = OpCompositeExtract %4 %9 0
|
|
||||||
)",
|
)",
|
||||||
R"(
|
R"(
|
||||||
)"};
|
)"};
|
||||||
|
@ -3297,31 +3001,6 @@ OpCapability Sampled1D
|
||||||
%11 = OpLoad %3 %1
|
%11 = OpLoad %3 %1
|
||||||
%9 = OpImageFetch %10 %11 %16 Lod %17
|
%9 = OpImageFetch %10 %11 %16 Lod %17
|
||||||
%8 = OpCompositeExtract %4 %9 0
|
%8 = OpCompositeExtract %4 %9 0
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
)"};
|
|
||||||
case ValidTextureOverload::kLoadDepth2dArrayF32:
|
|
||||||
return {
|
|
||||||
R"(
|
|
||||||
%4 = OpTypeFloat 32
|
|
||||||
%3 = OpTypeImage %4 2D 1 1 0 1 Unknown
|
|
||||||
%2 = OpTypePointer UniformConstant %3
|
|
||||||
%1 = OpVariable %2 UniformConstant
|
|
||||||
%7 = OpTypeSampler
|
|
||||||
%6 = OpTypePointer UniformConstant %7
|
|
||||||
%5 = OpVariable %6 UniformConstant
|
|
||||||
%10 = OpTypeVector %4 4
|
|
||||||
%13 = OpTypeInt 32 1
|
|
||||||
%12 = OpTypeVector %13 3
|
|
||||||
%14 = OpConstant %13 1
|
|
||||||
%15 = OpConstant %13 2
|
|
||||||
%16 = OpConstant %13 3
|
|
||||||
%17 = OpConstantComposite %12 %14 %15 %16
|
|
||||||
)",
|
|
||||||
R"(
|
|
||||||
%11 = OpLoad %3 %1
|
|
||||||
%9 = OpImageFetch %10 %11 %17
|
|
||||||
%8 = OpCompositeExtract %4 %9 0
|
|
||||||
)",
|
)",
|
||||||
R"(
|
R"(
|
||||||
)"};
|
)"};
|
||||||
|
|
Loading…
Reference in New Issue