fix: correct bindless offsets for L0 bindless images extension with heapless

Related-To: NEO-14710
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2025-06-16 01:31:54 +00:00
committed by Compute-Runtime-Automation
parent a8394cbdeb
commit cdf087f3da
6 changed files with 41 additions and 5 deletions

View File

@@ -627,7 +627,7 @@ ze_result_t KernelImp::setArgRedescribedImage(uint32_t argIndex, ze_image_handle
uint64_t bindlessSlotOffset = ssInHeap->surfaceStateOffset + surfaceStateSize * bindlessSlot;
uint32_t patchSize = this->heaplessEnabled ? 8u : 4u;
uint64_t patchValue = this->heaplessEnabled
? bindlessSlotOffset + bindlessHeapsHelper->getGlobalHeapsBase()
? bindlessSlotOffset
: gfxCoreHelper.getBindlessSurfaceExtendedMessageDescriptorValue(static_cast<uint32_t>(bindlessSlotOffset));
patchWithRequiredSize(const_cast<uint8_t *>(patchLocation), patchSize, patchValue);
@@ -829,7 +829,7 @@ ze_result_t KernelImp::setArgImage(uint32_t argIndex, size_t argSize, const void
auto bindlessSlotOffset = ssInHeap->surfaceStateOffset;
uint32_t patchSize = this->heaplessEnabled ? 8u : 4u;
uint64_t patchValue = this->heaplessEnabled
? bindlessSlotOffset + bindlessHeapsHelper->getGlobalHeapsBase()
? bindlessSlotOffset
: gfxCoreHelper.getBindlessSurfaceExtendedMessageDescriptorValue(static_cast<uint32_t>(bindlessSlotOffset));
patchWithRequiredSize(const_cast<uint8_t *>(patchLocation), patchSize, patchValue);

View File

@@ -3174,7 +3174,7 @@ HWTEST2_F(SetKernelArg, givenHeaplessWhenPatchingImageWithBindlessEnabledCorrect
auto patchLocation = ptrOffset(ctd, imageArg.bindless);
uint64_t bindlessSlotOffset = ssInHeap->surfaceStateOffset + surfaceStateSize * NEO::BindlessImageSlot::redescribedImage;
uint64_t expectedPatchValue = kernel->heaplessEnabled
? bindlessSlotOffset + bindlessHeapsHelper->getGlobalHeapsBase()
? bindlessSlotOffset
: gfxCoreHelper.getBindlessSurfaceExtendedMessageDescriptorValue(static_cast<uint32_t>(bindlessSlotOffset));
if (kernel->heaplessEnabled) {