Display a message when we can't debug a pixel shader and show a history

This commit is contained in:
baldurk
2025-10-08 22:34:53 +01:00
parent 03b06b7e3c
commit 9e0d6f18d6
5 changed files with 33 additions and 6 deletions
+9 -1
View File
@@ -4145,7 +4145,7 @@ void TextureViewer::on_debugPixelContext_clicked()
if(!trace)
{
if(m_Ctx.APIProps().pixelHistory)
on_pixelHistory_clicked();
ShowPixelHistory(true);
else
RDDialog::critical(this, tr("Debug Error"), tr("Error debugging pixel."));
return;
@@ -4162,6 +4162,11 @@ void TextureViewer::on_debugPixelContext_clicked()
}
void TextureViewer::on_pixelHistory_clicked()
{
ShowPixelHistory(false);
}
void TextureViewer::ShowPixelHistory(bool failedDebug)
{
TextureDescription *texptr = GetCurrentTexture();
@@ -4181,6 +4186,9 @@ void TextureViewer::on_pixelHistory_clicked()
uint32_t view = m_TexDisplay.subresource.slice - m_Following.GetFirstArraySlice(m_Ctx);
IPixelHistoryView *hist = m_Ctx.ViewPixelHistory(texptr->resourceId, x, y, view, m_TexDisplay);
if(failedDebug)
hist->SetFailedDebug();
m_Ctx.AddDockWindow(hist->Widget(), DockReference::TransientPopupArea, this, 0.3f);
// we use this pointer to ensure that the history viewer is still visible (and hasn't been closed)