Get rid of processResidency() calls with null ResidencyContainer 4/n

Change-Id: I318e0b2846a72d9cba4921ba62e0ea491cc46da9
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2018-09-13 11:35:16 +02:00
parent fafde2ec15
commit 7aa70248e8
3 changed files with 45 additions and 45 deletions

View File

@@ -124,9 +124,9 @@ void DrmCommandStreamReceiver<GfxFamily>::makeResident(BufferObject *bo) {
template <typename GfxFamily>
void DrmCommandStreamReceiver<GfxFamily>::processResidency(ResidencyContainer *inputAllocationsForResidency, OsContext &osContext) {
auto &allocationsForResidency = inputAllocationsForResidency ? *inputAllocationsForResidency : this->getResidencyAllocations();
for (uint32_t a = 0; a < allocationsForResidency.size(); a++) {
DrmAllocation *drmAlloc = reinterpret_cast<DrmAllocation *>(allocationsForResidency[a]);
UNRECOVERABLE_IF(inputAllocationsForResidency == nullptr);
for (auto &alloc : *inputAllocationsForResidency) {
auto drmAlloc = reinterpret_cast<DrmAllocation *>(alloc);
if (drmAlloc->fragmentsStorage.fragmentCount) {
for (unsigned int f = 0; f < drmAlloc->fragmentsStorage.fragmentCount; f++) {
makeResident(drmAlloc->fragmentsStorage.fragmentStorageData[f].osHandleStorage->bo);