Added mapping range to prevent debug layer warnings

This commit is contained in:
Andrew Depke 2020-06-07 01:03:43 -06:00
parent bffcc52536
commit 03993072c5

View File

@ -163,10 +163,12 @@ namespace tracy
// Batch submit all of our query data to the profiler. // 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. // Map the readback buffer so we can fetch the query data from the GPU.
void* readbackBufferMapping = nullptr; 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."); assert(false && "Failed to map readback buffer.");
} }