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:
Mateusz Jablonski
2022-11-25 07:53:05 +00:00
committed by Compute-Runtime-Automation
parent ba9c50694d
commit 27cb39ef25
24 changed files with 150 additions and 156 deletions

View File

@@ -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);