Skip to content

Commit 6db650d

Browse files
aratajewigcbot
authored andcommitted
Fix image coordinates widening
PreprocessSPVIR is a pass to introduce some modifications to builtins produced by Khronos SPIRV-LLVM-Translator to make them consumable by IGC Scalar BiFModule. This change fixes image coordinates widening logic for the case when coordiates argument produced by Khronos Translator has already a desired width.
1 parent 6635b6f commit 6db650d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

IGC/AdaptorOCL/PreprocessSPVIR.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ Value* PreprocessSPVIR::getWidenImageCoordsArg(Value* Coords)
9494

9595
newCoords = m_Builder->CreateShuffleVector(Coords, UndefValue::get(coordsType), ConstantVector::get(shuffleIdx));
9696
}
97+
else
98+
{
99+
// coordinate argument has already a desired width
100+
newCoords = Coords;
101+
}
97102
return newCoords;
98103
}
99104

0 commit comments

Comments
 (0)