mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Change makeResidentResidencyAllocations argument to a reference
Change-Id: I7e8a73fdbe5371e29a53ec34201eddb42cb7f20a Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
@@ -139,7 +139,7 @@ void WddmCommandStreamReceiver<GfxFamily>::makeResident(GraphicsAllocation &gfxA
|
||||
|
||||
template <typename GfxFamily>
|
||||
void WddmCommandStreamReceiver<GfxFamily>::processResidency(ResidencyContainer &allocationsForResidency, OsContext &osContext) {
|
||||
bool success = getMemoryManager()->makeResidentResidencyAllocations(&allocationsForResidency, osContext);
|
||||
bool success = getMemoryManager()->makeResidentResidencyAllocations(allocationsForResidency, osContext);
|
||||
DEBUG_BREAK_IF(!success);
|
||||
}
|
||||
|
||||
|
||||
@@ -452,10 +452,8 @@ uint64_t WddmMemoryManager::getInternalHeapBaseAddress() {
|
||||
return this->wddm->getGfxPartition().Heap32[1].Base;
|
||||
}
|
||||
|
||||
bool WddmMemoryManager::makeResidentResidencyAllocations(ResidencyContainer *allocationsForResidency, OsContext &osContext) {
|
||||
DEBUG_BREAK_IF(allocationsForResidency == nullptr);
|
||||
|
||||
size_t residencyCount = allocationsForResidency->size();
|
||||
bool WddmMemoryManager::makeResidentResidencyAllocations(ResidencyContainer &allocationsForResidency, OsContext &osContext) {
|
||||
size_t residencyCount = allocationsForResidency.size();
|
||||
std::unique_ptr<D3DKMT_HANDLE[]> handlesForResidency(new D3DKMT_HANDLE[residencyCount * max_fragments_count]);
|
||||
|
||||
uint32_t totalHandlesCount = 0;
|
||||
@@ -465,7 +463,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 *>((*allocationsForResidency)[i]);
|
||||
WddmAllocation *allocation = reinterpret_cast<WddmAllocation *>(allocationsForResidency[i]);
|
||||
bool mainResidency = false;
|
||||
bool fragmentResidency[3] = {false, false, false};
|
||||
|
||||
@@ -515,7 +513,7 @@ bool WddmMemoryManager::makeResidentResidencyAllocations(ResidencyContainer *all
|
||||
|
||||
if (result == true) {
|
||||
for (uint32_t i = 0; i < residencyCount; i++) {
|
||||
WddmAllocation *allocation = reinterpret_cast<WddmAllocation *>((*allocationsForResidency)[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);
|
||||
|
||||
@@ -49,7 +49,7 @@ class WddmMemoryManager : public MemoryManager {
|
||||
void *lockResource(GraphicsAllocation *graphicsAllocation) override;
|
||||
void unlockResource(GraphicsAllocation *graphicsAllocation) override;
|
||||
|
||||
bool makeResidentResidencyAllocations(ResidencyContainer *allocationsForResidency, OsContext &osContext);
|
||||
bool makeResidentResidencyAllocations(ResidencyContainer &allocationsForResidency, OsContext &osContext);
|
||||
void makeNonResidentEvictionAllocations(ResidencyContainer &evictionAllocations);
|
||||
|
||||
AllocationStatus populateOsHandles(OsHandleStorage &handleStorage) override;
|
||||
|
||||
Reference in New Issue
Block a user