From e50aac13e2c161d672b137a62f6d66820d0f9ff1 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Wed, 11 Dec 2024 13:28:40 -0800 Subject: 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 --- .../footprint/nv-shader-texture-footprint.slang | 46 +++++++--------------- 1 file changed, 15 insertions(+), 31 deletions(-) (limited to 'tests/gpu-feature/texture/query') 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 % } -- cgit v1.2.3