Pass by const reference.

Related-To: NEO-3008

Change-Id: I90e430ccfc049ccb164865e29b6ec3f6f7e98b86
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
This commit is contained in:
Piotr Fusik
2019-09-05 11:02:40 +02:00
committed by sys_ocldev
parent 46b3012eb5
commit 8278d58841
12 changed files with 15 additions and 15 deletions

View File

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

View File

@@ -117,7 +117,7 @@ void WddmCommandStreamReceiver<GfxFamily>::makeResident(GraphicsAllocation &gfxA
}
template <typename GfxFamily>
void WddmCommandStreamReceiver<GfxFamily>::processResidency(ResidencyContainer &allocationsForResidency) {
void WddmCommandStreamReceiver<GfxFamily>::processResidency(const ResidencyContainer &allocationsForResidency) {
bool success = static_cast<OsContextWin *>(osContext)->getResidencyController().makeResidentResidencyAllocations(allocationsForResidency);
DEBUG_BREAK_IF(!success);
}

View File

@@ -298,7 +298,7 @@ bool WddmResidencyController::trimResidencyToBudget(uint64_t bytes) {
return numberOfBytesToTrim == 0;
}
bool WddmResidencyController::makeResidentResidencyAllocations(ResidencyContainer &allocationsForResidency) {
bool WddmResidencyController::makeResidentResidencyAllocations(const ResidencyContainer &allocationsForResidency) {
const size_t residencyCount = allocationsForResidency.size();
std::unique_ptr<D3DKMT_HANDLE[]> handlesForResidency(new D3DKMT_HANDLE[residencyCount * maxFragmentsCount]);
uint32_t totalHandlesCount = 0;
@@ -373,7 +373,7 @@ bool WddmResidencyController::makeResidentResidencyAllocations(ResidencyContaine
return result;
}
void WddmResidencyController::makeNonResidentEvictionAllocations(ResidencyContainer &evictionAllocations) {
void WddmResidencyController::makeNonResidentEvictionAllocations(const ResidencyContainer &evictionAllocations) {
auto lock = this->acquireLock();
const size_t residencyCount = evictionAllocations.size();

View File

@@ -56,8 +56,8 @@ class WddmResidencyController {
bool isMemoryBudgetExhausted() const { return memoryBudgetExhausted; }
void setMemoryBudgetExhausted() { memoryBudgetExhausted = true; }
bool makeResidentResidencyAllocations(ResidencyContainer &allocationsForResidency);
void makeNonResidentEvictionAllocations(ResidencyContainer &evictionAllocations);
bool makeResidentResidencyAllocations(const ResidencyContainer &allocationsForResidency);
void makeNonResidentEvictionAllocations(const ResidencyContainer &evictionAllocations);
protected:
Wddm &wddm;