mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Prevent debugging graphics stages if no drawcall is selected
This commit is contained in:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user