From d55be5f687cd5ca84d89228098562bbd9a79175d Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 22 Aug 2014 00:40:49 +0100 Subject: [PATCH] Duplicate up pixel modifications based on # frags --- renderdoc/driver/d3d11/d3d11_analyse.cpp | 15 +++++++++++++++ renderdoc/replay/data_types.h | 3 +++ renderdocui/Interop/FetchInfo.cs | 3 +++ 3 files changed, 21 insertions(+) diff --git a/renderdoc/driver/d3d11/d3d11_analyse.cpp b/renderdoc/driver/d3d11/d3d11_analyse.cpp index a87ab177d..77671fede 100644 --- a/renderdoc/driver/d3d11/d3d11_analyse.cpp +++ b/renderdoc/driver/d3d11/d3d11_analyse.cpp @@ -4214,6 +4214,21 @@ vector D3D11DebugManager::PixelHistory(uint32_t frameID, vect } } + for(size_t h=0; h < history.size(); ) + { + int32_t frags = RDCMAX(1, history[h].shaderOut.col.value_i[0]); + + PixelModification mod = history[h]; + + for(int32_t f=1; f < frags; f++) + history.insert(history.begin()+h+1, mod); + + for(int32_t f=0; f < frags; f++) + history[h+f].fragIndex = f; + + h += frags; + } + m_pImmediateContext->Unmap(pixstoreDepthReadback, 0); m_pImmediateContext->Unmap(pixstore, 0); diff --git a/renderdoc/replay/data_types.h b/renderdoc/replay/data_types.h index 3bd04af71..0967aaf68 100644 --- a/renderdoc/replay/data_types.h +++ b/renderdoc/replay/data_types.h @@ -213,6 +213,9 @@ struct PixelModification { uint32_t eventID; + uint32_t fragIndex; + uint32_t primitiveID; + ModificationValue preMod; ModificationValue shaderOut; ModificationValue postMod; diff --git a/renderdocui/Interop/FetchInfo.cs b/renderdocui/Interop/FetchInfo.cs index 45d80e625..2c21f6917 100644 --- a/renderdocui/Interop/FetchInfo.cs +++ b/renderdocui/Interop/FetchInfo.cs @@ -472,6 +472,9 @@ namespace renderdoc { public UInt32 eventID; + public UInt32 fragIndex; + public UInt32 primitiveID; + [CustomMarshalAs(CustomUnmanagedType.CustomClass)] public ModificationValue preMod; [CustomMarshalAs(CustomUnmanagedType.CustomClass)]