mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-24 15:36:33 +00:00
Prevent debugging graphics stages if no drawcall is selected
This commit is contained in:
@@ -2290,6 +2290,10 @@ void BufferViewer::stageRowMenu(MeshDataStage stage, QMenu *menu, const QPoint &
|
||||
{
|
||||
m_DebugVert->setToolTip(tr("This API does not support shader debugging"));
|
||||
}
|
||||
else if(!m_Ctx.CurDrawcall() || !(m_Ctx.CurDrawcall()->flags & DrawFlags::Drawcall))
|
||||
{
|
||||
m_DebugVert->setToolTip(tr("No draw call selected"));
|
||||
}
|
||||
else if(!shaderDetails)
|
||||
{
|
||||
m_DebugVert->setToolTip(tr("No vertex shader bound"));
|
||||
|
||||
@@ -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