Display read-only DSVs more clearly in D3D pipeline state

This commit is contained in:
baldurk
2025-07-08 13:37:37 +01:00
parent 4f0356d7f4
commit 82e963550a
2 changed files with 44 additions and 8 deletions
@@ -1993,8 +1993,17 @@ void D3D11PipelineStateViewer::setState()
{
ui->depthEnabled->setPixmap(tick);
ui->depthFunc->setText(ToQStr(state.outputMerger.depthStencilState.depthFunction));
ui->depthWrite->setPixmap(state.outputMerger.depthStencilState.depthWrites ? tick : cross);
ui->depthWrite->setText(QString());
if(state.outputMerger.depthReadOnly)
{
ui->depthWrite->setPixmap(QPixmap());
ui->depthWrite->setText(tr("Read-Only DSV"));
}
else
{
ui->depthWrite->setPixmap(state.outputMerger.depthStencilState.depthWrites ? tick : cross);
ui->depthWrite->setText(QString());
}
}
else
{
@@ -2007,8 +2016,18 @@ void D3D11PipelineStateViewer::setState()
ui->stencilEnabled->setPixmap(state.outputMerger.depthStencilState.stencilEnable ? tick : cross);
m_Common.SetStencilLabelValue(
ui->stencilReadMask, (uint8_t)state.outputMerger.depthStencilState.frontFace.compareMask);
m_Common.SetStencilLabelValue(ui->stencilWriteMask,
(uint8_t)state.outputMerger.depthStencilState.frontFace.writeMask);
if(state.outputMerger.stencilReadOnly)
{
ui->stencilWriteMask->setText(tr("Read-Only DSV"));
ui->stencilWriteMask->setToolTip(QString());
}
else
{
m_Common.SetStencilLabelValue(
ui->stencilWriteMask, (uint8_t)state.outputMerger.depthStencilState.frontFace.writeMask);
}
m_Common.SetStencilLabelValue(ui->stencilRef,
(uint8_t)state.outputMerger.depthStencilState.frontFace.reference);
@@ -2144,8 +2144,17 @@ void D3D12PipelineStateViewer::setState()
{
ui->depthEnabled->setPixmap(tick);
ui->depthFunc->setText(ToQStr(state.outputMerger.depthStencilState.depthFunction));
ui->depthWrite->setPixmap(state.outputMerger.depthStencilState.depthWrites ? tick : cross);
ui->depthWrite->setText(QString());
if(state.outputMerger.depthReadOnly)
{
ui->depthWrite->setPixmap(QPixmap());
ui->depthWrite->setText(tr("Read-Only DSV"));
}
else
{
ui->depthWrite->setPixmap(state.outputMerger.depthStencilState.depthWrites ? tick : cross);
ui->depthWrite->setText(QString());
}
}
else
{
@@ -2183,8 +2192,16 @@ void D3D12PipelineStateViewer::setState()
QVariant(),
}));
m_Common.SetStencilTreeItemValue(ui->stencils->topLevelItem(0), 5,
state.outputMerger.depthStencilState.frontFace.writeMask);
if(state.outputMerger.stencilReadOnly)
{
ui->stencils->topLevelItem(0)->setText(5, tr("Read-Only DSV"));
ui->stencils->topLevelItem(0)->setToolTip(QString());
}
else
{
m_Common.SetStencilTreeItemValue(ui->stencils->topLevelItem(0), 5,
state.outputMerger.depthStencilState.frontFace.writeMask);
}
m_Common.SetStencilTreeItemValue(ui->stencils->topLevelItem(0), 6,
state.outputMerger.depthStencilState.frontFace.compareMask);
m_Common.SetStencilTreeItemValue(ui->stencils->topLevelItem(0), 7,