intrinsics: textureSampleCompareLevel()
Fixed: tint:862 Change-Id: If85fd589a500afe2c59ba581fcd0124d4b87dfde Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54181 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
parent
b4943bab50
commit
58e2fb1253
|
@ -128,6 +128,12 @@ enum class ValidTextureOverload {
|
|||
kSampleCompareDepth2dArrayOffsetF32,
|
||||
kSampleCompareDepthCubeF32,
|
||||
kSampleCompareDepthCubeArrayF32,
|
||||
kSampleCompareLevelDepth2dF32,
|
||||
kSampleCompareLevelDepth2dOffsetF32,
|
||||
kSampleCompareLevelDepth2dArrayF32,
|
||||
kSampleCompareLevelDepth2dArrayOffsetF32,
|
||||
kSampleCompareLevelDepthCubeF32,
|
||||
kSampleCompareLevelDepthCubeArrayF32,
|
||||
kLoad1dLevelF32,
|
||||
kLoad1dLevelU32,
|
||||
kLoad1dLevelI32,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -454,6 +454,12 @@ fn textureNumSamples<T: fiu32>(texture: texture_multisampled_2d<T>) -> i32
|
|||
[[stage("fragment")]] fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, offset: vec2<i32>) -> f32
|
||||
[[stage("fragment")]] fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
|
||||
[[stage("fragment")]] fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> f32
|
||||
fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32
|
||||
fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> f32
|
||||
fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> f32
|
||||
fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, offset: vec2<i32>) -> f32
|
||||
fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32
|
||||
fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> f32
|
||||
fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
|
||||
fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> vec4<f32>
|
||||
fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
|
||||
|
|
|
@ -1862,6 +1862,18 @@ const char* expected_texture_overload(
|
|||
return R"(textureSampleCompare(texture, sampler, coords, depth_ref))";
|
||||
case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
|
||||
return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
|
||||
return R"(textureSampleCompare(texture, sampler, coords, depth_ref))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
|
||||
return R"(textureSampleCompare(texture, sampler, coords, depth_ref, offset))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
|
||||
return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
|
||||
return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref, offset))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
|
||||
return R"(textureSampleCompare(texture, sampler, coords, depth_ref))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
|
||||
return R"(textureSampleCompare(texture, sampler, coords, array_index, depth_ref))";
|
||||
case ValidTextureOverload::kLoad1dLevelF32:
|
||||
return R"(textureLoad(texture, coords, level))";
|
||||
case ValidTextureOverload::kLoad1dLevelU32:
|
||||
|
|
|
@ -55,6 +55,7 @@ bool IsTextureIntrinsic(IntrinsicType i) {
|
|||
i == IntrinsicType::kTextureSampleLevel ||
|
||||
i == IntrinsicType::kTextureSampleBias ||
|
||||
i == IntrinsicType::kTextureSampleCompare ||
|
||||
i == IntrinsicType::kTextureSampleCompareLevel ||
|
||||
i == IntrinsicType::kTextureSampleGrad ||
|
||||
i == IntrinsicType::kTextureStore;
|
||||
}
|
||||
|
|
|
@ -111,6 +111,8 @@ INSTANTIATE_TEST_SUITE_P(
|
|||
IntrinsicData{"textureSampleBias", IntrinsicType::kTextureSampleBias},
|
||||
IntrinsicData{"textureSampleCompare",
|
||||
IntrinsicType::kTextureSampleCompare},
|
||||
IntrinsicData{"textureSampleCompareLevel",
|
||||
IntrinsicType::kTextureSampleCompareLevel},
|
||||
IntrinsicData{"textureSampleGrad", IntrinsicType::kTextureSampleGrad},
|
||||
IntrinsicData{"textureSampleLevel", IntrinsicType::kTextureSampleLevel},
|
||||
IntrinsicData{"trunc", IntrinsicType::kTrunc},
|
||||
|
|
|
@ -274,6 +274,9 @@ IntrinsicType ParseIntrinsicType(const std::string& name) {
|
|||
if (name == "textureSampleCompare") {
|
||||
return IntrinsicType::kTextureSampleCompare;
|
||||
}
|
||||
if (name == "textureSampleCompareLevel") {
|
||||
return IntrinsicType::kTextureSampleCompareLevel;
|
||||
}
|
||||
if (name == "textureSampleGrad") {
|
||||
return IntrinsicType::kTextureSampleGrad;
|
||||
}
|
||||
|
@ -457,6 +460,8 @@ const char* str(IntrinsicType i) {
|
|||
return "textureSampleBias";
|
||||
case IntrinsicType::kTextureSampleCompare:
|
||||
return "textureSampleCompare";
|
||||
case IntrinsicType::kTextureSampleCompareLevel:
|
||||
return "textureSampleCompareLevel";
|
||||
case IntrinsicType::kTextureSampleGrad:
|
||||
return "textureSampleGrad";
|
||||
case IntrinsicType::kTextureSampleLevel:
|
||||
|
|
|
@ -115,6 +115,7 @@ enum class IntrinsicType {
|
|||
kTextureSample,
|
||||
kTextureSampleBias,
|
||||
kTextureSampleCompare,
|
||||
kTextureSampleCompareLevel,
|
||||
kTextureSampleGrad,
|
||||
kTextureSampleLevel,
|
||||
kTextureStore,
|
||||
|
|
|
@ -1117,6 +1117,9 @@ bool GeneratorImpl::EmitTextureCall(std::ostream& pre,
|
|||
out << ".SampleGrad(";
|
||||
break;
|
||||
case sem::IntrinsicType::kTextureSampleCompare:
|
||||
out << ".SampleCmp(";
|
||||
break;
|
||||
case sem::IntrinsicType::kTextureSampleCompareLevel:
|
||||
out << ".SampleCmpLevelZero(";
|
||||
break;
|
||||
case sem::IntrinsicType::kTextureLoad:
|
||||
|
|
|
@ -268,16 +268,28 @@ ExpectedResult expected_texture_overload(
|
|||
case ValidTextureOverload::kSampleGradCubeArrayF32:
|
||||
return R"(tint_symbol.SampleGrad(tint_symbol_1, 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::kSampleCompareDepth2dF32:
|
||||
return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float2(1.0f, 2.0f), 3.0f))";
|
||||
return R"(tint_symbol.SampleCmp(tint_symbol_1, float2(1.0f, 2.0f), 3.0f))";
|
||||
case ValidTextureOverload::kSampleCompareDepth2dOffsetF32:
|
||||
return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))";
|
||||
return R"(tint_symbol.SampleCmp(tint_symbol_1, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))";
|
||||
case ValidTextureOverload::kSampleCompareDepth2dArrayF32:
|
||||
return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f))";
|
||||
return R"(tint_symbol.SampleCmp(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f))";
|
||||
case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32:
|
||||
return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f, int2(5, 6)))";
|
||||
return R"(tint_symbol.SampleCmp(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f, int2(5, 6)))";
|
||||
case ValidTextureOverload::kSampleCompareDepthCubeF32:
|
||||
return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f))";
|
||||
return R"(tint_symbol.SampleCmp(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f))";
|
||||
case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
|
||||
return R"(tint_symbol.SampleCmp(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
|
||||
return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float2(1.0f, 2.0f), 3.0f))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
|
||||
return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
|
||||
return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
|
||||
return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float3(1.0f, 2.0f, float(4)), 3.0f, int2(5, 6)))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
|
||||
return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
|
||||
return R"(tint_symbol.SampleCmpLevelZero(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4)), 5.0f))";
|
||||
case ValidTextureOverload::kLoad1dLevelF32:
|
||||
return R"(tint_symbol.Load(int2(1, 0), 3))";
|
||||
|
|
|
@ -650,6 +650,7 @@ bool GeneratorImpl::EmitTextureCall(ast::CallExpression* expr,
|
|||
out_ << ".sample(";
|
||||
break;
|
||||
case sem::IntrinsicType::kTextureSampleCompare:
|
||||
case sem::IntrinsicType::kTextureSampleCompareLevel:
|
||||
out_ << ".sample_compare(";
|
||||
break;
|
||||
case sem::IntrinsicType::kTextureLoad:
|
||||
|
@ -732,6 +733,10 @@ bool GeneratorImpl::EmitTextureCall(ast::CallExpression* expr,
|
|||
out_ << ")";
|
||||
}
|
||||
}
|
||||
if (intrinsic->Type() == sem::IntrinsicType::kTextureSampleCompareLevel) {
|
||||
maybe_write_comma();
|
||||
out_ << "level(0)";
|
||||
}
|
||||
if (auto* ddx = arg(Usage::kDdx)) {
|
||||
auto dim = texture_type->dim();
|
||||
switch (dim) {
|
||||
|
|
|
@ -180,6 +180,18 @@ std::string expected_texture_overload(
|
|||
return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4.0f))";
|
||||
case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
|
||||
return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4, 5.0f))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
|
||||
return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 3.0f))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
|
||||
return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 3.0f, int2(4, 5)))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
|
||||
return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 4, 3.0f))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
|
||||
return R"(texture.sample_compare(sampler, float2(1.0f, 2.0f), 4, 3.0f, int2(5, 6)))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
|
||||
return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4.0f))";
|
||||
case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
|
||||
return R"(texture.sample_compare(sampler, float3(1.0f, 2.0f, 3.0f), 4, 5.0f))";
|
||||
case ValidTextureOverload::kLoad1dLevelF32:
|
||||
return R"(texture.read(uint(1), 3))";
|
||||
case ValidTextureOverload::kLoad1dLevelU32:
|
||||
|
|
|
@ -2783,6 +2783,15 @@ bool Builder::GenerateTextureIntrinsic(ast::CallExpression* call,
|
|||
break;
|
||||
}
|
||||
case IntrinsicType::kTextureSampleCompare: {
|
||||
op = spv::Op::OpImageSampleDrefImplicitLod;
|
||||
append_result_type_and_id_to_spirv_params();
|
||||
if (!append_image_and_coords_to_spirv_params()) {
|
||||
return false;
|
||||
}
|
||||
spirv_params.emplace_back(gen_arg(Usage::kDepthRef));
|
||||
break;
|
||||
}
|
||||
case IntrinsicType::kTextureSampleCompareLevel: {
|
||||
op = spv::Op::OpImageSampleDrefExplicitLod;
|
||||
append_result_type_and_id_to_spirv_params();
|
||||
if (!append_image_and_coords_to_spirv_params()) {
|
||||
|
|
|
@ -549,7 +549,7 @@ TEST_F(IntrinsicBuilderTest, Call_TextureSampleCompare_Twice) {
|
|||
ASSERT_TRUE(b.GenerateGlobalVariable(sampler)) << b.error();
|
||||
|
||||
EXPECT_EQ(b.GenerateExpression(expr1), 8u) << b.error();
|
||||
EXPECT_EQ(b.GenerateExpression(expr2), 18u) << b.error();
|
||||
EXPECT_EQ(b.GenerateExpression(expr2), 17u) << b.error();
|
||||
|
||||
EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeFloat 32
|
||||
%3 = OpTypeImage %4 2D 1 0 0 1 Unknown
|
||||
|
@ -563,18 +563,17 @@ TEST_F(IntrinsicBuilderTest, Call_TextureSampleCompare_Twice) {
|
|||
%14 = OpConstant %4 1
|
||||
%15 = OpConstant %4 2
|
||||
%16 = OpConstantComposite %13 %14 %15
|
||||
%17 = OpConstant %4 0
|
||||
)");
|
||||
|
||||
EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
|
||||
R"(%9 = OpLoad %7 %5
|
||||
%10 = OpLoad %3 %1
|
||||
%12 = OpSampledImage %11 %10 %9
|
||||
%8 = OpImageSampleDrefExplicitLod %4 %12 %16 %15 Lod %17
|
||||
%19 = OpLoad %7 %5
|
||||
%20 = OpLoad %3 %1
|
||||
%21 = OpSampledImage %11 %20 %19
|
||||
%18 = OpImageSampleDrefExplicitLod %4 %21 %16 %15 Lod %17
|
||||
%8 = OpImageSampleDrefImplicitLod %4 %12 %16 %15
|
||||
%18 = OpLoad %7 %5
|
||||
%19 = OpLoad %3 %1
|
||||
%20 = OpSampledImage %11 %19 %18
|
||||
%17 = OpImageSampleDrefImplicitLod %4 %20 %16 %15
|
||||
)");
|
||||
}
|
||||
|
||||
|
|
|
@ -2321,6 +2321,177 @@ OpCapability SampledCubeArray
|
|||
%15 = OpConstant %4 2
|
||||
%16 = OpConstantComposite %13 %14 %15
|
||||
%17 = OpConstant %4 3
|
||||
)",
|
||||
R"(
|
||||
%9 = OpLoad %7 %5
|
||||
%10 = OpLoad %3 %1
|
||||
%12 = OpSampledImage %11 %10 %9
|
||||
%8 = OpImageSampleDrefImplicitLod %4 %12 %16 %17
|
||||
)",
|
||||
R"(
|
||||
)"};
|
||||
case ValidTextureOverload::kSampleCompareDepth2dOffsetF32:
|
||||
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
|
||||
%11 = OpTypeSampledImage %3
|
||||
%13 = OpTypeVector %4 2
|
||||
%14 = OpConstant %4 1
|
||||
%15 = OpConstant %4 2
|
||||
%16 = OpConstantComposite %13 %14 %15
|
||||
%17 = OpConstant %4 3
|
||||
%19 = OpTypeInt 32 1
|
||||
%18 = OpTypeVector %19 2
|
||||
%20 = OpConstant %19 4
|
||||
%21 = OpConstant %19 5
|
||||
%22 = OpConstantComposite %18 %20 %21
|
||||
)",
|
||||
R"(
|
||||
%9 = OpLoad %7 %5
|
||||
%10 = OpLoad %3 %1
|
||||
%12 = OpSampledImage %11 %10 %9
|
||||
%8 = OpImageSampleDrefImplicitLod %4 %12 %16 %17 ConstOffset %22
|
||||
)",
|
||||
R"(
|
||||
)"};
|
||||
case ValidTextureOverload::kSampleCompareDepth2dArrayF32:
|
||||
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
|
||||
%11 = OpTypeSampledImage %3
|
||||
%13 = OpTypeVector %4 3
|
||||
%14 = OpConstant %4 1
|
||||
%15 = OpConstant %4 2
|
||||
%17 = OpTypeInt 32 1
|
||||
%18 = OpConstant %17 4
|
||||
%20 = OpConstant %4 3
|
||||
)",
|
||||
R"(
|
||||
%9 = OpLoad %7 %5
|
||||
%10 = OpLoad %3 %1
|
||||
%12 = OpSampledImage %11 %10 %9
|
||||
%16 = OpConvertSToF %4 %18
|
||||
%19 = OpCompositeConstruct %13 %14 %15 %16
|
||||
%8 = OpImageSampleDrefImplicitLod %4 %12 %19 %20
|
||||
)",
|
||||
R"(
|
||||
)"};
|
||||
case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32:
|
||||
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
|
||||
%11 = OpTypeSampledImage %3
|
||||
%13 = OpTypeVector %4 3
|
||||
%14 = OpConstant %4 1
|
||||
%15 = OpConstant %4 2
|
||||
%17 = OpTypeInt 32 1
|
||||
%18 = OpConstant %17 4
|
||||
%20 = OpConstant %4 3
|
||||
%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 = OpConvertSToF %4 %18
|
||||
%19 = OpCompositeConstruct %13 %14 %15 %16
|
||||
%8 = OpImageSampleDrefImplicitLod %4 %12 %19 %20 ConstOffset %24
|
||||
)",
|
||||
R"(
|
||||
)"};
|
||||
case ValidTextureOverload::kSampleCompareDepthCubeF32:
|
||||
return {
|
||||
R"(
|
||||
%4 = OpTypeFloat 32
|
||||
%3 = OpTypeImage %4 Cube 1 0 0 1 Unknown
|
||||
%2 = OpTypePointer UniformConstant %3
|
||||
%1 = OpVariable %2 UniformConstant
|
||||
%7 = OpTypeSampler
|
||||
%6 = OpTypePointer UniformConstant %7
|
||||
%5 = OpVariable %6 UniformConstant
|
||||
%11 = OpTypeSampledImage %3
|
||||
%13 = OpTypeVector %4 3
|
||||
%14 = OpConstant %4 1
|
||||
%15 = OpConstant %4 2
|
||||
%16 = OpConstant %4 3
|
||||
%17 = OpConstantComposite %13 %14 %15 %16
|
||||
%18 = OpConstant %4 4
|
||||
)",
|
||||
R"(
|
||||
%9 = OpLoad %7 %5
|
||||
%10 = OpLoad %3 %1
|
||||
%12 = OpSampledImage %11 %10 %9
|
||||
%8 = OpImageSampleDrefImplicitLod %4 %12 %17 %18
|
||||
)",
|
||||
R"(
|
||||
)"};
|
||||
case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
|
||||
return {
|
||||
R"(
|
||||
%4 = OpTypeFloat 32
|
||||
%3 = OpTypeImage %4 Cube 1 1 0 1 Unknown
|
||||
%2 = OpTypePointer UniformConstant %3
|
||||
%1 = OpVariable %2 UniformConstant
|
||||
%7 = OpTypeSampler
|
||||
%6 = OpTypePointer UniformConstant %7
|
||||
%5 = OpVariable %6 UniformConstant
|
||||
%11 = OpTypeSampledImage %3
|
||||
%13 = OpTypeVector %4 4
|
||||
%14 = OpConstant %4 1
|
||||
%15 = OpConstant %4 2
|
||||
%16 = OpConstant %4 3
|
||||
%18 = OpTypeInt 32 1
|
||||
%19 = OpConstant %18 4
|
||||
%21 = OpConstant %4 5
|
||||
)",
|
||||
R"(
|
||||
%9 = OpLoad %7 %5
|
||||
%10 = OpLoad %3 %1
|
||||
%12 = OpSampledImage %11 %10 %9
|
||||
%17 = OpConvertSToF %4 %19
|
||||
%20 = OpCompositeConstruct %13 %14 %15 %16 %17
|
||||
%8 = OpImageSampleDrefImplicitLod %4 %12 %20 %21
|
||||
)",
|
||||
R"(
|
||||
OpCapability SampledCubeArray
|
||||
)"};
|
||||
case ValidTextureOverload::kSampleCompareLevelDepth2dF32:
|
||||
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
|
||||
%11 = OpTypeSampledImage %3
|
||||
%13 = OpTypeVector %4 2
|
||||
%14 = OpConstant %4 1
|
||||
%15 = OpConstant %4 2
|
||||
%16 = OpConstantComposite %13 %14 %15
|
||||
%17 = OpConstant %4 3
|
||||
%18 = OpConstant %4 0
|
||||
)",
|
||||
R"(
|
||||
|
@ -2331,7 +2502,7 @@ OpCapability SampledCubeArray
|
|||
)",
|
||||
R"(
|
||||
)"};
|
||||
case ValidTextureOverload::kSampleCompareDepth2dOffsetF32:
|
||||
case ValidTextureOverload::kSampleCompareLevelDepth2dOffsetF32:
|
||||
return {
|
||||
R"(
|
||||
%4 = OpTypeFloat 32
|
||||
|
@ -2362,7 +2533,7 @@ OpCapability SampledCubeArray
|
|||
)",
|
||||
R"(
|
||||
)"};
|
||||
case ValidTextureOverload::kSampleCompareDepth2dArrayF32:
|
||||
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayF32:
|
||||
return {
|
||||
R"(
|
||||
%4 = OpTypeFloat 32
|
||||
|
@ -2391,7 +2562,7 @@ OpCapability SampledCubeArray
|
|||
)",
|
||||
R"(
|
||||
)"};
|
||||
case ValidTextureOverload::kSampleCompareDepth2dArrayOffsetF32:
|
||||
case ValidTextureOverload::kSampleCompareLevelDepth2dArrayOffsetF32:
|
||||
return {
|
||||
R"(
|
||||
%4 = OpTypeFloat 32
|
||||
|
@ -2424,7 +2595,7 @@ OpCapability SampledCubeArray
|
|||
)",
|
||||
R"(
|
||||
)"};
|
||||
case ValidTextureOverload::kSampleCompareDepthCubeF32:
|
||||
case ValidTextureOverload::kSampleCompareLevelDepthCubeF32:
|
||||
return {
|
||||
R"(
|
||||
%4 = OpTypeFloat 32
|
||||
|
@ -2451,7 +2622,7 @@ OpCapability SampledCubeArray
|
|||
)",
|
||||
R"(
|
||||
)"};
|
||||
case ValidTextureOverload::kSampleCompareDepthCubeArrayF32:
|
||||
case ValidTextureOverload::kSampleCompareLevelDepthCubeArrayF32:
|
||||
return {
|
||||
R"(
|
||||
%4 = OpTypeFloat 32
|
||||
|
|
|
@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1);
|
|||
SamplerComparisonState arg_1 : register(s1, space1);
|
||||
|
||||
void textureSampleCompare_25fcd1() {
|
||||
float res = arg_0.SampleCmpLevelZero(arg_1, float2(0.0f, 0.0f), 1.0f, int2(0, 0));
|
||||
float res = arg_0.SampleCmp(arg_1, float2(0.0f, 0.0f), 1.0f, int2(0, 0));
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 30
|
||||
; Bound: 29
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
|
@ -29,24 +29,23 @@
|
|||
%v2float = OpTypeVector %float 2
|
||||
%18 = OpConstantNull %v2float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_0 = OpConstant %float 0
|
||||
%int = OpTypeInt 32 1
|
||||
%v2int = OpTypeVector %int 2
|
||||
%23 = OpConstantNull %v2int
|
||||
%22 = OpConstantNull %v2int
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%26 = OpConstantNull %float
|
||||
%25 = OpConstantNull %float
|
||||
%textureSampleCompare_25fcd1 = OpFunction %void None %8
|
||||
%11 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %26
|
||||
%res = OpVariable %_ptr_Function_float Function %25
|
||||
%13 = OpLoad %7 %arg_1
|
||||
%14 = OpLoad %3 %arg_0
|
||||
%16 = OpSampledImage %15 %14 %13
|
||||
%12 = OpImageSampleDrefExplicitLod %float %16 %18 %float_1 Lod|ConstOffset %float_0 %23
|
||||
%12 = OpImageSampleDrefImplicitLod %float %16 %18 %float_1 ConstOffset %22
|
||||
OpStore %res %12
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %8
|
||||
%28 = OpLabel
|
||||
%29 = OpFunctionCall %void %textureSampleCompare_25fcd1
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %textureSampleCompare_25fcd1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
|
|
@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1);
|
|||
SamplerComparisonState arg_1 : register(s1, space1);
|
||||
|
||||
void textureSampleCompare_3a5923() {
|
||||
float res = arg_0.SampleCmpLevelZero(arg_1, float2(0.0f, 0.0f), 1.0f);
|
||||
float res = arg_0.SampleCmp(arg_1, float2(0.0f, 0.0f), 1.0f);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 27
|
||||
; Bound: 26
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
|
@ -29,21 +29,20 @@
|
|||
%v2float = OpTypeVector %float 2
|
||||
%18 = OpConstantNull %v2float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_0 = OpConstant %float 0
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%23 = OpConstantNull %float
|
||||
%22 = OpConstantNull %float
|
||||
%textureSampleCompare_3a5923 = OpFunction %void None %8
|
||||
%11 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %23
|
||||
%res = OpVariable %_ptr_Function_float Function %22
|
||||
%13 = OpLoad %7 %arg_1
|
||||
%14 = OpLoad %3 %arg_0
|
||||
%16 = OpSampledImage %15 %14 %13
|
||||
%12 = OpImageSampleDrefExplicitLod %float %16 %18 %float_1 Lod %float_0
|
||||
%12 = OpImageSampleDrefImplicitLod %float %16 %18 %float_1
|
||||
OpStore %res %12
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %8
|
||||
%25 = OpLabel
|
||||
%26 = OpFunctionCall %void %textureSampleCompare_3a5923
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %void %textureSampleCompare_3a5923
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
|
|
@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1);
|
|||
SamplerComparisonState arg_1 : register(s1, space1);
|
||||
|
||||
void textureSampleCompare_63fb83() {
|
||||
float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, 0.0f), 1.0f);
|
||||
float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, 0.0f), 1.0f);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 27
|
||||
; Bound: 26
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
|
@ -29,21 +29,20 @@
|
|||
%v3float = OpTypeVector %float 3
|
||||
%18 = OpConstantNull %v3float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_0 = OpConstant %float 0
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%23 = OpConstantNull %float
|
||||
%22 = OpConstantNull %float
|
||||
%textureSampleCompare_63fb83 = OpFunction %void None %8
|
||||
%11 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %23
|
||||
%res = OpVariable %_ptr_Function_float Function %22
|
||||
%13 = OpLoad %7 %arg_1
|
||||
%14 = OpLoad %3 %arg_0
|
||||
%16 = OpSampledImage %15 %14 %13
|
||||
%12 = OpImageSampleDrefExplicitLod %float %16 %18 %float_1 Lod %float_0
|
||||
%12 = OpImageSampleDrefImplicitLod %float %16 %18 %float_1
|
||||
OpStore %res %12
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %8
|
||||
%25 = OpLabel
|
||||
%26 = OpFunctionCall %void %textureSampleCompare_63fb83
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %void %textureSampleCompare_63fb83
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
|
|
@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1);
|
|||
SamplerComparisonState arg_1 : register(s1, space1);
|
||||
|
||||
void textureSampleCompare_98b85c() {
|
||||
float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, int2(0, 0));
|
||||
float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, int2(0, 0));
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
%16 = OpSampledImage %15 %14 %13
|
||||
%19 = OpConvertSToF %float %int_1
|
||||
%22 = OpCompositeConstruct %v3float %float_0 %float_0 %19
|
||||
%12 = OpImageSampleDrefExplicitLod %float %16 %22 %float_1 Lod|ConstOffset %float_0 %25
|
||||
%12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1 ConstOffset %25
|
||||
OpStore %res %12
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
|
|
@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1);
|
|||
SamplerComparisonState arg_1 : register(s1, space1);
|
||||
|
||||
void textureSampleCompare_a3ca7e() {
|
||||
float res = arg_0.SampleCmpLevelZero(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f);
|
||||
float res = arg_0.SampleCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
%16 = OpSampledImage %15 %14 %13
|
||||
%19 = OpConvertSToF %float %int_1
|
||||
%22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19
|
||||
%12 = OpImageSampleDrefExplicitLod %float %16 %22 %float_1 Lod %float_0
|
||||
%12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1
|
||||
OpStore %res %12
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
|
|
@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1);
|
|||
SamplerComparisonState arg_1 : register(s1, space1);
|
||||
|
||||
void textureSampleCompare_dd431d() {
|
||||
float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f);
|
||||
float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
%16 = OpSampledImage %15 %14 %13
|
||||
%19 = OpConvertSToF %float %int_1
|
||||
%22 = OpCompositeConstruct %v3float %float_0 %float_0 %19
|
||||
%12 = OpImageSampleDrefExplicitLod %float %16 %22 %float_1 Lod %float_0
|
||||
%12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1
|
||||
OpStore %res %12
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
[[group(1), binding(0)]] var arg_0: texture_depth_2d_array;
|
||||
[[group(1), binding(1)]] var arg_1: sampler_comparison;
|
||||
fn textureSampleCompareLevel_011a8f() {
|
||||
var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1, 1.0, vec2<i32>());
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
textureSampleCompareLevel_011a8f();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
textureSampleCompareLevel_011a8f();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
textureSampleCompareLevel_011a8f();
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
Texture2DArray arg_0 : register(t0, space1);
|
||||
SamplerComparisonState arg_1 : register(s1, space1);
|
||||
|
||||
void textureSampleCompareLevel_011a8f() {
|
||||
float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, int2(0, 0));
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
textureSampleCompareLevel_011a8f();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
textureSampleCompareLevel_011a8f();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
textureSampleCompareLevel_011a8f();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
|
||||
Validation Failure:
|
||||
|
||||
Compilation failed:
|
||||
|
||||
program_source:9:15: error: use of undeclared identifier 'arg_0'
|
||||
float res = arg_0.sample_compare(arg_1, float2(), 1, 1.0f, level(0), int2());
|
||||
^
|
||||
program_source:9:36: error: use of undeclared identifier 'arg_1'
|
||||
float res = arg_0.sample_compare(arg_1, float2(), 1, 1.0f, level(0), int2());
|
||||
^
|
|
@ -0,0 +1,90 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 49
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %arg_0 "arg_0"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %textureSampleCompareLevel_011a8f "textureSampleCompareLevel_011a8f"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %arg_0 DescriptorSet 1
|
||||
OpDecorate %arg_0 Binding 0
|
||||
OpDecorate %arg_1 DescriptorSet 1
|
||||
OpDecorate %arg_1 Binding 1
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%7 = OpTypeImage %float 2D 1 1 0 1 Unknown
|
||||
%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
|
||||
%arg_0 = OpVariable %_ptr_UniformConstant_7 UniformConstant
|
||||
%10 = OpTypeSampler
|
||||
%_ptr_UniformConstant_10 = OpTypePointer UniformConstant %10
|
||||
%arg_1 = OpVariable %_ptr_UniformConstant_10 UniformConstant
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%14 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %14
|
||||
%void = OpTypeVoid
|
||||
%15 = OpTypeFunction %void
|
||||
%22 = OpTypeSampledImage %7
|
||||
%v3float = OpTypeVector %float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%int = OpTypeInt 32 1
|
||||
%int_1 = OpConstant %int 1
|
||||
%float_1 = OpConstant %float 1
|
||||
%v2int = OpTypeVector %int 2
|
||||
%32 = OpConstantNull %v2int
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%35 = OpTypeFunction %void %v4float
|
||||
%textureSampleCompareLevel_011a8f = OpFunction %void None %15
|
||||
%18 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %4
|
||||
%20 = OpLoad %10 %arg_1
|
||||
%21 = OpLoad %7 %arg_0
|
||||
%23 = OpSampledImage %22 %21 %20
|
||||
%26 = OpConvertSToF %float %int_1
|
||||
%29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
|
||||
%19 = OpImageSampleDrefExplicitLod %float %23 %29 %float_1 Lod|ConstOffset %float_0 %32
|
||||
OpStore %res %19
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %35
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%38 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %15
|
||||
%40 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%41 = OpFunctionCall %void %textureSampleCompareLevel_011a8f
|
||||
%42 = OpFunctionCall %void %tint_symbol_2 %14
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %15
|
||||
%44 = OpLabel
|
||||
%45 = OpFunctionCall %void %textureSampleCompareLevel_011a8f
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %15
|
||||
%47 = OpLabel
|
||||
%48 = OpFunctionCall %void %textureSampleCompareLevel_011a8f
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,23 @@
|
|||
[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array;
|
||||
|
||||
[[group(1), binding(1)]] var arg_1 : sampler_comparison;
|
||||
|
||||
fn textureSampleCompareLevel_011a8f() {
|
||||
var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1, 1.0, vec2<i32>());
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
textureSampleCompareLevel_011a8f();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
textureSampleCompareLevel_011a8f();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
textureSampleCompareLevel_011a8f();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
[[group(1), binding(0)]] var arg_0: texture_depth_2d_array;
|
||||
[[group(1), binding(1)]] var arg_1: sampler_comparison;
|
||||
fn textureSampleCompareLevel_1116ed() {
|
||||
var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1, 1.0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
textureSampleCompareLevel_1116ed();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
textureSampleCompareLevel_1116ed();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
textureSampleCompareLevel_1116ed();
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
Texture2DArray arg_0 : register(t0, space1);
|
||||
SamplerComparisonState arg_1 : register(s1, space1);
|
||||
|
||||
void textureSampleCompareLevel_1116ed() {
|
||||
float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f);
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
textureSampleCompareLevel_1116ed();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
textureSampleCompareLevel_1116ed();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
textureSampleCompareLevel_1116ed();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
|
||||
Validation Failure:
|
||||
|
||||
Compilation failed:
|
||||
|
||||
program_source:9:15: error: use of undeclared identifier 'arg_0'
|
||||
float res = arg_0.sample_compare(arg_1, float2(), 1, 1.0f, level(0));
|
||||
^
|
||||
program_source:9:36: error: use of undeclared identifier 'arg_1'
|
||||
float res = arg_0.sample_compare(arg_1, float2(), 1, 1.0f, level(0));
|
||||
^
|
|
@ -0,0 +1,88 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 47
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %arg_0 "arg_0"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %textureSampleCompareLevel_1116ed "textureSampleCompareLevel_1116ed"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %arg_0 DescriptorSet 1
|
||||
OpDecorate %arg_0 Binding 0
|
||||
OpDecorate %arg_1 DescriptorSet 1
|
||||
OpDecorate %arg_1 Binding 1
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%7 = OpTypeImage %float 2D 1 1 0 1 Unknown
|
||||
%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
|
||||
%arg_0 = OpVariable %_ptr_UniformConstant_7 UniformConstant
|
||||
%10 = OpTypeSampler
|
||||
%_ptr_UniformConstant_10 = OpTypePointer UniformConstant %10
|
||||
%arg_1 = OpVariable %_ptr_UniformConstant_10 UniformConstant
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%14 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %14
|
||||
%void = OpTypeVoid
|
||||
%15 = OpTypeFunction %void
|
||||
%22 = OpTypeSampledImage %7
|
||||
%v3float = OpTypeVector %float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%int = OpTypeInt 32 1
|
||||
%int_1 = OpConstant %int 1
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%33 = OpTypeFunction %void %v4float
|
||||
%textureSampleCompareLevel_1116ed = OpFunction %void None %15
|
||||
%18 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %4
|
||||
%20 = OpLoad %10 %arg_1
|
||||
%21 = OpLoad %7 %arg_0
|
||||
%23 = OpSampledImage %22 %21 %20
|
||||
%26 = OpConvertSToF %float %int_1
|
||||
%29 = OpCompositeConstruct %v3float %float_0 %float_0 %26
|
||||
%19 = OpImageSampleDrefExplicitLod %float %23 %29 %float_1 Lod %float_0
|
||||
OpStore %res %19
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %33
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%36 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %15
|
||||
%38 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%39 = OpFunctionCall %void %textureSampleCompareLevel_1116ed
|
||||
%40 = OpFunctionCall %void %tint_symbol_2 %14
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %15
|
||||
%42 = OpLabel
|
||||
%43 = OpFunctionCall %void %textureSampleCompareLevel_1116ed
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %15
|
||||
%45 = OpLabel
|
||||
%46 = OpFunctionCall %void %textureSampleCompareLevel_1116ed
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,23 @@
|
|||
[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array;
|
||||
|
||||
[[group(1), binding(1)]] var arg_1 : sampler_comparison;
|
||||
|
||||
fn textureSampleCompareLevel_1116ed() {
|
||||
var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1, 1.0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
textureSampleCompareLevel_1116ed();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
textureSampleCompareLevel_1116ed();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
textureSampleCompareLevel_1116ed();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
[[group(1), binding(0)]] var arg_0: texture_depth_cube;
|
||||
[[group(1), binding(1)]] var arg_1: sampler_comparison;
|
||||
fn textureSampleCompareLevel_1568e3() {
|
||||
var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(), 1.0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
textureSampleCompareLevel_1568e3();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
textureSampleCompareLevel_1568e3();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
textureSampleCompareLevel_1568e3();
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
TextureCube arg_0 : register(t0, space1);
|
||||
SamplerComparisonState arg_1 : register(s1, space1);
|
||||
|
||||
void textureSampleCompareLevel_1568e3() {
|
||||
float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, 0.0f), 1.0f);
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
textureSampleCompareLevel_1568e3();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
textureSampleCompareLevel_1568e3();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
textureSampleCompareLevel_1568e3();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
|
||||
Validation Failure:
|
||||
|
||||
Compilation failed:
|
||||
|
||||
program_source:9:15: error: use of undeclared identifier 'arg_0'
|
||||
float res = arg_0.sample_compare(arg_1, float3(), 1.0f, level(0));
|
||||
^
|
||||
program_source:9:36: error: use of undeclared identifier 'arg_1'
|
||||
float res = arg_0.sample_compare(arg_1, float3(), 1.0f, level(0));
|
||||
^
|
|
@ -0,0 +1,85 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 44
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %arg_0 "arg_0"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %textureSampleCompareLevel_1568e3 "textureSampleCompareLevel_1568e3"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %arg_0 DescriptorSet 1
|
||||
OpDecorate %arg_0 Binding 0
|
||||
OpDecorate %arg_1 DescriptorSet 1
|
||||
OpDecorate %arg_1 Binding 1
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%7 = OpTypeImage %float Cube 1 0 0 1 Unknown
|
||||
%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
|
||||
%arg_0 = OpVariable %_ptr_UniformConstant_7 UniformConstant
|
||||
%10 = OpTypeSampler
|
||||
%_ptr_UniformConstant_10 = OpTypePointer UniformConstant %10
|
||||
%arg_1 = OpVariable %_ptr_UniformConstant_10 UniformConstant
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%14 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %14
|
||||
%void = OpTypeVoid
|
||||
%15 = OpTypeFunction %void
|
||||
%22 = OpTypeSampledImage %7
|
||||
%v3float = OpTypeVector %float 3
|
||||
%25 = OpConstantNull %v3float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_0 = OpConstant %float 0
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%30 = OpTypeFunction %void %v4float
|
||||
%textureSampleCompareLevel_1568e3 = OpFunction %void None %15
|
||||
%18 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %4
|
||||
%20 = OpLoad %10 %arg_1
|
||||
%21 = OpLoad %7 %arg_0
|
||||
%23 = OpSampledImage %22 %21 %20
|
||||
%19 = OpImageSampleDrefExplicitLod %float %23 %25 %float_1 Lod %float_0
|
||||
OpStore %res %19
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %30
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%33 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %15
|
||||
%35 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%36 = OpFunctionCall %void %textureSampleCompareLevel_1568e3
|
||||
%37 = OpFunctionCall %void %tint_symbol_2 %14
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %15
|
||||
%39 = OpLabel
|
||||
%40 = OpFunctionCall %void %textureSampleCompareLevel_1568e3
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %15
|
||||
%42 = OpLabel
|
||||
%43 = OpFunctionCall %void %textureSampleCompareLevel_1568e3
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,23 @@
|
|||
[[group(1), binding(0)]] var arg_0 : texture_depth_cube;
|
||||
|
||||
[[group(1), binding(1)]] var arg_1 : sampler_comparison;
|
||||
|
||||
fn textureSampleCompareLevel_1568e3() {
|
||||
var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(), 1.0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
textureSampleCompareLevel_1568e3();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
textureSampleCompareLevel_1568e3();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
textureSampleCompareLevel_1568e3();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
[[group(1), binding(0)]] var arg_0: texture_depth_2d;
|
||||
[[group(1), binding(1)]] var arg_1: sampler_comparison;
|
||||
fn textureSampleCompareLevel_2ad2b1() {
|
||||
var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1.0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
textureSampleCompareLevel_2ad2b1();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
textureSampleCompareLevel_2ad2b1();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
textureSampleCompareLevel_2ad2b1();
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
Texture2D arg_0 : register(t0, space1);
|
||||
SamplerComparisonState arg_1 : register(s1, space1);
|
||||
|
||||
void textureSampleCompareLevel_2ad2b1() {
|
||||
float res = arg_0.SampleCmpLevelZero(arg_1, float2(0.0f, 0.0f), 1.0f);
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
textureSampleCompareLevel_2ad2b1();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
textureSampleCompareLevel_2ad2b1();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
textureSampleCompareLevel_2ad2b1();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
|
||||
Validation Failure:
|
||||
|
||||
Compilation failed:
|
||||
|
||||
program_source:9:15: error: use of undeclared identifier 'arg_0'
|
||||
float res = arg_0.sample_compare(arg_1, float2(), 1.0f, level(0));
|
||||
^
|
||||
program_source:9:36: error: use of undeclared identifier 'arg_1'
|
||||
float res = arg_0.sample_compare(arg_1, float2(), 1.0f, level(0));
|
||||
^
|
|
@ -0,0 +1,85 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 44
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %arg_0 "arg_0"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %textureSampleCompareLevel_2ad2b1 "textureSampleCompareLevel_2ad2b1"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %arg_0 DescriptorSet 1
|
||||
OpDecorate %arg_0 Binding 0
|
||||
OpDecorate %arg_1 DescriptorSet 1
|
||||
OpDecorate %arg_1 Binding 1
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%7 = OpTypeImage %float 2D 1 0 0 1 Unknown
|
||||
%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
|
||||
%arg_0 = OpVariable %_ptr_UniformConstant_7 UniformConstant
|
||||
%10 = OpTypeSampler
|
||||
%_ptr_UniformConstant_10 = OpTypePointer UniformConstant %10
|
||||
%arg_1 = OpVariable %_ptr_UniformConstant_10 UniformConstant
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%14 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %14
|
||||
%void = OpTypeVoid
|
||||
%15 = OpTypeFunction %void
|
||||
%22 = OpTypeSampledImage %7
|
||||
%v2float = OpTypeVector %float 2
|
||||
%25 = OpConstantNull %v2float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_0 = OpConstant %float 0
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%30 = OpTypeFunction %void %v4float
|
||||
%textureSampleCompareLevel_2ad2b1 = OpFunction %void None %15
|
||||
%18 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %4
|
||||
%20 = OpLoad %10 %arg_1
|
||||
%21 = OpLoad %7 %arg_0
|
||||
%23 = OpSampledImage %22 %21 %20
|
||||
%19 = OpImageSampleDrefExplicitLod %float %23 %25 %float_1 Lod %float_0
|
||||
OpStore %res %19
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %30
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%33 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %15
|
||||
%35 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%36 = OpFunctionCall %void %textureSampleCompareLevel_2ad2b1
|
||||
%37 = OpFunctionCall %void %tint_symbol_2 %14
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %15
|
||||
%39 = OpLabel
|
||||
%40 = OpFunctionCall %void %textureSampleCompareLevel_2ad2b1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %15
|
||||
%42 = OpLabel
|
||||
%43 = OpFunctionCall %void %textureSampleCompareLevel_2ad2b1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,23 @@
|
|||
[[group(1), binding(0)]] var arg_0 : texture_depth_2d;
|
||||
|
||||
[[group(1), binding(1)]] var arg_1 : sampler_comparison;
|
||||
|
||||
fn textureSampleCompareLevel_2ad2b1() {
|
||||
var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1.0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
textureSampleCompareLevel_2ad2b1();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
textureSampleCompareLevel_2ad2b1();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
textureSampleCompareLevel_2ad2b1();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
[[group(1), binding(0)]] var arg_0: texture_depth_cube_array;
|
||||
[[group(1), binding(1)]] var arg_1: sampler_comparison;
|
||||
fn textureSampleCompareLevel_4cf3a2() {
|
||||
var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(), 1, 1.0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
textureSampleCompareLevel_4cf3a2();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
textureSampleCompareLevel_4cf3a2();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
textureSampleCompareLevel_4cf3a2();
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
TextureCubeArray arg_0 : register(t0, space1);
|
||||
SamplerComparisonState arg_1 : register(s1, space1);
|
||||
|
||||
void textureSampleCompareLevel_4cf3a2() {
|
||||
float res = arg_0.SampleCmpLevelZero(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f);
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
textureSampleCompareLevel_4cf3a2();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
textureSampleCompareLevel_4cf3a2();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
textureSampleCompareLevel_4cf3a2();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
|
||||
Validation Failure:
|
||||
|
||||
Compilation failed:
|
||||
|
||||
program_source:9:15: error: use of undeclared identifier 'arg_0'
|
||||
float res = arg_0.sample_compare(arg_1, float3(), 1, 1.0f, level(0));
|
||||
^
|
||||
program_source:9:36: error: use of undeclared identifier 'arg_1'
|
||||
float res = arg_0.sample_compare(arg_1, float3(), 1, 1.0f, level(0));
|
||||
^
|
|
@ -0,0 +1,88 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 46
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpCapability SampledCubeArray
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %arg_0 "arg_0"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %textureSampleCompareLevel_4cf3a2 "textureSampleCompareLevel_4cf3a2"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %arg_0 DescriptorSet 1
|
||||
OpDecorate %arg_0 Binding 0
|
||||
OpDecorate %arg_1 DescriptorSet 1
|
||||
OpDecorate %arg_1 Binding 1
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%7 = OpTypeImage %float Cube 1 1 0 1 Unknown
|
||||
%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
|
||||
%arg_0 = OpVariable %_ptr_UniformConstant_7 UniformConstant
|
||||
%10 = OpTypeSampler
|
||||
%_ptr_UniformConstant_10 = OpTypePointer UniformConstant %10
|
||||
%arg_1 = OpVariable %_ptr_UniformConstant_10 UniformConstant
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%14 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %14
|
||||
%void = OpTypeVoid
|
||||
%15 = OpTypeFunction %void
|
||||
%22 = OpTypeSampledImage %7
|
||||
%float_0 = OpConstant %float 0
|
||||
%int = OpTypeInt 32 1
|
||||
%int_1 = OpConstant %int 1
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%32 = OpTypeFunction %void %v4float
|
||||
%textureSampleCompareLevel_4cf3a2 = OpFunction %void None %15
|
||||
%18 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %4
|
||||
%20 = OpLoad %10 %arg_1
|
||||
%21 = OpLoad %7 %arg_0
|
||||
%23 = OpSampledImage %22 %21 %20
|
||||
%25 = OpConvertSToF %float %int_1
|
||||
%28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25
|
||||
%19 = OpImageSampleDrefExplicitLod %float %23 %28 %float_1 Lod %float_0
|
||||
OpStore %res %19
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %32
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%35 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %15
|
||||
%37 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%38 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2
|
||||
%39 = OpFunctionCall %void %tint_symbol_2 %14
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %15
|
||||
%41 = OpLabel
|
||||
%42 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %15
|
||||
%44 = OpLabel
|
||||
%45 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,23 @@
|
|||
[[group(1), binding(0)]] var arg_0 : texture_depth_cube_array;
|
||||
|
||||
[[group(1), binding(1)]] var arg_1 : sampler_comparison;
|
||||
|
||||
fn textureSampleCompareLevel_4cf3a2() {
|
||||
var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(), 1, 1.0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
textureSampleCompareLevel_4cf3a2();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
textureSampleCompareLevel_4cf3a2();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
textureSampleCompareLevel_4cf3a2();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
[[group(1), binding(0)]] var arg_0: texture_depth_2d;
|
||||
[[group(1), binding(1)]] var arg_1: sampler_comparison;
|
||||
fn textureSampleCompareLevel_f8121c() {
|
||||
var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1.0, vec2<i32>());
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
textureSampleCompareLevel_f8121c();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
textureSampleCompareLevel_f8121c();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
textureSampleCompareLevel_f8121c();
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
Texture2D arg_0 : register(t0, space1);
|
||||
SamplerComparisonState arg_1 : register(s1, space1);
|
||||
|
||||
void textureSampleCompareLevel_f8121c() {
|
||||
float res = arg_0.SampleCmpLevelZero(arg_1, float2(0.0f, 0.0f), 1.0f, int2(0, 0));
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
textureSampleCompareLevel_f8121c();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
textureSampleCompareLevel_f8121c();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
textureSampleCompareLevel_f8121c();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
|
||||
Validation Failure:
|
||||
|
||||
Compilation failed:
|
||||
|
||||
program_source:9:15: error: use of undeclared identifier 'arg_0'
|
||||
float res = arg_0.sample_compare(arg_1, float2(), 1.0f, level(0), int2());
|
||||
^
|
||||
program_source:9:36: error: use of undeclared identifier 'arg_1'
|
||||
float res = arg_0.sample_compare(arg_1, float2(), 1.0f, level(0), int2());
|
||||
^
|
|
@ -0,0 +1,88 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 47
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %arg_0 "arg_0"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %textureSampleCompareLevel_f8121c "textureSampleCompareLevel_f8121c"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %arg_0 DescriptorSet 1
|
||||
OpDecorate %arg_0 Binding 0
|
||||
OpDecorate %arg_1 DescriptorSet 1
|
||||
OpDecorate %arg_1 Binding 1
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%7 = OpTypeImage %float 2D 1 0 0 1 Unknown
|
||||
%_ptr_UniformConstant_7 = OpTypePointer UniformConstant %7
|
||||
%arg_0 = OpVariable %_ptr_UniformConstant_7 UniformConstant
|
||||
%10 = OpTypeSampler
|
||||
%_ptr_UniformConstant_10 = OpTypePointer UniformConstant %10
|
||||
%arg_1 = OpVariable %_ptr_UniformConstant_10 UniformConstant
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%14 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %14
|
||||
%void = OpTypeVoid
|
||||
%15 = OpTypeFunction %void
|
||||
%22 = OpTypeSampledImage %7
|
||||
%v2float = OpTypeVector %float 2
|
||||
%25 = OpConstantNull %v2float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_0 = OpConstant %float 0
|
||||
%int = OpTypeInt 32 1
|
||||
%v2int = OpTypeVector %int 2
|
||||
%30 = OpConstantNull %v2int
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%33 = OpTypeFunction %void %v4float
|
||||
%textureSampleCompareLevel_f8121c = OpFunction %void None %15
|
||||
%18 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %4
|
||||
%20 = OpLoad %10 %arg_1
|
||||
%21 = OpLoad %7 %arg_0
|
||||
%23 = OpSampledImage %22 %21 %20
|
||||
%19 = OpImageSampleDrefExplicitLod %float %23 %25 %float_1 Lod|ConstOffset %float_0 %30
|
||||
OpStore %res %19
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %33
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%36 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %15
|
||||
%38 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%39 = OpFunctionCall %void %textureSampleCompareLevel_f8121c
|
||||
%40 = OpFunctionCall %void %tint_symbol_2 %14
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %15
|
||||
%42 = OpLabel
|
||||
%43 = OpFunctionCall %void %textureSampleCompareLevel_f8121c
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %15
|
||||
%45 = OpLabel
|
||||
%46 = OpFunctionCall %void %textureSampleCompareLevel_f8121c
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,23 @@
|
|||
[[group(1), binding(0)]] var arg_0 : texture_depth_2d;
|
||||
|
||||
[[group(1), binding(1)]] var arg_1 : sampler_comparison;
|
||||
|
||||
fn textureSampleCompareLevel_f8121c() {
|
||||
var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1.0, vec2<i32>());
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
textureSampleCompareLevel_f8121c();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
textureSampleCompareLevel_f8121c();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
textureSampleCompareLevel_f8121c();
|
||||
}
|
Loading…
Reference in New Issue