Change processResidency argument to a reference

Change-Id: Ie313a8cc4e479a314bcf170917397c13fbb70d14
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2018-09-14 10:39:21 +02:00
committed by sys_ocldev
parent 610eda5ad1
commit ac1d2b9901
18 changed files with 58 additions and 57 deletions

View File

@@ -42,7 +42,7 @@ class WddmCommandStreamReceiver : public DeviceCommandStreamReceiver<GfxFamily>
FlushStamp flush(BatchBuffer &batchBuffer, EngineType engineType, ResidencyContainer *allocationsForResidency, OsContext &osContext) override;
void makeResident(GraphicsAllocation &gfxAllocation) override;
void processResidency(ResidencyContainer *allocationsForResidency, OsContext &osContext) override;
void processResidency(ResidencyContainer &allocationsForResidency, OsContext &osContext) override;
void processEviction() override;
bool waitForFlushStamp(FlushStamp &flushStampToWait, OsContext &osContext) override;

View File

@@ -106,7 +106,8 @@ FlushStamp WddmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer,
batchBuffer.commandBufferAllocation->residencyTaskCount = this->taskCount;
}
this->processResidency(allocationsForResidency, osContext);
UNRECOVERABLE_IF(allocationsForResidency == nullptr);
this->processResidency(*allocationsForResidency, osContext);
COMMAND_BUFFER_HEADER *pHeader = reinterpret_cast<COMMAND_BUFFER_HEADER *>(commandBufferHeader);
pHeader->RequiresCoherency = batchBuffer.requiresCoherency;
@@ -152,8 +153,8 @@ void WddmCommandStreamReceiver<GfxFamily>::makeResident(GraphicsAllocation &gfxA
}
template <typename GfxFamily>
void WddmCommandStreamReceiver<GfxFamily>::processResidency(ResidencyContainer *allocationsForResidency, OsContext &osContext) {
bool success = getMemoryManager()->makeResidentResidencyAllocations(allocationsForResidency, osContext);
void WddmCommandStreamReceiver<GfxFamily>::processResidency(ResidencyContainer &allocationsForResidency, OsContext &osContext) {
bool success = getMemoryManager()->makeResidentResidencyAllocations(&allocationsForResidency, osContext);
DEBUG_BREAK_IF(!success);
}