diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2018-04-03 12:25:51 -0400 |
|---|---|---|
| committer | Tim Foley <tfoleyNV@users.noreply.github.com> | 2018-04-03 09:25:51 -0700 |
| commit | 3115ba7a3640937df01ecf60f7ff55f71a3ab7c2 (patch) | |
| tree | e92edd95391270df3afdd1c0bc36aebf16e5994e /tools/render-test/circular-resource-heap-d3d12.cpp | |
| parent | 499e2586cba2a7ba2a703b90c459b24620e351ee (diff) | |
Fixes based on review of feature/dx12 PR. (#473)
Diffstat (limited to 'tools/render-test/circular-resource-heap-d3d12.cpp')
| -rw-r--r-- | tools/render-test/circular-resource-heap-d3d12.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/tools/render-test/circular-resource-heap-d3d12.cpp b/tools/render-test/circular-resource-heap-d3d12.cpp index 7336c3e09..ae8e13822 100644 --- a/tools/render-test/circular-resource-heap-d3d12.cpp +++ b/tools/render-test/circular-resource-heap-d3d12.cpp @@ -24,17 +24,18 @@ void D3D12CircularResourceHeap::_freeBlockListResources(const Block* start) { if (start) { - { - ID3D12Resource* resource = start->m_resource; - resource->Unmap(0, nullptr); - resource->Release(); - } - for (Block* block = start->m_next; block != start; block = block->m_next) - { - ID3D12Resource* resource = block->m_resource; - resource->Unmap(0, nullptr); - resource->Release(); - } + const Block* block = start; + do + { + ID3D12Resource* resource = block->m_resource; + + resource->Unmap(0, nullptr); + resource->Release(); + + // Next in list + block = block->m_next; + + } while (block != start); } } |
