Skip to content

Commit c397353

Browse files
YuriPlyakhinigcbot
authored andcommitted
Use Implicit Image Width and Height only in bindful mode
Instead of just asserting when implicit arguments are used for Image Width and Height in bindless mode return to avoid further compilation errors
1 parent 3bd5478 commit c397353

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

IGC/Compiler/Optimizer/OpenCLPasses/ImageFuncs/ImageFuncResolution.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,20 @@ void ImageFuncResolution::visitCallInst(CallInst& CI)
6363

6464
if (funcName.equals(ImageFuncsAnalysis::GET_IMAGE_HEIGHT))
6565
{
66-
IGC_ASSERT_MESSAGE(isImplicitImageArgs, "Getting Image Height from implicit args is supported only in bindful mode");
66+
if (!isImplicitImageArgs)
67+
{
68+
IGC_ASSERT_MESSAGE(false, "Getting Image Height from implicit args is supported only in bindful mode");
69+
return;
70+
}
6771
imageRes = getImageHeight(CI);
6872
}
6973
else if (funcName.equals(ImageFuncsAnalysis::GET_IMAGE_WIDTH))
7074
{
71-
IGC_ASSERT_MESSAGE(isImplicitImageArgs, "Getting Image Width from implicit args is supported only in bindful mode");
75+
if (!isImplicitImageArgs)
76+
{
77+
IGC_ASSERT_MESSAGE(false, "Getting Image Width from implicit args is supported only in bindful mode");
78+
return;
79+
}
7280
imageRes = getImageWidth(CI);
7381
}
7482
else if (funcName.equals(ImageFuncsAnalysis::GET_IMAGE_DEPTH))

0 commit comments

Comments
 (0)