Skip to content

Commit

Permalink
d3d12: Log OUT_OF_BAND_IGNORE
Browse files Browse the repository at this point in the history
  • Loading branch information
jp7677 committed Jun 28, 2024
1 parent e07762e commit f130aa6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/nvapi_d3d12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ extern "C" {

NvAPI_Status __cdecl NvAPI_D3D12_NotifyOutOfBandCommandQueue(ID3D12CommandQueue* pCommandQueue, NV_OUT_OF_BAND_CQ_TYPE cqType) {
constexpr auto n = __func__;
thread_local bool alreadyLoggedTypeIgnore = false;
thread_local bool alreadyLoggedError = false;
thread_local bool alreadyLoggedOk = false;

Expand All @@ -474,6 +475,9 @@ extern "C" {
if (nvapiD3dInstance->IsUsingLfx() || !NvapiD3dLowLatencyDevice::SupportsLowLatency(pCommandQueue))
return NoImplementation(n);

if (cqType == OUT_OF_BAND_IGNORE && !std::exchange(alreadyLoggedTypeIgnore, true))
log::info("NvAPI_D3D12_NotifyOutOfBandCommandQueue is called with OUT_OF_BAND_IGNORE");

if (!NvapiD3d12Device::NotifyOutOfBandCommandQueue(pCommandQueue, static_cast<D3D12_OUT_OF_BAND_CQ_TYPE>(cqType)))
return Error(n, alreadyLoggedError);

Expand Down

0 comments on commit f130aa6

Please sign in to comment.