When selecting the final swapchain present, use present target

* It was using the last bound render target, which could be empty if
  state was reset before presentation. Instead we use the copy target
  listed in the present drawcall as the actual swap buffer presented to.
This commit is contained in:
baldurk
2016-11-02 23:39:35 +01:00
parent 5a5c576a33
commit e040249398
4 changed files with 9 additions and 2 deletions
+2 -2
View File
@@ -98,7 +98,7 @@ namespace renderdocui.Windows
public static void GetDrawContext(Core core, out bool copy, out bool compute)
{
var curDraw = core.CurDrawcall;
copy = curDraw != null && (curDraw.flags & (DrawcallFlags.Copy | DrawcallFlags.Resolve)) != 0;
copy = curDraw != null && (curDraw.flags & (DrawcallFlags.Copy | DrawcallFlags.Resolve | DrawcallFlags.Present)) != 0;
compute = curDraw != null && (curDraw.flags & DrawcallFlags.Dispatch) != 0 &&
core.CurPipelineState.GetShader(ShaderStageType.Compute) != ResourceId.Null;
}
@@ -1420,7 +1420,7 @@ namespace renderdocui.Windows
int roIndex = 0;
var curDraw = m_Core.GetDrawcall(eventID);
bool copy = curDraw != null && (curDraw.flags & (DrawcallFlags.Copy|DrawcallFlags.Resolve)) != 0;
bool copy = curDraw != null && (curDraw.flags & (DrawcallFlags.Copy|DrawcallFlags.Resolve|DrawcallFlags.Present)) != 0;
bool compute = curDraw != null && (curDraw.flags & (DrawcallFlags.Dispatch)) != 0;
for(int rt=0; rt < RTs.Length; rt++)