mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-22 21:55:52 +00:00
Fix up fetching layer/mip for FBOs on replay
This commit is contained in:
@@ -1324,7 +1324,7 @@ namespace renderdocui.Windows.PipelineState
|
||||
{
|
||||
ResourceId p = ResourceId.Null;
|
||||
|
||||
if (db >= 0) p = state.m_FB.m_DrawFBO.Color[db];
|
||||
if (db >= 0) p = state.m_FB.m_DrawFBO.Color[db].Obj;
|
||||
|
||||
if (p != ResourceId.Null || showEmpty.Checked)
|
||||
{
|
||||
@@ -1384,7 +1384,7 @@ namespace renderdocui.Windows.PipelineState
|
||||
|
||||
{
|
||||
int i = 0;
|
||||
foreach (ResourceId depthstencil in new ResourceId[] { state.m_FB.m_DrawFBO.Depth, state.m_FB.m_DrawFBO.Stencil })
|
||||
foreach (ResourceId depthstencil in new ResourceId[] { state.m_FB.m_DrawFBO.Depth.Obj, state.m_FB.m_DrawFBO.Stencil.Obj })
|
||||
{
|
||||
if (depthstencil != ResourceId.Null || showEmpty.Checked)
|
||||
{
|
||||
|
||||
@@ -112,6 +112,21 @@ namespace renderdocui.Windows
|
||||
|
||||
return view != null ? (int)view.HighestMip : -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Type == FollowType.OutputColour)
|
||||
{
|
||||
return (int)core.CurGLPipelineState.m_FB.m_DrawFBO.Color[index].Mip;
|
||||
}
|
||||
else if (Type == FollowType.OutputDepth)
|
||||
{
|
||||
return (int)core.CurGLPipelineState.m_FB.m_DrawFBO.Depth.Mip;
|
||||
}
|
||||
else if (Type == FollowType.ReadWriteRes)
|
||||
{
|
||||
return (int)core.CurGLPipelineState.Images[index].Level;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -144,12 +159,20 @@ namespace renderdocui.Windows
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Type == FollowType.ReadWriteRes)
|
||||
if (Type == FollowType.OutputColour)
|
||||
{
|
||||
return (int)core.CurGLPipelineState.m_FB.m_DrawFBO.Color[index].Layer;
|
||||
}
|
||||
else if (Type == FollowType.OutputDepth)
|
||||
{
|
||||
return (int)core.CurGLPipelineState.m_FB.m_DrawFBO.Depth.Layer;
|
||||
}
|
||||
else if (Type == FollowType.ReadWriteRes)
|
||||
{
|
||||
if(!core.CurGLPipelineState.Images[index].Layered)
|
||||
return (int)core.CurGLPipelineState.Images[index].Layer;
|
||||
}
|
||||
if (Type == FollowType.PSResource)
|
||||
else if (Type == FollowType.PSResource)
|
||||
{
|
||||
return (int)core.CurGLPipelineState.Textures[index].FirstSlice;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user