mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add canonized gpuAddress to GraphicsAllocation constructor
Related-To: NEO-6523 Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
1a7c11e4f1
commit
81899c4477
@ -845,8 +845,9 @@ TEST_F(KernelGlobalSurfaceTest, givenNDRangeKernelWhenKernelIsCreatedThenGlobalS
|
||||
pKernelInfo->kernelDescriptor.kernelAttributes.simdSize = 32;
|
||||
|
||||
char buffer[16];
|
||||
|
||||
GraphicsAllocation gfxAlloc(0, AllocationType::UNKNOWN, buffer, (uint64_t)buffer - 8u, 8, MemoryPool::MemoryNull, 0u);
|
||||
auto gmmHelper = pDevice->getGmmHelper();
|
||||
auto canonizedGpuAddress = gmmHelper->canonize(castToUint64(buffer));
|
||||
GraphicsAllocation gfxAlloc(0, AllocationType::UNKNOWN, buffer, (uint64_t)buffer - 8u, 8, MemoryPool::MemoryNull, 0u, canonizedGpuAddress);
|
||||
uint64_t bufferAddress = gfxAlloc.getGpuAddress();
|
||||
|
||||
// create kernel
|
||||
@ -964,8 +965,9 @@ TEST_F(KernelConstantSurfaceTest, givenNDRangeKernelWhenKernelIsCreatedThenConst
|
||||
pKernelInfo->kernelDescriptor.kernelAttributes.simdSize = 32;
|
||||
|
||||
char buffer[16];
|
||||
|
||||
GraphicsAllocation gfxAlloc(0, AllocationType::UNKNOWN, buffer, (uint64_t)buffer - 8u, 8, MemoryPool::MemoryNull, 0u);
|
||||
auto gmmHelper = pDevice->getGmmHelper();
|
||||
auto canonizedGpuAddress = gmmHelper->canonize(castToUint64(buffer));
|
||||
GraphicsAllocation gfxAlloc(0, AllocationType::UNKNOWN, buffer, (uint64_t)buffer - 8u, 8, MemoryPool::MemoryNull, 0u, canonizedGpuAddress);
|
||||
uint64_t bufferAddress = gfxAlloc.getGpuAddress();
|
||||
|
||||
// create kernel
|
||||
@ -2952,8 +2954,10 @@ HWTEST2_F(KernelConstantSurfaceTest, givenKernelWithConstantSurfaceWhenKernelIsC
|
||||
pKernelInfo->setGlobalConstantsSurface(8, 0, 0);
|
||||
|
||||
char buffer[MemoryConstants::pageSize64k];
|
||||
GraphicsAllocation gfxAlloc(0, AllocationType::CONSTANT_SURFACE, buffer,
|
||||
MemoryConstants::pageSize64k, static_cast<osHandle>(8), MemoryPool::MemoryNull, MemoryManager::maxOsContextCount);
|
||||
auto gmmHelper = pDevice->getGmmHelper();
|
||||
auto canonizedGpuAddress = gmmHelper->canonize(castToUint64(buffer));
|
||||
GraphicsAllocation gfxAlloc(0, AllocationType::CONSTANT_SURFACE, buffer, MemoryConstants::pageSize64k,
|
||||
static_cast<osHandle>(8), MemoryPool::MemoryNull, MemoryManager::maxOsContextCount, canonizedGpuAddress);
|
||||
|
||||
MockContext context(pClDevice);
|
||||
MockProgram program(&context, false, toClDeviceVector(*pClDevice));
|
||||
|
Reference in New Issue
Block a user