Skip to content

Commit e0c3163

Browse files
jsantillan2017paigeale
authored andcommitted
Fixing calculation of m_ConstantBufferLength
Change-Id: If33f160279ba7ede30d9232c761f6d5592d304e5
1 parent 2e0e48d commit e0c3163

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

IGC/Compiler/CISACodeGen/OpenCLKernelCodeGen.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,6 +1353,12 @@ void COpenCLKernel::AllocatePayload()
13531353
IGC_IS_FLAG_ENABLED(EnableOptionalBufferOffset) &&
13541354
arg.getArg()->use_empty());
13551355

1356+
if (constantBufferStartSet && !constantBufferEndSet && !arg.isConstantBuf())
1357+
{
1358+
constantBufferEnd = offset;
1359+
constantBufferEndSet = true;
1360+
}
1361+
13561362
if (!constantBufferStartSet && arg.isConstantBuf()) {
13571363
constantBufferStart = offset;
13581364
AllocateNOSConstants(offset);
@@ -1421,6 +1427,7 @@ void COpenCLKernel::AllocatePayload()
14211427

14221428
if (!constantBufferEndSet && constantBufferStartSet) {
14231429
constantBufferEnd = offset;
1430+
constantBufferEndSet = true;
14241431
}
14251432

14261433
// ToDo: we should avoid passing all three dimensions of local id

0 commit comments

Comments
 (0)