mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user