mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Get rid of processResidency() calls with null ResidencyContainer 3/n
Change-Id: I526cac86f7e4eb61f7962d1ddd33a5d029451111 Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
ed4e1e9c3e
commit
f1a264e380
@@ -465,10 +465,9 @@ uint64_t WddmMemoryManager::getInternalHeapBaseAddress() {
|
||||
}
|
||||
|
||||
bool WddmMemoryManager::makeResidentResidencyAllocations(ResidencyContainer *allocationsForResidency, OsContext &osContext) {
|
||||
DEBUG_BREAK_IF(allocationsForResidency == nullptr);
|
||||
|
||||
auto &residencyAllocations = allocationsForResidency ? *allocationsForResidency : this->residencyAllocations;
|
||||
|
||||
size_t residencyCount = residencyAllocations.size();
|
||||
size_t residencyCount = allocationsForResidency->size();
|
||||
std::unique_ptr<D3DKMT_HANDLE[]> handlesForResidency(new D3DKMT_HANDLE[residencyCount * max_fragments_count]);
|
||||
|
||||
uint32_t totalHandlesCount = 0;
|
||||
@@ -478,7 +477,7 @@ bool WddmMemoryManager::makeResidentResidencyAllocations(ResidencyContainer *all
|
||||
DBG_LOG(ResidencyDebugEnable, "Residency:", __FUNCTION__, "currentFenceValue =", osContext.get()->getMonitoredFence().currentFenceValue);
|
||||
|
||||
for (uint32_t i = 0; i < residencyCount; i++) {
|
||||
WddmAllocation *allocation = reinterpret_cast<WddmAllocation *>(residencyAllocations[i]);
|
||||
WddmAllocation *allocation = reinterpret_cast<WddmAllocation *>((*allocationsForResidency)[i]);
|
||||
bool mainResidency = false;
|
||||
bool fragmentResidency[3] = {false, false, false};
|
||||
|
||||
@@ -528,7 +527,7 @@ bool WddmMemoryManager::makeResidentResidencyAllocations(ResidencyContainer *all
|
||||
|
||||
if (result == true) {
|
||||
for (uint32_t i = 0; i < residencyCount; i++) {
|
||||
WddmAllocation *allocation = reinterpret_cast<WddmAllocation *>(residencyAllocations[i]);
|
||||
WddmAllocation *allocation = reinterpret_cast<WddmAllocation *>((*allocationsForResidency)[i]);
|
||||
// Update fence value not to early destroy / evict allocation
|
||||
auto currentFence = osContext.get()->getMonitoredFence().currentFenceValue;
|
||||
allocation->getResidencyData().updateCompletionData(currentFence, &osContext);
|
||||
|
||||
Reference in New Issue
Block a user