mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-28 01:16:31 +00:00
Display a message when we can't debug a pixel shader and show a history
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user