Add canonized gpuAddress to GraphicsAllocation constructor

Related-To: NEO-6523
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2022-06-03 11:48:45 +00:00
committed by Compute-Runtime-Automation
parent 1a7c11e4f1
commit 81899c4477
22 changed files with 289 additions and 152 deletions

View File

@@ -232,7 +232,10 @@ HWTEST_TEMPLATED_F(DrmCommandStreamTest, GivenInvalidAddressWhenFlushingThenSucc
//allocate command buffer manually
char *commandBuffer = new (std::nothrow) char[1024];
ASSERT_NE(nullptr, commandBuffer); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
DrmAllocation commandBufferAllocation(0, AllocationType::COMMAND_BUFFER, nullptr, commandBuffer, 1024, static_cast<osHandle>(1u), MemoryPool::MemoryNull);
GmmHelper gmmHelper(nullptr, defaultHwInfo.get());
auto canonizedGpuAddress = gmmHelper.canonize(castToUint64(commandBuffer));
DrmAllocation commandBufferAllocation(0, AllocationType::COMMAND_BUFFER, nullptr, commandBuffer, 1024, static_cast<osHandle>(1u), MemoryPool::MemoryNull, canonizedGpuAddress);
LinearStream cs(&commandBufferAllocation);
CommandStreamReceiverHw<FamilyType>::addBatchBufferEnd(cs, nullptr);