From 2c3e6867d7833d27c2439356626bc1db34521fa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sat, 12 Sep 2015 15:31:42 -0700 Subject: [PATCH] Fixed variable shadowing warning. --- src/renderer_d3d12.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/renderer_d3d12.cpp b/src/renderer_d3d12.cpp index eebf8403..76be53c3 100644 --- a/src/renderer_d3d12.cpp +++ b/src/renderer_d3d12.cpp @@ -4386,8 +4386,8 @@ data.NumQualityLevels = 0; { currentBindHash = bindHash; - Bind* bind = bindLru.find(bindHash); - if (NULL == bind) + Bind* bindCached = bindLru.find(bindHash); + if (NULL == bindCached) { D3D12_GPU_DESCRIPTOR_HANDLE srvHandle[BGFX_MAX_COMPUTE_BINDINGS] = {}; uint32_t samplerFlags[BGFX_MAX_COMPUTE_BINDINGS] = {}; @@ -4458,14 +4458,14 @@ data.NumQualityLevels = 0; } else { - uint16_t samplerStateIdx = bind->m_samplerStateIdx; + uint16_t samplerStateIdx = bindCached->m_samplerStateIdx; if (samplerStateIdx != currentSamplerStateIdx) { currentSamplerStateIdx = samplerStateIdx; m_commandList->SetComputeRootDescriptorTable(Rdt::Sampler, m_samplerAllocator.get(samplerStateIdx) ); } - m_commandList->SetComputeRootDescriptorTable(Rdt::SRV, bind->m_srvHandle); - m_commandList->SetComputeRootDescriptorTable(Rdt::UAV, bind->m_srvHandle); + m_commandList->SetComputeRootDescriptorTable(Rdt::SRV, bindCached->m_srvHandle); + m_commandList->SetComputeRootDescriptorTable(Rdt::UAV, bindCached->m_srvHandle); } } @@ -4607,8 +4607,8 @@ data.NumQualityLevels = 0; { currentBindHash = bindHash; - Bind* bind = bindLru.find(bindHash); - if (NULL == bind) + Bind* bindCached = bindLru.find(bindHash); + if (NULL == bindCached) { D3D12_GPU_DESCRIPTOR_HANDLE srvHandle[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS]; uint32_t samplerFlags[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS]; @@ -4655,13 +4655,13 @@ data.NumQualityLevels = 0; } else { - uint16_t samplerStateIdx = bind->m_samplerStateIdx; + uint16_t samplerStateIdx = bindCached->m_samplerStateIdx; if (samplerStateIdx != currentSamplerStateIdx) { currentSamplerStateIdx = samplerStateIdx; m_commandList->SetGraphicsRootDescriptorTable(Rdt::Sampler, m_samplerAllocator.get(samplerStateIdx) ); } - m_commandList->SetGraphicsRootDescriptorTable(Rdt::SRV, bind->m_srvHandle); + m_commandList->SetGraphicsRootDescriptorTable(Rdt::SRV, bindCached->m_srvHandle); } }