Prevent debugging graphics stages if no drawcall is selected

This commit is contained in:
baldurk
2020-06-29 14:16:18 +01:00
parent e68719b5f6
commit dfc82b3bd2
2 changed files with 10 additions and 1 deletions
+6 -1
View File
@@ -507,7 +507,12 @@ void TextureViewer::UI_UpdateCachedTexture()
const ShaderReflection *shaderDetails =
m_Ctx.CurPipelineState().GetShaderReflection(ShaderStage::Pixel);
if(!shaderDetails)
if(!m_Ctx.CurDrawcall() || !(m_Ctx.CurDrawcall()->flags & DrawFlags::Drawcall))
{
ui->debugPixelContext->setEnabled(false);
ui->debugPixelContext->setToolTip(tr("No draw call selected"));
}
else if(!shaderDetails)
{
ui->debugPixelContext->setEnabled(false);
ui->debugPixelContext->setToolTip(tr("No pixel shader bound"));