diff --git a/opencl/source/os_interface/windows/wddm_device_command_stream.inl b/opencl/source/os_interface/windows/wddm_device_command_stream.inl index 9ff660cf2e..97f7a75943 100644 --- a/opencl/source/os_interface/windows/wddm_device_command_stream.inl +++ b/opencl/source/os_interface/windows/wddm_device_command_stream.inl @@ -117,7 +117,7 @@ bool WddmCommandStreamReceiver::flush(BatchBuffer &batchBuffer, Resid template void WddmCommandStreamReceiver::processResidency(const ResidencyContainer &allocationsForResidency, uint32_t handleId) { - bool success = static_cast(this->osContext)->getResidencyController().makeResidentResidencyAllocations(allocationsForResidency); + [[maybe_unused]] bool success = static_cast(this->osContext)->getResidencyController().makeResidentResidencyAllocations(allocationsForResidency); DEBUG_BREAK_IF(!success); } diff --git a/shared/source/os_interface/windows/deferrable_deletion_win.cpp b/shared/source/os_interface/windows/deferrable_deletion_win.cpp index 5eb0ba4e76..507701040f 100644 --- a/shared/source/os_interface/windows/deferrable_deletion_win.cpp +++ b/shared/source/os_interface/windows/deferrable_deletion_win.cpp @@ -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; } diff --git a/shared/source/os_interface/windows/wddm/wddm.cpp b/shared/source/os_interface/windows/wddm/wddm.cpp index 2e211a0cf5..18bc0bd00c 100644 --- a/shared/source/os_interface/windows/wddm/wddm.cpp +++ b/shared/source/os_interface/windows/wddm/wddm.cpp @@ -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(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(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) { diff --git a/shared/source/os_interface/windows/wddm/wddm_interface.cpp b/shared/source/os_interface/windows/wddm/wddm_interface.cpp index a9191bb6ce..83fa5dd329 100644 --- a/shared/source/os_interface/windows/wddm/wddm_interface.cpp +++ b/shared/source/os_interface/windows/wddm/wddm_interface.cpp @@ -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); } } diff --git a/shared/source/os_interface/windows/wddm_memory_manager.cpp b/shared/source/os_interface/windows/wddm_memory_manager.cpp index bef7ce4d60..5a5e0b5de8 100644 --- a/shared/source/os_interface/windows/wddm_memory_manager.cpp +++ b/shared/source/os_interface/windows/wddm_memory_manager.cpp @@ -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(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); } } diff --git a/shared/source/os_interface/windows/wddm_residency_controller.cpp b/shared/source/os_interface/windows/wddm_residency_controller.cpp index 9fb0e11a4d..6ce20cb8f6 100644 --- a/shared/source/os_interface/windows/wddm_residency_controller.cpp +++ b/shared/source/os_interface/windows/wddm_residency_controller.cpp @@ -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)