mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Improve PageTableManager creation
Change-Id: If359c76ae880fb2e1f56fc561aca761530787b5e Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
b602cd2bb8
commit
2cd411227c
@@ -367,13 +367,13 @@ bool Wddm::mapGpuVirtualAddressImpl(Gmm *gmm, D3DKMT_HANDLE handle, void *cpuPtr
|
||||
return false;
|
||||
}
|
||||
|
||||
if (gmm->isRenderCompressed) {
|
||||
kmDafListener->notifyMapGpuVA(featureTable->ftrKmdDaf, adapter, device, handle, MapGPUVA.VirtualAddress, gdi->escape);
|
||||
|
||||
if (gmm->isRenderCompressed && pageTableManager.get()) {
|
||||
return updateAuxTable(gpuPtr, gmm, true);
|
||||
}
|
||||
|
||||
kmDafListener->notifyMapGpuVA(featureTable->ftrKmdDaf, adapter, device, handle, MapGPUVA.VirtualAddress, gdi->escape);
|
||||
|
||||
return status == STATUS_SUCCESS;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Wddm::freeGpuVirtualAddres(D3DGPU_VIRTUAL_ADDRESS &gpuPtr, uint64_t size) {
|
||||
@@ -834,15 +834,12 @@ void Wddm::releaseReservedAddress(void *reservedAddress) {
|
||||
}
|
||||
|
||||
bool Wddm::updateAuxTable(D3DGPU_VIRTUAL_ADDRESS gpuVa, Gmm *gmm, bool map) {
|
||||
if (pageTableManager.get()) {
|
||||
GMM_DDI_UPDATEAUXTABLE ddiUpdateAuxTable = {};
|
||||
ddiUpdateAuxTable.BaseGpuVA = gpuVa;
|
||||
ddiUpdateAuxTable.BaseResInfo = gmm->gmmResourceInfo->peekHandle();
|
||||
ddiUpdateAuxTable.DoNotWait = true;
|
||||
ddiUpdateAuxTable.Map = map ? 1u : 0u;
|
||||
return pageTableManager->updateAuxTable(&ddiUpdateAuxTable) == GMM_STATUS::GMM_SUCCESS;
|
||||
}
|
||||
return false;
|
||||
GMM_DDI_UPDATEAUXTABLE ddiUpdateAuxTable = {};
|
||||
ddiUpdateAuxTable.BaseGpuVA = gpuVa;
|
||||
ddiUpdateAuxTable.BaseResInfo = gmm->gmmResourceInfo->peekHandle();
|
||||
ddiUpdateAuxTable.DoNotWait = true;
|
||||
ddiUpdateAuxTable.Map = map ? 1u : 0u;
|
||||
return pageTableManager->updateAuxTable(&ddiUpdateAuxTable) == GMM_STATUS::GMM_SUCCESS;
|
||||
}
|
||||
|
||||
void Wddm::resetPageTableManager(GmmPageTableMngr *newPageTableManager) {
|
||||
|
||||
@@ -305,7 +305,7 @@ void WddmMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllocation
|
||||
gfxAllocation->taskCount > *this->getCommandStreamReceiver(0)->getTagAddress());
|
||||
|
||||
if (input->gmm) {
|
||||
if (input->gmm->isRenderCompressed) {
|
||||
if (input->gmm->isRenderCompressed && wddm->getPageTableManager()) {
|
||||
auto status = wddm->updateAuxTable(input->gpuPtr, input->gmm, false);
|
||||
DEBUG_BREAK_IF(!status);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user