[llvm] [SPIRV] Added constraint for SPV_INTEL_bindless_image extension (PR #160089)
Dmitry Sidorov via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 22 09:01:38 PDT 2025
================
@@ -1738,15 +1738,42 @@ void addInstrRequirements(const MachineInstr &MI,
break;
case SPIRV::OpConvertHandleToImageINTEL:
case SPIRV::OpConvertHandleToSamplerINTEL:
- case SPIRV::OpConvertHandleToSampledImageINTEL:
+ case SPIRV::OpConvertHandleToSampledImageINTEL: {
if (!ST.canUseExtension(SPIRV::Extension::SPV_INTEL_bindless_images))
report_fatal_error("OpConvertHandleTo[Image/Sampler/SampledImage]INTEL "
"instructions require the following SPIR-V extension: "
"SPV_INTEL_bindless_images",
false);
+ SPIRVGlobalRegistry *GR = ST.getSPIRVGlobalRegistry();
+ SPIRV::AddressingModel::AddressingModel AddrModel;
+ unsigned PointerSize = ST.getPointerSize();
+ AddrModel = PointerSize == 32 ? SPIRV::AddressingModel::Physical32
+ : SPIRV::AddressingModel::Physical64;
----------------
MrSidims wrote:
Is there a way to get the MemoryModel info right away? I see it's written somewhere by SPIRVModuleAnalysis::setBaseInfo, so I hope we can obtain it here from MAI.Addr.
https://github.com/llvm/llvm-project/pull/160089
More information about the llvm-commits
mailing list