Improving cpp compliance - marking unused vars

Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
This commit is contained in:
Jaroslaw Chodor 2021-05-20 13:48:33 +00:00 committed by Compute-Runtime-Automation
parent 8ca347f836
commit da34084514
6 changed files with 14 additions and 14 deletions

View File

@ -117,7 +117,7 @@ bool WddmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer, Resid
template <typename GfxFamily>
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);
}

View File

@ -27,7 +27,7 @@ DeferrableDeletionImpl::DeferrableDeletionImpl(Wddm *wddm, const D3DKMT_HANDLE *
}
}
bool DeferrableDeletionImpl::apply() {
bool destroyStatus = wddm->destroyAllocations(handles, allocationCount, resourceHandle);
[[maybe_unused]] bool destroyStatus = wddm->destroyAllocations(handles, allocationCount, resourceHandle);
DEBUG_BREAK_IF(!destroyStatus);
return true;
}

View File

@ -207,7 +207,7 @@ bool Wddm::destroyPagingQueue() {
if (pagingQueue) {
DestroyPagingQueue.hPagingQueue = pagingQueue;
NTSTATUS status = getGdi()->destroyPagingQueue(&DestroyPagingQueue);
[[maybe_unused]] NTSTATUS status = getGdi()->destroyPagingQueue(&DestroyPagingQueue);
DEBUG_BREAK_IF(status != STATUS_SUCCESS);
pagingQueue = 0;
}
@ -602,8 +602,8 @@ NTSTATUS Wddm::createAllocationsAndMapGpuVa(OsHandleStorage &osHandles) {
auto osHandle = static_cast<OsHandleWin *>(osHandles.fragmentStorageData[i].osHandleStorage);
if (osHandle->handle == (D3DKMT_HANDLE) nullptr && osHandles.fragmentStorageData[i].fragmentSize) {
AllocationInfo[allocationCount].pPrivateDriverData = osHandle->gmm->gmmResourceInfo->peekHandle();
auto pSysMem = osHandles.fragmentStorageData[i].cpuPtr;
auto PSysMemFromGmm = osHandle->gmm->gmmResourceInfo->getSystemMemPointer();
[[maybe_unused]] auto pSysMem = osHandles.fragmentStorageData[i].cpuPtr;
[[maybe_unused]] auto PSysMemFromGmm = osHandle->gmm->gmmResourceInfo->getSystemMemPointer();
DEBUG_BREAK_IF(PSysMemFromGmm != pSysMem);
AllocationInfo[allocationCount].pSystemMem = osHandles.fragmentStorageData[i].cpuPtr;
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) {
if (reservedAddress) {
auto status = virtualFree(reservedAddress, 0, MEM_RELEASE);
[[maybe_unused]] auto status = virtualFree(reservedAddress, 0, MEM_RELEASE);
DEBUG_BREAK_IF(!status);
}
}
@ -1065,7 +1065,7 @@ bool Wddm::reserveValidAddressRange(size_t size, void *&reservedMem) {
}
} while (1);
for (auto &it : invalidAddrVector) {
auto status = virtualFree(it, 0, MEM_RELEASE);
[[maybe_unused]] auto status = virtualFree(it, 0, MEM_RELEASE);
DEBUG_BREAK_IF(!status);
}
if (reservedMem == nullptr) {

View File

@ -133,7 +133,7 @@ void WddmInterface23::destroyHwQueue(D3DKMT_HANDLE hwQueue) {
D3DKMT_DESTROYHWQUEUE destroyHwQueue = {};
destroyHwQueue.hHwQueue = hwQueue;
auto status = wddm.getGdi()->destroyHwQueue(&destroyHwQueue);
[[maybe_unused]] auto status = wddm.getGdi()->destroyHwQueue(&destroyHwQueue);
DEBUG_BREAK_IF(status != STATUS_SUCCESS);
}
}

View File

@ -114,7 +114,7 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemory64kb(const Allocati
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);
wddmAllocation->setCpuAddress(cpuPtr);
return wddmAllocation.release();
@ -420,7 +420,7 @@ void WddmMemoryManager::unlockResourceImpl(GraphicsAllocation &graphicsAllocatio
auto &wddmAllocation = static_cast<WddmAllocation &>(graphicsAllocation);
getWddm(graphicsAllocation.getRootDeviceIndex()).unlockResource(wddmAllocation.getDefaultHandle());
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);
}
}
@ -447,7 +447,7 @@ void WddmMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllocation
if (defaultGmm) {
auto index = gfxAllocation->getRootDeviceIndex();
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);
}
}
@ -461,11 +461,11 @@ void WddmMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllocation
cleanGraphicsMemoryCreatedFromHostPtr(gfxAllocation);
} else {
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);
} else {
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);
}
}

View File

@ -147,7 +147,7 @@ void WddmResidencyController::compactTrimCandidateList() {
DEBUG_BREAK_IF(!(trimCandidateList[size - 1] != nullptr));
uint32_t previousCount = trimCandidatesCount;
[[maybe_unused]] uint32_t previousCount = trimCandidatesCount;
DEBUG_BREAK_IF(trimCandidatesCount > trimCandidateList.size());
while (freePosition < trimCandidatesCount && trimCandidateList[freePosition] != nullptr)