File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -8209,9 +8209,17 @@ SDValue SITargetLowering::lowerImage(SDValue Op,
8209
8209
append_range(Ops, VAddrs);
8210
8210
else
8211
8211
Ops.push_back(VAddr);
8212
- Ops.push_back(Op.getOperand(ArgOffset + Intr->RsrcIndex));
8213
- if (BaseOpcode->Sampler)
8214
- Ops.push_back(Op.getOperand(ArgOffset + Intr->SampIndex));
8212
+ SDValue Rsrc = Op.getOperand(ArgOffset + Intr->RsrcIndex);
8213
+ EVT RsrcVT = Rsrc.getValueType();
8214
+ if (RsrcVT != MVT::v4i32 && RsrcVT != MVT::v8i32)
8215
+ return Op;
8216
+ Ops.push_back(Rsrc);
8217
+ if (BaseOpcode->Sampler) {
8218
+ SDValue Samp = Op.getOperand(ArgOffset + Intr->SampIndex);
8219
+ if (Samp.getValueType() != MVT::v4i32)
8220
+ return Op;
8221
+ Ops.push_back(Samp);
8222
+ }
8215
8223
Ops.push_back(DAG.getTargetConstant(DMask, DL, MVT::i32));
8216
8224
if (IsGFX10Plus)
8217
8225
Ops.push_back(DAG.getTargetConstant(DimInfo->Encoding, DL, MVT::i32));
You can’t perform that action at this time.
0 commit comments