From 42b0149031c830e45e25d6e45903fb46576d8fe5 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Thu, 12 Dec 2024 11:49:44 +0800 Subject: [PATCH] Correct more uses of OpImageSampleFootprintNV --- source/slang/hlsl.meta.slang | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/source/slang/hlsl.meta.slang b/source/slang/hlsl.meta.slang index 4adaf69845..194c14b198 100644 --- a/source/slang/hlsl.meta.slang +++ b/source/slang/hlsl.meta.slang @@ -19831,7 +19831,8 @@ ${ return spirv_asm { OpCapability ImageFootprintNV; OpExtension "SPV_NV_shader_image_footprint"; - %resultVal:$$__FootprintData = OpImageSampleFootprintNV &this $coords $granularity $useCoarseLevel Bias $bias; + %sampledImage : __sampledImageType(this) = OpSampledImage $this $sampler; + %resultVal:$$__FootprintData = OpImageSampleFootprintNV %sampledImage $coords $granularity $useCoarseLevel Bias $bias; OpStore &footprint %resultVal; result:$$bool = OpCompositeExtract %resultVal 0; }; @@ -19860,7 +19861,8 @@ ${ OpCapability ImageFootprintNV; OpCapability MinLod; OpExtension "SPV_NV_shader_image_footprint"; - %resultVal:$$__FootprintData = OpImageSampleFootprintNV &this $coords $granularity $useCoarseLevel MinLod $lodClamp; + %sampledImage : __sampledImageType(this) = OpSampledImage $this $sampler; + %resultVal:$$__FootprintData = OpImageSampleFootprintNV %sampledImage $coords $granularity $useCoarseLevel MinLod $lodClamp; OpStore &footprint %resultVal; result:$$bool = OpCompositeExtract %resultVal 0; }; @@ -19890,7 +19892,8 @@ ${ OpCapability ImageFootprintNV; OpCapability MinLod; OpExtension "SPV_NV_shader_image_footprint"; - %resultVal:$$__FootprintData = OpImageSampleFootprintNV &this $coords $granularity $useCoarseLevel Bias|MinLod $bias $lodClamp; + %sampledImage : __sampledImageType(this) = OpSampledImage $this $sampler; + %resultVal:$$__FootprintData = OpImageSampleFootprintNV %sampledImage $coords $granularity $useCoarseLevel Bias|MinLod $bias $lodClamp; OpStore &footprint %resultVal; result:$$bool = OpCompositeExtract %resultVal 0; }; @@ -19918,7 +19921,8 @@ ${ return spirv_asm { OpCapability ImageFootprintNV; OpExtension "SPV_NV_shader_image_footprint"; - %resultVal:$$__FootprintData = OpImageSampleFootprintNV &this $coords $granularity $useCoarseLevel Lod $lod; + %sampledImage : __sampledImageType(this) = OpSampledImage $this $sampler; + %resultVal:$$__FootprintData = OpImageSampleFootprintNV %sampledImage $coords $granularity $useCoarseLevel Lod $lod; OpStore &footprint %resultVal; result:$$bool = OpCompositeExtract %resultVal 0; }; @@ -19951,7 +19955,8 @@ ${{{ return spirv_asm { OpCapability ImageFootprintNV; OpExtension "SPV_NV_shader_image_footprint"; - %resultVal:$$__FootprintData = OpImageSampleFootprintNV &this $coords $granularity $useCoarseLevel Grad $dx $dy; + %sampledImage : __sampledImageType(this) = OpSampledImage $this $sampler; + %resultVal:$$__FootprintData = OpImageSampleFootprintNV %sampledImage $coords $granularity $useCoarseLevel Grad $dx $dy; OpStore &footprint %resultVal; result:$$bool = OpCompositeExtract %resultVal 0; }; @@ -19982,7 +19987,8 @@ ${{{ OpCapability ImageFootprintNV; OpCapability MinLod; OpExtension "SPV_NV_shader_image_footprint"; - %resultVal:$$__FootprintData = OpImageSampleFootprintNV &this $coords $granularity $useCoarseLevel Grad|MinLod $dx $dy $lodClamp; + %sampledImage : __sampledImageType(this) = OpSampledImage $this $sampler; + %resultVal:$$__FootprintData = OpImageSampleFootprintNV %sampledImage $coords $granularity $useCoarseLevel Grad|MinLod $dx $dy $lodClamp; OpStore &footprint %resultVal; result:$$bool = OpCompositeExtract %resultVal 0; };