mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-07 15:20:58 +00:00
Remove redundant/tautological checks
This commit is contained in:
@@ -2274,8 +2274,7 @@ void ShaderViewer::updateDebugState()
|
||||
lit("Resource"), ToQStr(roBind.resources[0].resourceId)});
|
||||
node->setTag(QVariant::fromValue(
|
||||
VariableTag(DebugVariableReference(DebugVariableType::ReadOnlyResource, ro.name))));
|
||||
if(node)
|
||||
ui->constants->addTopLevelItem(node);
|
||||
ui->constants->addTopLevelItem(node);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2334,8 +2333,7 @@ void ShaderViewer::updateDebugState()
|
||||
lit("Resource"), ToQStr(rwBind.resources[0].resourceId)});
|
||||
node->setTag(QVariant::fromValue(
|
||||
VariableTag(DebugVariableReference(DebugVariableType::ReadOnlyResource, rw.name))));
|
||||
if(node)
|
||||
ui->constants->addTopLevelItem(node);
|
||||
ui->constants->addTopLevelItem(node);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3027,7 +3025,7 @@ void ShaderViewer::ToggleBreakpoint(int instruction)
|
||||
|
||||
if(instLine == -1)
|
||||
{
|
||||
if(m_Trace && instruction >= 0 && instruction < m_Trace->lineInfo.count())
|
||||
if(m_Trace && instruction < m_Trace->lineInfo.count())
|
||||
instLine = m_Trace->lineInfo[instruction].disassemblyLine - 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1111,20 +1111,17 @@ void GatherConstantBuffers(WrappedID3D12Device *pDevice, const DXBCBytecode::Pro
|
||||
bytebuf cbufData;
|
||||
for(UINT n = 0; n < numDescriptors; ++n, ++slot.shaderRegister)
|
||||
{
|
||||
if(desc)
|
||||
{
|
||||
const D3D12_CONSTANT_BUFFER_VIEW_DESC &cbv = desc->GetCBV();
|
||||
ResourceId resId;
|
||||
uint64_t byteOffset = 0;
|
||||
WrappedID3D12Resource1::GetResIDFromAddr(cbv.BufferLocation, resId, byteOffset);
|
||||
ID3D12Resource *pCbvResource =
|
||||
pDevice->GetResourceManager()->GetCurrentAs<ID3D12Resource>(resId);
|
||||
cbufData.clear();
|
||||
const D3D12_CONSTANT_BUFFER_VIEW_DESC &cbv = desc->GetCBV();
|
||||
ResourceId resId;
|
||||
uint64_t byteOffset = 0;
|
||||
WrappedID3D12Resource1::GetResIDFromAddr(cbv.BufferLocation, resId, byteOffset);
|
||||
ID3D12Resource *pCbvResource =
|
||||
pDevice->GetResourceManager()->GetCurrentAs<ID3D12Resource>(resId);
|
||||
cbufData.clear();
|
||||
|
||||
pDevice->GetDebugManager()->GetBufferData(pCbvResource, element.offset + byteOffset,
|
||||
0, cbufData);
|
||||
AddCBufferToGlobalState(program, global, sourceVars, refl, mapping, slot, cbufData);
|
||||
}
|
||||
pDevice->GetDebugManager()->GetBufferData(pCbvResource, element.offset + byteOffset, 0,
|
||||
cbufData);
|
||||
AddCBufferToGlobalState(program, global, sourceVars, refl, mapping, slot, cbufData);
|
||||
|
||||
desc++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user