mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-28 09:26:52 +00:00
Compile fixes for shadowed variables
This commit is contained in:
@@ -2884,9 +2884,9 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in
|
||||
|
||||
uint32_t count = exec.maxCount;
|
||||
|
||||
vector<byte> data;
|
||||
if(exec.countBuf)
|
||||
{
|
||||
vector<byte> 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user