Add APIProperties for debugging and pixel history

Checks to enable debugging and pixel history are gated by the
APIProperties instead of whether the capture is D3D11. Shader
debugging for D3D12 is gated on a config option, which can be enabled
by adding "d3d12ShaderDebugging": "true" to the ConfigSettings
This commit is contained in:
Steve Karolewics
2020-02-12 21:58:33 +00:00
committed by Baldur Karlsson
parent 7076e9d451
commit dd69f8642a
8 changed files with 38 additions and 49 deletions
+4 -5
View File
@@ -486,9 +486,8 @@ void TextureViewer::UI_UpdateCachedTexture()
m_CachedTexture = m_Ctx.GetTexture(id);
ui->debugPixelContext->setEnabled(m_Ctx.CurPipelineState().IsCaptureD3D11() &&
m_CachedTexture != NULL);
ui->pixelHistory->setEnabled(m_Ctx.CurPipelineState().IsCaptureD3D11() && m_CachedTexture != NULL);
ui->debugPixelContext->setEnabled(m_Ctx.APIProps().shaderDebugging && m_CachedTexture != NULL);
ui->pixelHistory->setEnabled(m_Ctx.APIProps().pixelHistory && m_CachedTexture != NULL);
}
TextureViewer::TextureViewer(ICaptureContext &ctx, QWidget *parent)
@@ -2767,7 +2766,7 @@ void TextureViewer::OnCaptureLoaded()
ui->locationGoto->setEnabled(true);
ui->viewTexBuffer->setEnabled(true);
if(m_Ctx.CurPipelineState().IsCaptureD3D11())
if(m_Ctx.APIProps().pixelHistory)
{
ui->pixelHistory->setEnabled(true);
ui->pixelHistory->setToolTip(QString());
@@ -2778,7 +2777,7 @@ void TextureViewer::OnCaptureLoaded()
ui->pixelHistory->setToolTip(tr("Pixel History not implemented on this API"));
}
if(m_Ctx.CurPipelineState().IsCaptureD3D11())
if(m_Ctx.APIProps().shaderDebugging)
{
ui->debugPixelContext->setEnabled(true);
ui->debugPixelContext->setToolTip(QString());