mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Refactor: Change decanonize method accessing point
Accessing decanonize method as a member of GmmHelper class object Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7bb3bcbc05
commit
2fcda0a528
@@ -802,7 +802,8 @@ ze_result_t DebugSessionImp::readSbaRegisters(ze_device_thread_t thread, uint32_
|
||||
|
||||
auto scratchSpacePTSize = hwHelper.getRenderSurfaceStatePitch(renderSurfaceState.data());
|
||||
auto threadOffset = getPerThreadScratchOffset(scratchSpacePTSize, convertToThreadId(thread));
|
||||
auto scratchAllocationBase = NEO::GmmHelper::decanonize(hwHelper.getRenderSurfaceStateBaseAddress(renderSurfaceState.data()));
|
||||
auto gmmHelper = connectedDevice->getNEODevice()->getGmmHelper();
|
||||
auto scratchAllocationBase = gmmHelper->decanonize(hwHelper.getRenderSurfaceStateBaseAddress(renderSurfaceState.data()));
|
||||
if (scratchAllocationBase != 0) {
|
||||
ScratchSpaceBaseAddress = threadOffset + scratchAllocationBase;
|
||||
}
|
||||
@@ -987,9 +988,9 @@ ze_result_t DebugSessionImp::writeRegistersImp(ze_device_thread_t thread, uint32
|
||||
}
|
||||
|
||||
bool DebugSessionImp::isValidGpuAddress(uint64_t address) {
|
||||
auto decanonizedAddress = NEO::GmmHelper::decanonize(address);
|
||||
auto gmm = connectedDevice->getNEODevice()->getGmmHelper();
|
||||
bool validAddress = gmm->isValidCanonicalGpuAddress(address);
|
||||
auto gmmHelper = connectedDevice->getNEODevice()->getGmmHelper();
|
||||
auto decanonizedAddress = gmmHelper->decanonize(address);
|
||||
bool validAddress = gmmHelper->isValidCanonicalGpuAddress(address);
|
||||
|
||||
if (address == decanonizedAddress || validAddress) {
|
||||
return true;
|
||||
|
||||
@@ -2044,7 +2044,8 @@ TEST(DebugSessionTest, givenCanonicalOrDecanonizedAddressWhenCheckingValidAddres
|
||||
|
||||
EXPECT_TRUE(sessionMock->isValidGpuAddress(address));
|
||||
|
||||
auto decanonized = NEO::GmmHelper::decanonize(address);
|
||||
auto gmmHelper = neoDevice->getGmmHelper();
|
||||
auto decanonized = gmmHelper->decanonize(address);
|
||||
EXPECT_TRUE(sessionMock->isValidGpuAddress(decanonized));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user