From 03993072c5c9a6a6e4393bd4411e3fe9fa07fe01 Mon Sep 17 00:00:00 2001 From: Andrew Depke Date: Sun, 7 Jun 2020 01:03:43 -0600 Subject: [PATCH] Added mapping range to prevent debug layer warnings --- TracyD3D12.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TracyD3D12.hpp b/TracyD3D12.hpp index 76bd7a87..10cb8a1e 100644 --- a/TracyD3D12.hpp +++ b/TracyD3D12.hpp @@ -163,10 +163,12 @@ namespace tracy // Batch submit all of our query data to the profiler. + D3D12_RANGE mapRange{ 0, m_queryLimit * sizeof(uint64_t) }; + // Map the readback buffer so we can fetch the query data from the GPU. void* readbackBufferMapping = nullptr; - if (FAILED(m_readbackBuffer->Map(0, nullptr, &readbackBufferMapping))) + if (FAILED(m_readbackBuffer->Map(0, &mapRange, &readbackBufferMapping))) { assert(false && "Failed to map readback buffer."); }