mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Refactor: pass root device environment to gmm client context
Related-To: NEO-6853 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ba9c50694d
commit
27cb39ef25
@@ -10,6 +10,7 @@
|
||||
#include "shared/source/memory_manager/graphics_allocation.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/fixtures/linear_stream_fixture.h"
|
||||
#include "shared/test/common/mocks/mock_execution_environment.h"
|
||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||
|
||||
using namespace NEO;
|
||||
@@ -42,7 +43,8 @@ TEST(LinearStreamSimpleTest, givenLinearStreamWithoutGraphicsAllocationWhenGetti
|
||||
|
||||
TEST(LinearStreamSimpleTest, givenLinearStreamWithGraphicsAllocationWhenGettingGpuBaseThenGpuAddressFromGraphicsAllocationIsReturned) {
|
||||
MockGraphicsAllocation gfxAllocation;
|
||||
auto gmmHelper = std::make_unique<GmmHelper>(nullptr, defaultHwInfo.get());
|
||||
auto executionEnvironment = MockExecutionEnvironment{};
|
||||
auto gmmHelper = executionEnvironment.rootDeviceEnvironments[0]->getGmmHelper();
|
||||
auto canonizedGpuAddress = gmmHelper->canonize(0x5555000);
|
||||
|
||||
gfxAllocation.setCpuPtrAndGpuAddress(nullptr, canonizedGpuAddress);
|
||||
|
||||
Reference in New Issue
Block a user