mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
Improving cpp compliance - marking unused vars
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
8ca347f836
commit
da34084514
@@ -117,7 +117,7 @@ bool WddmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer, Resid
|
|||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void WddmCommandStreamReceiver<GfxFamily>::processResidency(const ResidencyContainer &allocationsForResidency, uint32_t handleId) {
|
void WddmCommandStreamReceiver<GfxFamily>::processResidency(const ResidencyContainer &allocationsForResidency, uint32_t handleId) {
|
||||||
bool success = static_cast<OsContextWin *>(this->osContext)->getResidencyController().makeResidentResidencyAllocations(allocationsForResidency);
|
[[maybe_unused]] bool success = static_cast<OsContextWin *>(this->osContext)->getResidencyController().makeResidentResidencyAllocations(allocationsForResidency);
|
||||||
DEBUG_BREAK_IF(!success);
|
DEBUG_BREAK_IF(!success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ DeferrableDeletionImpl::DeferrableDeletionImpl(Wddm *wddm, const D3DKMT_HANDLE *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool DeferrableDeletionImpl::apply() {
|
bool DeferrableDeletionImpl::apply() {
|
||||||
bool destroyStatus = wddm->destroyAllocations(handles, allocationCount, resourceHandle);
|
[[maybe_unused]] bool destroyStatus = wddm->destroyAllocations(handles, allocationCount, resourceHandle);
|
||||||
DEBUG_BREAK_IF(!destroyStatus);
|
DEBUG_BREAK_IF(!destroyStatus);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ bool Wddm::destroyPagingQueue() {
|
|||||||
if (pagingQueue) {
|
if (pagingQueue) {
|
||||||
DestroyPagingQueue.hPagingQueue = pagingQueue;
|
DestroyPagingQueue.hPagingQueue = pagingQueue;
|
||||||
|
|
||||||
NTSTATUS status = getGdi()->destroyPagingQueue(&DestroyPagingQueue);
|
[[maybe_unused]] NTSTATUS status = getGdi()->destroyPagingQueue(&DestroyPagingQueue);
|
||||||
DEBUG_BREAK_IF(status != STATUS_SUCCESS);
|
DEBUG_BREAK_IF(status != STATUS_SUCCESS);
|
||||||
pagingQueue = 0;
|
pagingQueue = 0;
|
||||||
}
|
}
|
||||||
@@ -602,8 +602,8 @@ NTSTATUS Wddm::createAllocationsAndMapGpuVa(OsHandleStorage &osHandles) {
|
|||||||
auto osHandle = static_cast<OsHandleWin *>(osHandles.fragmentStorageData[i].osHandleStorage);
|
auto osHandle = static_cast<OsHandleWin *>(osHandles.fragmentStorageData[i].osHandleStorage);
|
||||||
if (osHandle->handle == (D3DKMT_HANDLE) nullptr && osHandles.fragmentStorageData[i].fragmentSize) {
|
if (osHandle->handle == (D3DKMT_HANDLE) nullptr && osHandles.fragmentStorageData[i].fragmentSize) {
|
||||||
AllocationInfo[allocationCount].pPrivateDriverData = osHandle->gmm->gmmResourceInfo->peekHandle();
|
AllocationInfo[allocationCount].pPrivateDriverData = osHandle->gmm->gmmResourceInfo->peekHandle();
|
||||||
auto pSysMem = osHandles.fragmentStorageData[i].cpuPtr;
|
[[maybe_unused]] auto pSysMem = osHandles.fragmentStorageData[i].cpuPtr;
|
||||||
auto PSysMemFromGmm = osHandle->gmm->gmmResourceInfo->getSystemMemPointer();
|
[[maybe_unused]] auto PSysMemFromGmm = osHandle->gmm->gmmResourceInfo->getSystemMemPointer();
|
||||||
DEBUG_BREAK_IF(PSysMemFromGmm != pSysMem);
|
DEBUG_BREAK_IF(PSysMemFromGmm != pSysMem);
|
||||||
AllocationInfo[allocationCount].pSystemMem = osHandles.fragmentStorageData[i].cpuPtr;
|
AllocationInfo[allocationCount].pSystemMem = osHandles.fragmentStorageData[i].cpuPtr;
|
||||||
AllocationInfo[allocationCount].PrivateDriverDataSize = static_cast<unsigned int>(osHandle->gmm->gmmResourceInfo->peekHandleSize());
|
AllocationInfo[allocationCount].PrivateDriverDataSize = static_cast<unsigned int>(osHandle->gmm->gmmResourceInfo->peekHandleSize());
|
||||||
@@ -1044,7 +1044,7 @@ void Wddm::unregisterTrimCallback(PFND3DKMT_TRIMNOTIFICATIONCALLBACK callback, V
|
|||||||
|
|
||||||
void Wddm::releaseReservedAddress(void *reservedAddress) {
|
void Wddm::releaseReservedAddress(void *reservedAddress) {
|
||||||
if (reservedAddress) {
|
if (reservedAddress) {
|
||||||
auto status = virtualFree(reservedAddress, 0, MEM_RELEASE);
|
[[maybe_unused]] auto status = virtualFree(reservedAddress, 0, MEM_RELEASE);
|
||||||
DEBUG_BREAK_IF(!status);
|
DEBUG_BREAK_IF(!status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1065,7 +1065,7 @@ bool Wddm::reserveValidAddressRange(size_t size, void *&reservedMem) {
|
|||||||
}
|
}
|
||||||
} while (1);
|
} while (1);
|
||||||
for (auto &it : invalidAddrVector) {
|
for (auto &it : invalidAddrVector) {
|
||||||
auto status = virtualFree(it, 0, MEM_RELEASE);
|
[[maybe_unused]] auto status = virtualFree(it, 0, MEM_RELEASE);
|
||||||
DEBUG_BREAK_IF(!status);
|
DEBUG_BREAK_IF(!status);
|
||||||
}
|
}
|
||||||
if (reservedMem == nullptr) {
|
if (reservedMem == nullptr) {
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ void WddmInterface23::destroyHwQueue(D3DKMT_HANDLE hwQueue) {
|
|||||||
D3DKMT_DESTROYHWQUEUE destroyHwQueue = {};
|
D3DKMT_DESTROYHWQUEUE destroyHwQueue = {};
|
||||||
destroyHwQueue.hHwQueue = hwQueue;
|
destroyHwQueue.hHwQueue = hwQueue;
|
||||||
|
|
||||||
auto status = wddm.getGdi()->destroyHwQueue(&destroyHwQueue);
|
[[maybe_unused]] auto status = wddm.getGdi()->destroyHwQueue(&destroyHwQueue);
|
||||||
DEBUG_BREAK_IF(status != STATUS_SUCCESS);
|
DEBUG_BREAK_IF(status != STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemory64kb(const Allocati
|
|||||||
|
|
||||||
auto cpuPtr = gmm->isRenderCompressed ? nullptr : lockResource(wddmAllocation.get());
|
auto cpuPtr = gmm->isRenderCompressed ? nullptr : lockResource(wddmAllocation.get());
|
||||||
|
|
||||||
auto status = mapGpuVirtualAddress(wddmAllocation.get(), cpuPtr);
|
[[maybe_unused]] auto status = mapGpuVirtualAddress(wddmAllocation.get(), cpuPtr);
|
||||||
DEBUG_BREAK_IF(!status);
|
DEBUG_BREAK_IF(!status);
|
||||||
wddmAllocation->setCpuAddress(cpuPtr);
|
wddmAllocation->setCpuAddress(cpuPtr);
|
||||||
return wddmAllocation.release();
|
return wddmAllocation.release();
|
||||||
@@ -420,7 +420,7 @@ void WddmMemoryManager::unlockResourceImpl(GraphicsAllocation &graphicsAllocatio
|
|||||||
auto &wddmAllocation = static_cast<WddmAllocation &>(graphicsAllocation);
|
auto &wddmAllocation = static_cast<WddmAllocation &>(graphicsAllocation);
|
||||||
getWddm(graphicsAllocation.getRootDeviceIndex()).unlockResource(wddmAllocation.getDefaultHandle());
|
getWddm(graphicsAllocation.getRootDeviceIndex()).unlockResource(wddmAllocation.getDefaultHandle());
|
||||||
if (wddmAllocation.needsMakeResidentBeforeLock) {
|
if (wddmAllocation.needsMakeResidentBeforeLock) {
|
||||||
auto evictionStatus = getWddm(graphicsAllocation.getRootDeviceIndex()).getTemporaryResourcesContainer()->evictResource(wddmAllocation.getDefaultHandle());
|
[[maybe_unused]] auto evictionStatus = getWddm(graphicsAllocation.getRootDeviceIndex()).getTemporaryResourcesContainer()->evictResource(wddmAllocation.getDefaultHandle());
|
||||||
DEBUG_BREAK_IF(evictionStatus == MemoryOperationsStatus::FAILED);
|
DEBUG_BREAK_IF(evictionStatus == MemoryOperationsStatus::FAILED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -447,7 +447,7 @@ void WddmMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllocation
|
|||||||
if (defaultGmm) {
|
if (defaultGmm) {
|
||||||
auto index = gfxAllocation->getRootDeviceIndex();
|
auto index = gfxAllocation->getRootDeviceIndex();
|
||||||
if (defaultGmm->isRenderCompressed && executionEnvironment.rootDeviceEnvironments[index]->pageTableManager.get()) {
|
if (defaultGmm->isRenderCompressed && executionEnvironment.rootDeviceEnvironments[index]->pageTableManager.get()) {
|
||||||
auto status = executionEnvironment.rootDeviceEnvironments[index]->pageTableManager->updateAuxTable(input->getGpuAddress(), defaultGmm, false);
|
[[maybe_unused]] auto status = executionEnvironment.rootDeviceEnvironments[index]->pageTableManager->updateAuxTable(input->getGpuAddress(), defaultGmm, false);
|
||||||
DEBUG_BREAK_IF(!status);
|
DEBUG_BREAK_IF(!status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -461,11 +461,11 @@ void WddmMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllocation
|
|||||||
cleanGraphicsMemoryCreatedFromHostPtr(gfxAllocation);
|
cleanGraphicsMemoryCreatedFromHostPtr(gfxAllocation);
|
||||||
} else {
|
} else {
|
||||||
if (input->peekSharedHandle()) {
|
if (input->peekSharedHandle()) {
|
||||||
auto status = tryDeferDeletions(nullptr, 0, input->resourceHandle, gfxAllocation->getRootDeviceIndex());
|
[[maybe_unused]] auto status = tryDeferDeletions(nullptr, 0, input->resourceHandle, gfxAllocation->getRootDeviceIndex());
|
||||||
DEBUG_BREAK_IF(!status);
|
DEBUG_BREAK_IF(!status);
|
||||||
} else {
|
} else {
|
||||||
for (auto handle : input->getHandles()) {
|
for (auto handle : input->getHandles()) {
|
||||||
auto status = tryDeferDeletions(&handle, 1, 0, gfxAllocation->getRootDeviceIndex());
|
[[maybe_unused]] auto status = tryDeferDeletions(&handle, 1, 0, gfxAllocation->getRootDeviceIndex());
|
||||||
DEBUG_BREAK_IF(!status);
|
DEBUG_BREAK_IF(!status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ void WddmResidencyController::compactTrimCandidateList() {
|
|||||||
|
|
||||||
DEBUG_BREAK_IF(!(trimCandidateList[size - 1] != nullptr));
|
DEBUG_BREAK_IF(!(trimCandidateList[size - 1] != nullptr));
|
||||||
|
|
||||||
uint32_t previousCount = trimCandidatesCount;
|
[[maybe_unused]] uint32_t previousCount = trimCandidatesCount;
|
||||||
DEBUG_BREAK_IF(trimCandidatesCount > trimCandidateList.size());
|
DEBUG_BREAK_IF(trimCandidatesCount > trimCandidateList.size());
|
||||||
|
|
||||||
while (freePosition < trimCandidatesCount && trimCandidateList[freePosition] != nullptr)
|
while (freePosition < trimCandidatesCount && trimCandidateList[freePosition] != nullptr)
|
||||||
|
|||||||
Reference in New Issue
Block a user