[llvm] [SPIRV] Add reads from image buffer for shaders. (PR #115178)
Steven Perron via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 8 06:46:05 PST 2024
================
@@ -2803,6 +2816,83 @@ void SPIRVInstructionSelector::selectHandleFromBinding(Register &ResVReg,
.addUse(VarReg);
}
+void SPIRVInstructionSelector::selectReadImageIntrinsic(
+ Register &ResVReg, const SPIRVType *ResType, MachineInstr &I) const {
+
+ // If the load of the image is in a different basic block, then
+ // this will generate invalid code. A proper solution is to move
+ // the OpLoad from selectHandleFromBinding here. However, to do
+ // that we will need to change the return type of the intrinsic.
+ // We will do that when we can, but for now trying to move forward with other
+ // issues.
+ Register ImageReg = I.getOperand(2).getReg();
----------------
s-perron wrote:
Done
https://github.com/llvm/llvm-project/pull/115178
More information about the llvm-commits
mailing list