mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
fix: create and use new allocation type for syncBuffer
Related-To: NEO-11533 Related-To: HSD-18039788811 Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d11d61d229
commit
38e1614f4a
@@ -1182,7 +1182,7 @@ void KernelImp::patchSyncBuffer(NEO::GraphicsAllocation *gfxAllocation, size_t b
|
||||
this->internalResidencyContainer.push_back(gfxAllocation);
|
||||
NEO::patchPointer(ArrayRef<uint8_t>(crossThreadData.get(), crossThreadDataSize),
|
||||
this->getImmutableData()->getDescriptor().payloadMappings.implicitArgs.syncBufferAddress,
|
||||
static_cast<uintptr_t>(ptrOffset(gfxAllocation->getGpuAddress(), bufferOffset)));
|
||||
static_cast<uintptr_t>(ptrOffset(gfxAllocation->getGpuAddressToPatch(), bufferOffset)));
|
||||
}
|
||||
|
||||
void KernelImp::patchRegionGroupBarrier(NEO::GraphicsAllocation *gfxAllocation, size_t bufferOffset) {
|
||||
|
||||
@@ -4187,7 +4187,6 @@ TEST_F(KernelSyncBufferTest, GivenSyncBufferArgWhenPatchingSyncBufferThenPtrIsCo
|
||||
|
||||
NEO::MockGraphicsAllocation alloc;
|
||||
alloc.setGpuPtr(0xffff800300060000);
|
||||
alloc.setGpuBaseAddress(0xffff800300000000);
|
||||
alloc.allocationOffset = 0x0;
|
||||
|
||||
size_t bufferOffset = 0u;
|
||||
@@ -4195,7 +4194,7 @@ TEST_F(KernelSyncBufferTest, GivenSyncBufferArgWhenPatchingSyncBufferThenPtrIsCo
|
||||
kernel.patchSyncBuffer(&alloc, bufferOffset);
|
||||
|
||||
auto patchValue = *reinterpret_cast<uint64_t *>(ptrOffset(kernel.crossThreadData.get(), syncBuffer.stateless));
|
||||
auto expectedPatchValue = ptrOffset(alloc.getGpuAddress(), bufferOffset);
|
||||
auto expectedPatchValue = ptrOffset(alloc.getGpuAddressToPatch(), bufferOffset);
|
||||
EXPECT_EQ(expectedPatchValue, patchValue);
|
||||
|
||||
neoDevice->decRefInternal();
|
||||
|
||||
Reference in New Issue
Block a user