summaryrefslogtreecommitdiffstats
path: root/tests/gpu-feature/texture
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2024-12-11 13:28:40 -0800
committerGitHub <noreply@github.com>2024-12-11 13:28:40 -0800
commite50aac13e2c161d672b137a62f6d66820d0f9ff1 (patch)
tree89d30f6c2a63db452a6fe15619a6f148de4bbf39 /tests/gpu-feature/texture
parentf573c15868234ab6013faf0fc2b93a72fa89f21d (diff)
Update SPIRV submodules (#5815)
* Update SPIRV submodules With the latest SPIR-V submodules, one of tests started failing: tests/gpu-feature/texture/query/footprint/nv-shader-texture-footprint.slang [ForceInline] is added to GLSL texture functions in order to inline %true and %false. Without it, the value was indirectly passed down via a function parameter, which broke the existing test. Also the test is modified to use -DAG, because the order unpredictably changed for Grad variants due to additional [ForceInline] marks for Gradient functions. A new validation check in SPIRV-Tools was causing a validation error: ``` error: line 324: [VUID-StandaloneSpirv-OpTypeImage-06924] Cannot store to OpTypeImage, OpTypeSampler, OpTypeSampledImage, or OpTypeAccelerationStructureKHR objects OpStore %17 %242 ``` It appears that this is a bug on SPIRV-Tools. A proper fix is proposed to Khronos/SPIRV-Tools: https://github.com/KhronosGroup/SPIRV-Tools/pull/5914 But this commit uses `shader-slang/SPIRV-Tools/fix_for_OpImageSampleFootprintNV` with a custom fix as a temporary solution: https://github.com/shader-slang/SPIRV-Tools/tree/fix_for_OpImageSampleFootprintNV
Diffstat (limited to 'tests/gpu-feature/texture')
-rw-r--r--tests/gpu-feature/texture/query/footprint/nv-shader-texture-footprint.slang46
1 files changed, 15 insertions, 31 deletions
diff --git a/tests/gpu-feature/texture/query/footprint/nv-shader-texture-footprint.slang b/tests/gpu-feature/texture/query/footprint/nv-shader-texture-footprint.slang
index 55181a383..fbef718de 100644
--- a/tests/gpu-feature/texture/query/footprint/nv-shader-texture-footprint.slang
+++ b/tests/gpu-feature/texture/query/footprint/nv-shader-texture-footprint.slang
@@ -1,5 +1,5 @@
//TEST:SIMPLE(filecheck=SPIRV):-target spirv-assembly -emit-spirv-via-glsl -entry fragmentMain -stage fragment -DENABLE_CLAMP
-//TEST:SIMPLE(filecheck=SPIRV):-target spirv -entry fragmentMain -stage fragment -DENABLE_CLAMP
+//TEST:SIMPLE(filecheck=SPIRV):-target spirv -entry fragmentMain -stage fragment -DENABLE_CLAMP -O0
//DISABLED_TEST:SIMPLE(filecheck=SPIRV):-target spirv-assembly -entry fragmentMain -stage fragment -DENABLE_CLAMP -emit-spirv-directly
//DISABLED_TEST:SIMPLE(filecheck=DXIL):-target dxil-assembly -entry fragmentMain -stage fragment
@@ -148,57 +148,41 @@ CLAMP( accumulate##ND(r, texture##ND.queryFootprint##COARSE_OR_FINE##GradClamp
TEST_2D(Coarse);
-// SPIRV: OpImageSampleFootprintNV
-// SPIRV-SAME: [[TRUE]]
+// SPIRV-DAG: OpImageSampleFootprintNV {{.*}} [[TRUE]]{{$}}
// HLSL-DAG: NvFootprintCoarse{{.*}}NV_EXTN_TEXTURE_2D
-// SPIRV: OpImageSampleFootprintNV
-// SPIRV-SAME: [[TRUE]] Bias
+// SPIRV-DAG: OpImageSampleFootprintNV {{.*}} [[TRUE]] Bias %
// HLSL-DAG: NvFootprintCoarseBias{{.*}}NV_EXTN_TEXTURE_2D
-// SPIRV: OpImageSampleFootprintNV
-// SPIRV-SAME: [[TRUE]] MinLod
+// SPIRV-DAG: OpImageSampleFootprintNV {{.*}} [[TRUE]] MinLod %
+// SPIRV-DAG: OpImageSampleFootprintNV {{.*}} [[TRUE]] Bias|MinLod %
-// SPIRV: OpImageSampleFootprintNV
-// SPIRV-SAME: [[TRUE]] Bias|MinLod
-
-// SPIRV: OpImageSampleFootprintNV
-// SPIRV-SAME: [[TRUE]] Lod
+// SPIRV-DAG: OpImageSampleFootprintNV {{.*}} [[TRUE]] Lod %
// HLSL-DAG: NvFootprintCoarseLevel{{.*}}NV_EXTN_TEXTURE_2D
-// SPIRV: OpImageSampleFootprintNV
-// SPIRV-SAME: [[TRUE]] Grad
+// SPIRV-DAG: OpImageSampleFootprintNV {{.*}} [[TRUE]] Grad %
// HLSL-DAG: NvFootprintCoarseGrad{{.*}}NV_EXTN_TEXTURE_2D
-// SPIRV: OpImageSampleFootprintNV
-// SPIRV-SAME: [[TRUE]] Grad|MinLod
+// SPIRV-DAG: OpImageSampleFootprintNV {{.*}} [[TRUE]] Grad|MinLod %
TEST_2D(Fine);
-// SPIRV: OpImageSampleFootprintNV
-// SPIRV-SAME: [[FALSE]]
+// SPIRV-DAG: OpImageSampleFootprintNV {{.*}} [[FALSE]]{{$}}
// HLSL-DAG: NvFootprintFine{{.*}}NV_EXTN_TEXTURE_2D
-// SPIRV: OpImageSampleFootprintNV
-// SPIRV-SAME: [[FALSE]] Bias
+// SPIRV-DAG: OpImageSampleFootprintNV {{.*}} [[FALSE]] Bias %
// HLSL-DAG: NvFootprintFineBias{{.*}}NV_EXTN_TEXTURE_2D
-// SPIRV: OpImageSampleFootprintNV
-// SPIRV-SAME: [[FALSE]] MinLod
+// SPIRV-DAG: OpImageSampleFootprintNV {{.*}} [[FALSE]] MinLod %
+// SPIRV-DAG: OpImageSampleFootprintNV {{.*}} [[FALSE]] Bias|MinLod %
-// SPIRV: OpImageSampleFootprintNV
-// SPIRV-SAME: [[FALSE]] Bias|MinLod
-
-// SPIRV: OpImageSampleFootprintNV
-// SPIRV-SAME: [[FALSE]] Lod
+// SPIRV-DAG: OpImageSampleFootprintNV {{.*}} [[FALSE]] Lod %
// HLSL-DAG: NvFootprintFineLevel{{.*}}NV_EXTN_TEXTURE_2D
-// SPIRV: OpImageSampleFootprintNV
-// SPIRV-SAME: [[FALSE]] Grad
+// SPIRV-DAG: OpImageSampleFootprintNV {{.*}} [[FALSE]] Grad %
// HLSL-DAG: NvFootprintFineGrad{{.*}}NV_EXTN_TEXTURE_2D
-// SPIRV: OpImageSampleFootprintNV
-// SPIRV-SAME: [[FALSE]] Grad|MinLod
+// SPIRV-DAG: OpImageSampleFootprintNV {{.*}} [[FALSE]] Grad|MinLod %
}