diff --git a/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp b/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp index 21b31f48e..6ddf91ddf 100644 --- a/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp +++ b/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp @@ -2884,9 +2884,9 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in uint32_t count = exec.maxCount; - vector data; if(exec.countBuf) { + vector data; m_pDevice->GetDebugManager()->GetBufferData(exec.countBuf, exec.countOffs, 4, data); count = RDCMIN(count, *(uint32_t *)&data[0]); } @@ -3091,11 +3091,11 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in FetchDrawcall &draw = draws[idx].draw; FetchAPIEvent *ev = NULL; - for(int32_t i = 0; i < draw.events.count; i++) + for(int32_t e = 0; e < draw.events.count; e++) { - if(draw.events[i].eventID == eid) + if(draw.events[e].eventID == eid) { - ev = &draw.events[i]; + ev = &draw.events[e]; break; } } @@ -3136,11 +3136,11 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in FetchDrawcall &draw = draws[idx].draw; FetchAPIEvent *ev = NULL; - for(int32_t i = 0; i < draw.events.count; i++) + for(int32_t e = 0; e < draw.events.count; e++) { - if(draw.events[i].eventID == eid) + if(draw.events[e].eventID == eid) { - ev = &draw.events[i]; + ev = &draw.events[e]; break; } } @@ -3180,11 +3180,11 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in FetchDrawcall &draw = draws[idx].draw; FetchAPIEvent *ev = NULL; - for(int32_t i = 0; i < draw.events.count; i++) + for(int32_t e = 0; e < draw.events.count; e++) { - if(draw.events[i].eventID == eid) + if(draw.events[e].eventID == eid) { - ev = &draw.events[i]; + ev = &draw.events[e]; break; } } @@ -3238,11 +3238,11 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in FetchDrawcall &draw = draws[idx].draw; FetchAPIEvent *ev = NULL; - for(int32_t i = 0; i < draw.events.count; i++) + for(int32_t e = 0; e < draw.events.count; e++) { - if(draw.events[i].eventID == eid) + if(draw.events[e].eventID == eid) { - ev = &draw.events[i]; + ev = &draw.events[e]; break; } } diff --git a/renderdoc/driver/d3d12/d3d12_commands.cpp b/renderdoc/driver/d3d12/d3d12_commands.cpp index 55bae8b13..37bcdb08d 100644 --- a/renderdoc/driver/d3d12/d3d12_commands.cpp +++ b/renderdoc/driver/d3d12/d3d12_commands.cpp @@ -788,16 +788,16 @@ void D3D12CommandData::GetIndirectBuffer(size_t size, ID3D12Resource **buf, uint heapProps.CreationNodeMask = 1; heapProps.VisibleNodeMask = 1; - ID3D12Resource *buf = NULL; + ID3D12Resource *argbuf = NULL; HRESULT hr = m_pDevice->CreateCommittedResource(&heapProps, D3D12_HEAP_FLAG_NONE, &indirectDesc, D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT, NULL, - __uuidof(ID3D12Resource), (void **)&buf); + __uuidof(ID3D12Resource), (void **)&argbuf); if(FAILED(hr)) RDCERR("Failed to create indirect buffer, HRESULT: 0x%08x", hr); - m_IndirectBuffers.push_back(buf); + m_IndirectBuffers.push_back(argbuf); m_IndirectOffset = 0; } diff --git a/renderdoc/driver/d3d12/d3d12_replay.cpp b/renderdoc/driver/d3d12/d3d12_replay.cpp index 6a47c71ab..2b8a99579 100644 --- a/renderdoc/driver/d3d12/d3d12_replay.cpp +++ b/renderdoc/driver/d3d12/d3d12_replay.cpp @@ -1392,17 +1392,17 @@ void D3D12Replay::ReplaceResource(ResourceId from, ResourceId to) &desc.VS, &desc.HS, &desc.DS, &desc.GS, &desc.PS, }; - for(size_t i = 0; i < ARRAY_COUNT(shaders); i++) + for(size_t s = 0; s < ARRAY_COUNT(shaders); s++) { - if(shaders[i]->BytecodeLength > 0) + if(shaders[s]->BytecodeLength > 0) { - WrappedID3D12PipelineState::ShaderEntry *s = - (WrappedID3D12PipelineState::ShaderEntry *)shaders[i]->pShaderBytecode; + WrappedID3D12PipelineState::ShaderEntry *stage = + (WrappedID3D12PipelineState::ShaderEntry *)shaders[s]->pShaderBytecode; - if(s->GetResourceID() == from) - *shaders[i] = shDesc; + if(stage->GetResourceID() == from) + *shaders[s] = shDesc; else - *shaders[i] = s->GetDesc(); + *shaders[s] = stage->GetDesc(); } } @@ -1447,9 +1447,9 @@ void D3D12Replay::RemoveReplacement(ResourceId id) { WrappedID3D12PipelineState *pipe = sh->m_Pipes[i]; - ResourceId id = rm->GetOriginalID(pipe->GetResourceID()); + ResourceId pipeid = rm->GetOriginalID(pipe->GetResourceID()); - rm->RemoveReplacement(id); + rm->RemoveReplacement(pipeid); } } }