mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-07 12:51:33 +00:00
Remove 'debug' serialiser that synchronously flushes out debug text
This commit is contained in:
1 parent
25615d2e34
commit
607b8d48c9
19 files changed
+127
-195
No files matched your search
@@ -50,11 +50,6 @@ enum
|
||||
// force debugbreaks regardless of debug/release mode
|
||||
//#define FORCE_DEBUGBREAK
|
||||
|
||||
// synchronously (ie. flushed to disk) write out the text-mode only serialised
|
||||
// data of ALL serialising. Helps in debugging crashes to know exactly which
|
||||
// calls have been made
|
||||
//#define DEBUG_TEXT_SERIALISER
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Logging configuration
|
||||
|
||||
|
||||
@@ -516,7 +516,7 @@ Serialiser *RenderDoc::OpenWriteSerialiser(uint32_t frameNum, RDCInitParams *par
|
||||
Serialiser *chunkSerialiser = new Serialiser(NULL, Serialiser::WRITING, debugSerialiser);
|
||||
|
||||
{
|
||||
ScopedContext scope(chunkSerialiser, NULL, "Thumbnail", THUMBNAIL_DATA, false);
|
||||
ScopedContext scope(chunkSerialiser, "Thumbnail", THUMBNAIL_DATA, false);
|
||||
|
||||
bool HasThumbnail = (thpixels != NULL && thwidth > 0 && thheight > 0);
|
||||
chunkSerialiser->Serialise("HasThumbnail", HasThumbnail);
|
||||
@@ -533,13 +533,13 @@ Serialiser *RenderDoc::OpenWriteSerialiser(uint32_t frameNum, RDCInitParams *par
|
||||
}
|
||||
|
||||
{
|
||||
ScopedContext scope(chunkSerialiser, NULL, "Capture Create Parameters", CREATE_PARAMS, false);
|
||||
ScopedContext scope(chunkSerialiser, "Capture Create Parameters", CREATE_PARAMS, false);
|
||||
|
||||
chunkSerialiser->Serialise("DriverType", m_CurrentDriver);
|
||||
chunkSerialiser->SerialiseString("DriverName", m_CurrentDriverName);
|
||||
|
||||
{
|
||||
ScopedContext driverparams(chunkSerialiser, NULL, "Driver Specific", DRIVER_INIT_PARAMS, false);
|
||||
ScopedContext driverparams(chunkSerialiser, "Driver Specific", DRIVER_INIT_PARAMS, false);
|
||||
|
||||
params->m_pSerialiser = chunkSerialiser;
|
||||
params->m_State = WRITING;
|
||||
|
||||
@@ -125,13 +125,14 @@ enum ReplayLogType
|
||||
|
||||
struct RDCInitParams
|
||||
{
|
||||
RDCInitParams() { m_State = WRITING; m_pSerialiser = m_pDebugSerialiser = NULL; }
|
||||
RDCInitParams() { m_State = WRITING; m_pSerialiser = NULL; }
|
||||
virtual ~RDCInitParams() {}
|
||||
virtual ReplayCreateStatus Serialise() = 0;
|
||||
|
||||
LogState m_State;
|
||||
Serialiser *m_pSerialiser;
|
||||
Serialiser *m_pDebugSerialiser;
|
||||
|
||||
Serialiser *GetSerialiser() { return m_pSerialiser; }
|
||||
};
|
||||
|
||||
struct CaptureData
|
||||
|
||||
@@ -433,6 +433,8 @@ class ResourceManager : public ResourceRecordHandler
|
||||
LogState m_State;
|
||||
Serialiser *m_pSerialiser;
|
||||
|
||||
Serialiser *GetSerialiser() { return m_pSerialiser; }
|
||||
|
||||
bool m_InFrame;
|
||||
|
||||
// very coarse lock, protects EVERYTHING. This could certainly be improved and it may be a bottleneck
|
||||
@@ -941,7 +943,7 @@ void ResourceManager<WrappedResourceType, RealResourceType, RecordType>::InsertI
|
||||
}
|
||||
else
|
||||
{
|
||||
ScopedContext scope(m_pSerialiser, NULL, "Initial Contents", "Initial Contents", INITIAL_CONTENTS, false);
|
||||
ScopedContext scope(m_pSerialiser, "Initial Contents", "Initial Contents", INITIAL_CONTENTS, false);
|
||||
|
||||
Serialise_InitialState(res);
|
||||
|
||||
@@ -963,7 +965,7 @@ void ResourceManager<WrappedResourceType, RealResourceType, RecordType>::InsertI
|
||||
}
|
||||
else
|
||||
{
|
||||
ScopedContext scope(m_pSerialiser, NULL, "Initial Contents", "Initial Contents", INITIAL_CONTENTS, false);
|
||||
ScopedContext scope(m_pSerialiser, "Initial Contents", "Initial Contents", INITIAL_CONTENTS, false);
|
||||
|
||||
Serialise_InitialState(it->second);
|
||||
|
||||
|
||||
@@ -1110,7 +1110,7 @@ ShaderReflection *MakeShaderReflection(DXBC::DXBCFile *dxbc)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, D3D11_BUFFER_DESC &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_BUFFER_DESC", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_BUFFER_DESC", 0, true);
|
||||
Serialise("ByteWidth", el.ByteWidth);
|
||||
Serialise("Usage", el.Usage);
|
||||
Serialise("BindFlags", (D3D11_BIND_FLAG&)el.BindFlags);
|
||||
@@ -1122,7 +1122,7 @@ void Serialiser::Serialise(const char *name, D3D11_BUFFER_DESC &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, D3D11_TEXTURE1D_DESC &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_TEXTURE1D_DESC", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_TEXTURE1D_DESC", 0, true);
|
||||
Serialise("Width", el.Width);
|
||||
Serialise("MipLevels", el.MipLevels);
|
||||
Serialise("ArraySize", el.ArraySize);
|
||||
@@ -1136,7 +1136,7 @@ void Serialiser::Serialise(const char *name, D3D11_TEXTURE1D_DESC &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, D3D11_TEXTURE2D_DESC &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_TEXTURE2D_DESC", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_TEXTURE2D_DESC", 0, true);
|
||||
Serialise("Width", el.Width);
|
||||
Serialise("Height", el.Height);
|
||||
Serialise("MipLevels", el.MipLevels);
|
||||
@@ -1152,7 +1152,7 @@ void Serialiser::Serialise(const char *name, D3D11_TEXTURE2D_DESC &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, D3D11_TEXTURE3D_DESC &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_TEXTURE3D_DESC", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_TEXTURE3D_DESC", 0, true);
|
||||
Serialise("Width", el.Width);
|
||||
Serialise("Height", el.Height);
|
||||
Serialise("Depth", el.Depth);
|
||||
@@ -1167,7 +1167,7 @@ void Serialiser::Serialise(const char *name, D3D11_TEXTURE3D_DESC &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, D3D11_SHADER_RESOURCE_VIEW_DESC &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_SHADER_RESOURCE_VIEW_DESC", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_SHADER_RESOURCE_VIEW_DESC", 0, true);
|
||||
Serialise("Format", el.Format);
|
||||
Serialise("ViewDimension", el.ViewDimension);
|
||||
|
||||
@@ -1232,7 +1232,7 @@ void Serialiser::Serialise(const char *name, D3D11_SHADER_RESOURCE_VIEW_DESC &el
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, D3D11_RENDER_TARGET_VIEW_DESC &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_RENDER_TARGET_VIEW_DESC", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_RENDER_TARGET_VIEW_DESC", 0, true);
|
||||
Serialise("Format", el.Format);
|
||||
Serialise("ViewDimension", el.ViewDimension);
|
||||
|
||||
@@ -1279,7 +1279,7 @@ void Serialiser::Serialise(const char *name, D3D11_RENDER_TARGET_VIEW_DESC &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, D3D11_UNORDERED_ACCESS_VIEW_DESC &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_UNORDERED_ACCESS_VIEW_DESC", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_UNORDERED_ACCESS_VIEW_DESC", 0, true);
|
||||
Serialise("Format", el.Format);
|
||||
Serialise("ViewDimension", el.ViewDimension);
|
||||
|
||||
@@ -1320,7 +1320,7 @@ void Serialiser::Serialise(const char *name, D3D11_UNORDERED_ACCESS_VIEW_DESC &e
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, D3D11_DEPTH_STENCIL_VIEW_DESC &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_DEPTH_STENCIL_VIEW_DESC", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_DEPTH_STENCIL_VIEW_DESC", 0, true);
|
||||
Serialise("Format", el.Format);
|
||||
Serialise("Flags", el.Flags);
|
||||
Serialise("ViewDimension", el.ViewDimension);
|
||||
@@ -1359,13 +1359,13 @@ void Serialiser::Serialise(const char *name, D3D11_DEPTH_STENCIL_VIEW_DESC &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, D3D11_BLEND_DESC &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_BLEND_DESC", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_BLEND_DESC", 0, true);
|
||||
|
||||
Serialise("AlphaToCoverageEnable", el.AlphaToCoverageEnable);
|
||||
Serialise("IndependentBlendEnable", el.IndependentBlendEnable);
|
||||
for(int i=0; i < 8; i++)
|
||||
{
|
||||
ScopedContext targetscope(this, this, name, "D3D11_RENDER_TARGET_BLEND_DESC", 0, true);
|
||||
ScopedContext targetscope(this, name, "D3D11_RENDER_TARGET_BLEND_DESC", 0, true);
|
||||
|
||||
bool enable = el.RenderTarget[i].BlendEnable == TRUE;
|
||||
Serialise("BlendEnable", enable);
|
||||
@@ -1387,7 +1387,7 @@ void Serialiser::Serialise(const char *name, D3D11_BLEND_DESC &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, D3D11_DEPTH_STENCIL_DESC &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_DEPTH_STENCIL_DESC", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_DEPTH_STENCIL_DESC", 0, true);
|
||||
|
||||
Serialise("DepthEnable", el.DepthEnable);
|
||||
Serialise("DepthWriteMask", el.DepthWriteMask);
|
||||
@@ -1397,14 +1397,14 @@ void Serialiser::Serialise(const char *name, D3D11_DEPTH_STENCIL_DESC &el)
|
||||
Serialise("StencilWriteMask", el.StencilWriteMask);
|
||||
|
||||
{
|
||||
ScopedContext opscope(this, this, name, "D3D11_DEPTH_STENCILOP_DESC", 0, true);
|
||||
ScopedContext opscope(this, name, "D3D11_DEPTH_STENCILOP_DESC", 0, true);
|
||||
Serialise("FrontFace.StencilFailOp", el.FrontFace.StencilFailOp);
|
||||
Serialise("FrontFace.StencilDepthFailOp", el.FrontFace.StencilDepthFailOp);
|
||||
Serialise("FrontFace.StencilPassOp", el.FrontFace.StencilPassOp);
|
||||
Serialise("FrontFace.StencilFunc", el.FrontFace.StencilFunc);
|
||||
}
|
||||
{
|
||||
ScopedContext opscope(this, this, name, "D3D11_DEPTH_STENCILOP_DESC", 0, true);
|
||||
ScopedContext opscope(this, name, "D3D11_DEPTH_STENCILOP_DESC", 0, true);
|
||||
Serialise("BackFace.StencilFailOp", el.BackFace.StencilFailOp);
|
||||
Serialise("BackFace.StencilDepthFailOp", el.BackFace.StencilDepthFailOp);
|
||||
Serialise("BackFace.StencilPassOp", el.BackFace.StencilPassOp);
|
||||
@@ -1415,7 +1415,7 @@ void Serialiser::Serialise(const char *name, D3D11_DEPTH_STENCIL_DESC &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, D3D11_RASTERIZER_DESC &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_RASTERIZER_DESC", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_RASTERIZER_DESC", 0, true);
|
||||
|
||||
Serialise("FillMode", el.FillMode);
|
||||
Serialise("CullMode", el.CullMode);
|
||||
@@ -1432,7 +1432,7 @@ void Serialiser::Serialise(const char *name, D3D11_RASTERIZER_DESC &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, D3D11_QUERY_DESC &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_QUERY_DESC", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_QUERY_DESC", 0, true);
|
||||
|
||||
Serialise("MiscFlags", el.MiscFlags);
|
||||
Serialise("Query", el.Query);
|
||||
@@ -1441,7 +1441,7 @@ void Serialiser::Serialise(const char *name, D3D11_QUERY_DESC &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, D3D11_COUNTER_DESC &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_COUNTER_DESC", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_COUNTER_DESC", 0, true);
|
||||
|
||||
Serialise("MiscFlags", el.MiscFlags);
|
||||
Serialise("Counter", el.Counter);
|
||||
@@ -1450,7 +1450,7 @@ void Serialiser::Serialise(const char *name, D3D11_COUNTER_DESC &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, D3D11_SAMPLER_DESC &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_SAMPLER_DESC", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_SAMPLER_DESC", 0, true);
|
||||
|
||||
Serialise("Filter", el.Filter);
|
||||
Serialise("AddressU", el.AddressU);
|
||||
@@ -1466,7 +1466,7 @@ void Serialiser::Serialise(const char *name, D3D11_SAMPLER_DESC &el)
|
||||
|
||||
template<> void Serialiser::Serialise(const char *name, D3D11_SO_DECLARATION_ENTRY &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_SO_DECLARATION_ENTRY", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_SO_DECLARATION_ENTRY", 0, true);
|
||||
|
||||
string s = "";
|
||||
if(m_Mode >= WRITING && el.SemanticName != NULL)
|
||||
@@ -1503,7 +1503,7 @@ template<> void Serialiser::Serialise(const char *name, D3D11_SO_DECLARATION_ENT
|
||||
|
||||
template<> void Serialiser::Serialise(const char *name, D3D11_INPUT_ELEMENT_DESC &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_INPUT_ELEMENT_DESC", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_INPUT_ELEMENT_DESC", 0, true);
|
||||
|
||||
string s;
|
||||
if(m_Mode >= WRITING)
|
||||
@@ -1534,7 +1534,7 @@ template<> void Serialiser::Serialise(const char *name, D3D11_INPUT_ELEMENT_DESC
|
||||
|
||||
template<> void Serialiser::Serialise(const char *name, D3D11_SUBRESOURCE_DATA &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_SUBRESOURCE_DATA", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_SUBRESOURCE_DATA", 0, true);
|
||||
|
||||
// el.pSysMem
|
||||
Serialise("SysMemPitch", el.SysMemPitch);
|
||||
@@ -1545,13 +1545,13 @@ template<> void Serialiser::Serialise(const char *name, D3D11_SUBRESOURCE_DATA &
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, D3D11_BLEND_DESC1 &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_BLEND_DESC1", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_BLEND_DESC1", 0, true);
|
||||
|
||||
Serialise("AlphaToCoverageEnable", el.AlphaToCoverageEnable);
|
||||
Serialise("IndependentBlendEnable", el.IndependentBlendEnable);
|
||||
for(int i=0; i < 8; i++)
|
||||
{
|
||||
ScopedContext targetscope(this, this, name, "D3D11_RENDER_TARGET_BLEND_DESC1", 0, true);
|
||||
ScopedContext targetscope(this, name, "D3D11_RENDER_TARGET_BLEND_DESC1", 0, true);
|
||||
|
||||
bool enable = el.RenderTarget[i].BlendEnable == TRUE;
|
||||
Serialise("BlendEnable", enable);
|
||||
@@ -1578,7 +1578,7 @@ void Serialiser::Serialise(const char *name, D3D11_BLEND_DESC1 &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, D3D11_RASTERIZER_DESC1 &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "D3D11_RASTERIZER_DESC1", 0, true);
|
||||
ScopedContext scope(this, name, "D3D11_RASTERIZER_DESC1", 0, true);
|
||||
|
||||
Serialise("FillMode", el.FillMode);
|
||||
Serialise("CullMode", el.CullMode);
|
||||
|
||||
@@ -80,7 +80,7 @@ extern uint32_t NullCBOffsets[D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT]
|
||||
extern uint32_t NullCBCounts[D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT];
|
||||
|
||||
WrappedID3D11DeviceContext::WrappedID3D11DeviceContext(WrappedID3D11Device* realDevice, ID3D11DeviceContext* context,
|
||||
Serialiser *ser, Serialiser *debugser)
|
||||
Serialiser *ser)
|
||||
: RefCounter(context), m_pDevice(realDevice), m_pRealContext(context)
|
||||
{
|
||||
if(RenderDoc::Inst().GetCrashHandler())
|
||||
@@ -122,7 +122,6 @@ WrappedID3D11DeviceContext::WrappedID3D11DeviceContext(WrappedID3D11Device* real
|
||||
else
|
||||
{
|
||||
m_pSerialiser = new Serialiser(NULL, Serialiser::WRITING, debugSerialiser);
|
||||
m_pDebugSerialiser = debugser;
|
||||
m_State = WRITING_IDLE;
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +186,6 @@ private:
|
||||
D3D11ResourceRecord *m_ContextRecord;
|
||||
|
||||
Serialiser *m_pSerialiser;
|
||||
Serialiser *m_pDebugSerialiser;
|
||||
LogState m_State;
|
||||
CaptureFailReason m_FailureReason;
|
||||
bool m_SuccessfulCapture;
|
||||
@@ -244,7 +243,7 @@ public:
|
||||
static const int AllocPoolMaxByteSize = 3*1024*1024;
|
||||
ALLOCATE_WITH_WRAPPED_POOL(WrappedID3D11DeviceContext, AllocPoolCount, AllocPoolMaxByteSize);
|
||||
|
||||
WrappedID3D11DeviceContext(WrappedID3D11Device* realDevice, ID3D11DeviceContext* context, Serialiser *ser, Serialiser *debugser);
|
||||
WrappedID3D11DeviceContext(WrappedID3D11Device* realDevice, ID3D11DeviceContext* context, Serialiser *ser);
|
||||
void SetSerialiser(Serialiser *ser) { m_pSerialiser = ser; }
|
||||
virtual ~WrappedID3D11DeviceContext();
|
||||
|
||||
|
||||
@@ -3398,7 +3398,7 @@ void WrappedID3D11DeviceContext::Serialise_DebugMessages()
|
||||
|
||||
for(uint32_t i=0; i < NumMessages; i++)
|
||||
{
|
||||
ScopedContext msgscope(m_pSerialiser, m_pDebugSerialiser, "DebugMessage", "DebugMessage", 0, false);
|
||||
ScopedContext msgscope(m_pSerialiser, "DebugMessage", "DebugMessage", 0, false);
|
||||
|
||||
string desc;
|
||||
if(m_State >= WRITING)
|
||||
|
||||
@@ -306,7 +306,6 @@ WrappedID3D11Device::WrappedID3D11Device(ID3D11Device* realDevice, D3D11InitPara
|
||||
{
|
||||
m_State = READING;
|
||||
m_pSerialiser = NULL;
|
||||
m_pDebugSerialiser = NULL;
|
||||
|
||||
ResourceIDGen::SetReplayResourceIDs();
|
||||
}
|
||||
@@ -314,12 +313,6 @@ WrappedID3D11Device::WrappedID3D11Device(ID3D11Device* realDevice, D3D11InitPara
|
||||
{
|
||||
m_State = WRITING_IDLE;
|
||||
m_pSerialiser = new Serialiser(NULL, Serialiser::WRITING, debugSerialiser);
|
||||
|
||||
#ifdef DEBUG_TEXT_SERIALISER
|
||||
m_pDebugSerialiser = new Serialiser("./debuglog.txt", Serialiser::DEBUGWRITING, true);
|
||||
#else
|
||||
m_pDebugSerialiser = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
m_ResourceManager = new D3D11ResourceManager(m_State, m_pSerialiser, this);
|
||||
@@ -347,7 +340,7 @@ WrappedID3D11Device::WrappedID3D11Device(ID3D11Device* realDevice, D3D11InitPara
|
||||
ID3D11DeviceContext *context = NULL;
|
||||
realDevice->GetImmediateContext(&context);
|
||||
|
||||
m_pImmediateContext = new WrappedID3D11DeviceContext(this, context, m_pSerialiser, m_pDebugSerialiser);
|
||||
m_pImmediateContext = new WrappedID3D11DeviceContext(this, context, m_pSerialiser);
|
||||
|
||||
realDevice->QueryInterface(__uuidof(ID3D11InfoQueue), (void **)&m_pInfoQueue);
|
||||
realDevice->QueryInterface(__uuidof(ID3D11Debug), (void **)&m_WrappedDebug.m_pDebug);
|
||||
@@ -459,7 +452,6 @@ WrappedID3D11Device::~WrappedID3D11Device()
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
|
||||
SAFE_DELETE(m_pSerialiser);
|
||||
SAFE_DELETE(m_pDebugSerialiser);
|
||||
|
||||
if(RenderDoc::Inst().GetCrashHandler())
|
||||
RenderDoc::Inst().GetCrashHandler()->UnregisterMemoryRegion(this);
|
||||
|
||||
@@ -223,7 +223,6 @@ private:
|
||||
D3D11ResourceRecord *m_DeviceRecord;
|
||||
|
||||
Serialiser *m_pSerialiser;
|
||||
Serialiser *m_pDebugSerialiser;
|
||||
LogState m_State;
|
||||
bool m_AppControlledCapture;
|
||||
|
||||
|
||||
@@ -2440,7 +2440,7 @@ bool WrappedID3D11Device::Serialise_CreateDeferredContext(
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = new WrappedID3D11DeviceContext(this, ret, m_pSerialiser, m_pDebugSerialiser);
|
||||
ret = new WrappedID3D11DeviceContext(this, ret, m_pSerialiser);
|
||||
|
||||
AddDeferredContext((WrappedID3D11DeviceContext *)ret);
|
||||
|
||||
@@ -2466,7 +2466,7 @@ HRESULT WrappedID3D11Device::CreateDeferredContext(
|
||||
{
|
||||
SCOPED_LOCK(m_D3DLock);
|
||||
|
||||
WrappedID3D11DeviceContext *w = new WrappedID3D11DeviceContext(this, real, m_pSerialiser, m_pDebugSerialiser);
|
||||
WrappedID3D11DeviceContext *w = new WrappedID3D11DeviceContext(this, real, m_pSerialiser);
|
||||
|
||||
wrapped = w;
|
||||
|
||||
|
||||
@@ -430,6 +430,8 @@ private:
|
||||
void AddRefs();
|
||||
void ReleaseRefs();
|
||||
|
||||
Serialiser *GetSerialiser() { return m_pSerialiser; }
|
||||
|
||||
Serialiser *m_pSerialiser;
|
||||
bool m_ImmediatePipeline;
|
||||
WrappedID3D11Device *m_pDevice;
|
||||
|
||||
@@ -2857,7 +2857,7 @@ void WrappedOpenGL::Serialise_DebugMessages()
|
||||
|
||||
for(uint32_t i=0; i < NumMessages; i++)
|
||||
{
|
||||
ScopedContext msgscope(m_pSerialiser, NULL, "DebugMessage", "DebugMessage", 0, false);
|
||||
ScopedContext msgscope(m_pSerialiser, "DebugMessage", "DebugMessage", 0, false);
|
||||
|
||||
string desc;
|
||||
if(m_State >= WRITING)
|
||||
|
||||
@@ -100,7 +100,7 @@ const GLenum FramebufferInitialData::attachmentNames[10] = {
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VertexAttribInitialData &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VertexArrayInitialData", 0, true);
|
||||
ScopedContext scope(this, name, "VertexArrayInitialData", 0, true);
|
||||
Serialise("enabled", el.enabled);
|
||||
Serialise("vbslot", el.vbslot);
|
||||
Serialise("offset", el.offset);
|
||||
@@ -113,7 +113,7 @@ void Serialiser::Serialise(const char *name, VertexAttribInitialData &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VertexBufferInitialData &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VertexBufferInitialData", 0, true);
|
||||
ScopedContext scope(this, name, "VertexBufferInitialData", 0, true);
|
||||
Serialise("Buffer", el.Buffer);
|
||||
Serialise("Stride", el.Stride);
|
||||
Serialise("Offset", el.Offset);
|
||||
@@ -123,7 +123,7 @@ void Serialiser::Serialise(const char *name, VertexBufferInitialData &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, FeedbackInitialData &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "FeedbackInitialData", 0, true);
|
||||
ScopedContext scope(this, name, "FeedbackInitialData", 0, true);
|
||||
Serialise("valid", el.valid);
|
||||
SerialisePODArray<4>("Buffer", el.Buffer);
|
||||
SerialisePODArray<4>("Offset", el.Offset);
|
||||
@@ -133,7 +133,7 @@ void Serialiser::Serialise(const char *name, FeedbackInitialData &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, FramebufferAttachmentData &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "FramebufferAttachmentData", 0, true);
|
||||
ScopedContext scope(this, name, "FramebufferAttachmentData", 0, true);
|
||||
Serialise("renderbuffer", el.renderbuffer);
|
||||
Serialise("layered", el.layered);
|
||||
Serialise("layer", el.layer);
|
||||
@@ -144,7 +144,7 @@ void Serialiser::Serialise(const char *name, FramebufferAttachmentData &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, FramebufferInitialData &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "FramebufferInitialData", 0, true);
|
||||
ScopedContext scope(this, name, "FramebufferInitialData", 0, true);
|
||||
Serialise("valid", el.valid);
|
||||
SerialisePODArray<8>("DrawBuffers", el.DrawBuffers);
|
||||
for(size_t i=0; i < ARRAY_COUNT(el.Attachments); i++)
|
||||
@@ -173,7 +173,7 @@ struct TextureStateInitialData
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, TextureStateInitialData &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "TextureStateInitialData", 0, true);
|
||||
ScopedContext scope(this, name, "TextureStateInitialData", 0, true);
|
||||
Serialise("baseLevel", el.baseLevel);
|
||||
Serialise("maxLevel", el.maxLevel);
|
||||
Serialise("minLod", el.minLod);
|
||||
@@ -418,7 +418,7 @@ bool GLResourceManager::Prepare_InitialState(GLResource res)
|
||||
}
|
||||
else if(res.Namespace == eResProgram)
|
||||
{
|
||||
ScopedContext scope(m_pSerialiser, NULL, "Initial Contents", "Initial Contents", INITIAL_CONTENTS, false);
|
||||
ScopedContext scope(m_pSerialiser, "Initial Contents", "Initial Contents", INITIAL_CONTENTS, false);
|
||||
|
||||
m_pSerialiser->Serialise("Id", Id);
|
||||
|
||||
|
||||
@@ -278,4 +278,6 @@ private:
|
||||
Serialiser *m_pSerialiser;
|
||||
LogState m_State;
|
||||
const GLHookSet *m_Real;
|
||||
|
||||
Serialiser *GetSerialiser() { return m_pSerialiser; }
|
||||
};
|
||||
@@ -1995,13 +1995,13 @@ void SerialiseOptionalObject(Serialiser *ser, const char *name, T *&el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkGenericStruct &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "NextStructure", 0, true);
|
||||
ScopedContext scope(this, name, "NextStructure", 0, true);
|
||||
}
|
||||
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkDeviceQueueCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkDeviceQueueCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkDeviceQueueCreateInfo", 0, true);
|
||||
|
||||
Serialise("queueFamilyIndex", el.queueFamilyIndex);
|
||||
Serialise("queueCount", el.queueCount);
|
||||
@@ -2012,7 +2012,7 @@ void Serialiser::Serialise(const char *name, VkDeviceQueueCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkPhysicalDeviceFeatures &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkPhysicalDeviceFeatures", 0, true);
|
||||
ScopedContext scope(this, name, "VkPhysicalDeviceFeatures", 0, true);
|
||||
|
||||
Serialise("robustBufferAccess", el.robustBufferAccess);
|
||||
Serialise("fullDrawIndexUint32", el.fullDrawIndexUint32);
|
||||
@@ -2077,7 +2077,7 @@ void Serialiser::Serialise(const char *name, VkPhysicalDeviceFeatures &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkDeviceCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkDeviceCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkDeviceCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2139,7 +2139,7 @@ void Serialiser::Serialise(const char *name, VkDeviceCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkBufferCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkBufferCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkBufferCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2156,7 +2156,7 @@ void Serialiser::Serialise(const char *name, VkBufferCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkBufferViewCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkBufferViewCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkBufferViewCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2172,7 +2172,7 @@ void Serialiser::Serialise(const char *name, VkBufferViewCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkImageCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkImageCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkImageCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2195,7 +2195,7 @@ void Serialiser::Serialise(const char *name, VkImageCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkImageViewCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkImageViewCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkImageViewCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2211,7 +2211,7 @@ void Serialiser::Serialise(const char *name, VkImageViewCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkAttachmentBindInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkAttachmentBindInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkAttachmentBindInfo", 0, true);
|
||||
|
||||
SerialiseObject(VkAttachmentView, "view", el.view);
|
||||
Serialise("layout", el.layout);
|
||||
@@ -2220,7 +2220,7 @@ void Serialiser::Serialise(const char *name, VkAttachmentBindInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkFramebufferCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkFramebufferCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkFramebufferCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2236,7 +2236,7 @@ void Serialiser::Serialise(const char *name, VkFramebufferCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkAttachmentDescription &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkAttachmentDescription", 0, true);
|
||||
ScopedContext scope(this, name, "VkAttachmentDescription", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2255,7 +2255,7 @@ void Serialiser::Serialise(const char *name, VkAttachmentDescription &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkSubpassDescription &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkSubpassDescription", 0, true);
|
||||
ScopedContext scope(this, name, "VkSubpassDescription", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2288,7 +2288,7 @@ void Serialiser::Serialise(const char *name, VkSubpassDescription &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkSubpassDependency &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkSubpassDependency", 0, true);
|
||||
ScopedContext scope(this, name, "VkSubpassDependency", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2306,7 +2306,7 @@ void Serialiser::Serialise(const char *name, VkSubpassDependency &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkRenderPassCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkRenderPassCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkRenderPassCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2320,7 +2320,7 @@ void Serialiser::Serialise(const char *name, VkRenderPassCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkRenderPassBeginInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkRenderPassBeginInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkRenderPassBeginInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2338,7 +2338,7 @@ void Serialiser::Serialise(const char *name, VkRenderPassBeginInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkAttachmentViewCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkAttachmentViewCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkAttachmentViewCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_ATTACHMENT_VIEW_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2354,7 +2354,7 @@ void Serialiser::Serialise(const char *name, VkAttachmentViewCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkDynamicViewportStateCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkDynamicVpStateCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkDynamicVpStateCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_DYNAMIC_VIEWPORT_STATE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2373,7 +2373,7 @@ void Serialiser::Serialise(const char *name, VkDynamicViewportStateCreateInfo &e
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkDynamicRasterStateCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkDynamicRsStateCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkDynamicRsStateCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_DYNAMIC_RASTER_STATE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2388,7 +2388,7 @@ void Serialiser::Serialise(const char *name, VkDynamicRasterStateCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkDynamicColorBlendStateCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkDynamicCbStateCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkDynamicCbStateCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_DYNAMIC_COLOR_BLEND_STATE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2400,7 +2400,7 @@ void Serialiser::Serialise(const char *name, VkDynamicColorBlendStateCreateInfo
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkDynamicDepthStencilStateCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkDynamicDsStateCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkDynamicDsStateCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_DYNAMIC_DEPTH_STENCIL_STATE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2417,7 +2417,7 @@ void Serialiser::Serialise(const char *name, VkDynamicDepthStencilStateCreateInf
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkVertexInputBindingDescription &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkVertexInputBindingDescription", 0, true);
|
||||
ScopedContext scope(this, name, "VkVertexInputBindingDescription", 0, true);
|
||||
|
||||
Serialise("binding", el.binding);
|
||||
Serialise("strideInBytes", el.strideInBytes);
|
||||
@@ -2427,7 +2427,7 @@ void Serialiser::Serialise(const char *name, VkVertexInputBindingDescription &el
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkVertexInputAttributeDescription &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkVertexInputAttributeDescription", 0, true);
|
||||
ScopedContext scope(this, name, "VkVertexInputAttributeDescription", 0, true);
|
||||
|
||||
Serialise("location", el.location);
|
||||
Serialise("binding", el.binding);
|
||||
@@ -2438,7 +2438,7 @@ void Serialiser::Serialise(const char *name, VkVertexInputAttributeDescription &
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkPipelineVertexInputStateCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkPipelineVertexInputStateCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkPipelineVertexInputStateCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2451,7 +2451,7 @@ void Serialiser::Serialise(const char *name, VkPipelineVertexInputStateCreateInf
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkPipelineInputAssemblyStateCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkPipelineInputAssemblyStateCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkPipelineInputAssemblyStateCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2464,7 +2464,7 @@ void Serialiser::Serialise(const char *name, VkPipelineInputAssemblyStateCreateI
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkPipelineTessellationStateCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkPipelineTessStateCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkPipelineTessStateCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2476,7 +2476,7 @@ void Serialiser::Serialise(const char *name, VkPipelineTessellationStateCreateIn
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkPipelineViewportStateCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkPipelineViewportStateCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkPipelineViewportStateCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2488,7 +2488,7 @@ void Serialiser::Serialise(const char *name, VkPipelineViewportStateCreateInfo &
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkPipelineRasterStateCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkPipelineRasterStateCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkPipelineRasterStateCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_PIPELINE_RASTER_STATE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2504,7 +2504,7 @@ void Serialiser::Serialise(const char *name, VkPipelineRasterStateCreateInfo &el
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkPipelineMultisampleStateCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkPipelineMultisampleStateCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkPipelineMultisampleStateCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2519,7 +2519,7 @@ void Serialiser::Serialise(const char *name, VkPipelineMultisampleStateCreateInf
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkPipelineColorBlendAttachmentState &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkPipelineColorBlendAttachmentState", 0, true);
|
||||
ScopedContext scope(this, name, "VkPipelineColorBlendAttachmentState", 0, true);
|
||||
|
||||
Serialise("blendEnable", el.blendEnable);
|
||||
Serialise("srcBlendColor", el.srcBlendColor);
|
||||
@@ -2534,7 +2534,7 @@ void Serialiser::Serialise(const char *name, VkPipelineColorBlendAttachmentState
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkPipelineColorBlendStateCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkPipelineColorBlendStateCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkPipelineColorBlendStateCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2552,7 +2552,7 @@ void Serialiser::Serialise(const char *name, VkPipelineColorBlendStateCreateInfo
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkPipelineDepthStencilStateCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkPipelineDepthStencilStateCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkPipelineDepthStencilStateCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2570,7 +2570,7 @@ void Serialiser::Serialise(const char *name, VkPipelineDepthStencilStateCreateIn
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkCmdPoolCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkCmdPoolCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkCmdPoolCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_CMD_POOL_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2583,7 +2583,7 @@ void Serialiser::Serialise(const char *name, VkCmdPoolCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkCmdBufferCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkCmdBufferCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkCmdBufferCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2599,7 +2599,7 @@ void Serialiser::Serialise(const char *name, VkCmdBufferCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkCmdBufferBeginInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkCmdBufferBeginInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkCmdBufferBeginInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2613,7 +2613,7 @@ void Serialiser::Serialise(const char *name, VkCmdBufferBeginInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkStencilOpState &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkStencilOpState", 0, true);
|
||||
ScopedContext scope(this, name, "VkStencilOpState", 0, true);
|
||||
|
||||
Serialise("stencilFailOp", el.stencilFailOp);
|
||||
Serialise("stencilPassOp", el.stencilPassOp);
|
||||
@@ -2624,7 +2624,7 @@ void Serialiser::Serialise(const char *name, VkStencilOpState &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkQueryPoolCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkQueryPoolCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkQueryPoolCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2638,7 +2638,7 @@ void Serialiser::Serialise(const char *name, VkQueryPoolCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkSemaphoreCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkSemaphoreCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkSemaphoreCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2652,7 +2652,7 @@ void Serialiser::Serialise(const char *name, VkSemaphoreCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkFenceCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkFenceCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkFenceCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2664,7 +2664,7 @@ void Serialiser::Serialise(const char *name, VkFenceCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkSamplerCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkSamplerCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkSamplerCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2687,7 +2687,7 @@ void Serialiser::Serialise(const char *name, VkSamplerCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkPipelineShaderStageCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkPipelineShaderStageCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkPipelineShaderStageCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2702,7 +2702,7 @@ void Serialiser::Serialise(const char *name, VkPipelineShaderStageCreateInfo &el
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkSpecializationMapEntry &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkSpecializationMapEntry", 0, true);
|
||||
ScopedContext scope(this, name, "VkSpecializationMapEntry", 0, true);
|
||||
|
||||
Serialise("constantId", el.constantId);
|
||||
uint64_t size = el.size;
|
||||
@@ -2714,7 +2714,7 @@ void Serialiser::Serialise(const char *name, VkSpecializationMapEntry &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkSpecializationInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkSpecializationInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkSpecializationInfo", 0, true);
|
||||
|
||||
uint64_t dataSize = el.dataSize;
|
||||
Serialise("dataSize", el.dataSize);
|
||||
@@ -2728,7 +2728,7 @@ void Serialiser::Serialise(const char *name, VkSpecializationInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkPipelineCacheCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkPipelineCacheCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkPipelineCacheCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2750,7 +2750,7 @@ void Serialiser::Serialise(const char *name, VkPipelineCacheCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkPipelineLayoutCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkPipelineLayoutCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkPipelineLayoutCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2774,7 +2774,7 @@ void Serialiser::Serialise(const char *name, VkPipelineLayoutCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkShaderModuleCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkShaderModuleCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkShaderModuleCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2795,7 +2795,7 @@ void Serialiser::Serialise(const char *name, VkShaderModuleCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkShaderCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkShaderCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkShaderCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_SHADER_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2830,7 +2830,7 @@ void Serialiser::Serialise(const char *name, VkShaderCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkImageSubresourceRange &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkImageSubresourceRange", 0, true);
|
||||
ScopedContext scope(this, name, "VkImageSubresourceRange", 0, true);
|
||||
|
||||
Serialise("aspect", el.aspect);
|
||||
Serialise("baseMipLevel", el.baseMipLevel);
|
||||
@@ -2842,7 +2842,7 @@ void Serialiser::Serialise(const char *name, VkImageSubresourceRange &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkImageSubresource &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkImageSubresource", 0, true);
|
||||
ScopedContext scope(this, name, "VkImageSubresource", 0, true);
|
||||
|
||||
Serialise("aspect", el.aspect);
|
||||
Serialise("mipLevel", el.mipLevel);
|
||||
@@ -2852,7 +2852,7 @@ void Serialiser::Serialise(const char *name, VkImageSubresource &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkMemoryAllocInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkMemoryAllocInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkMemoryAllocInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2865,7 +2865,7 @@ void Serialiser::Serialise(const char *name, VkMemoryAllocInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkMemoryBarrier &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkMemoryBarrier", 0, true);
|
||||
ScopedContext scope(this, name, "VkMemoryBarrier", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_MEMORY_BARRIER);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2878,7 +2878,7 @@ void Serialiser::Serialise(const char *name, VkMemoryBarrier &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkBufferMemoryBarrier &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkBufferMemoryBarrier", 0, true);
|
||||
ScopedContext scope(this, name, "VkBufferMemoryBarrier", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2896,7 +2896,7 @@ void Serialiser::Serialise(const char *name, VkBufferMemoryBarrier &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkImageMemoryBarrier &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkImageMemoryBarrier", 0, true);
|
||||
ScopedContext scope(this, name, "VkImageMemoryBarrier", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2915,7 +2915,7 @@ void Serialiser::Serialise(const char *name, VkImageMemoryBarrier &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkGraphicsPipelineCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkGraphicsPipelineCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkGraphicsPipelineCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2943,7 +2943,7 @@ void Serialiser::Serialise(const char *name, VkGraphicsPipelineCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkComputePipelineCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkComputePipelineCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkComputePipelineCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2959,7 +2959,7 @@ void Serialiser::Serialise(const char *name, VkComputePipelineCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkDescriptorTypeCount &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkDescriptorTypeCount", 0, true);
|
||||
ScopedContext scope(this, name, "VkDescriptorTypeCount", 0, true);
|
||||
|
||||
Serialise("type", el.type);
|
||||
Serialise("count", el.count);
|
||||
@@ -2968,7 +2968,7 @@ void Serialiser::Serialise(const char *name, VkDescriptorTypeCount &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkDescriptorPoolCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkDescriptorPoolCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkDescriptorPoolCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -2980,7 +2980,7 @@ void Serialiser::Serialise(const char *name, VkDescriptorPoolCreateInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkDescriptorInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkDescriptorInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkDescriptorInfo", 0, true);
|
||||
|
||||
SerialiseObject(VkBufferView, "bufferView", el.bufferView);
|
||||
SerialiseObject(VkSampler, "sampler", el.sampler);
|
||||
@@ -2992,7 +2992,7 @@ void Serialiser::Serialise(const char *name, VkDescriptorInfo &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkWriteDescriptorSet &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkWriteDescriptorSet", 0, true);
|
||||
ScopedContext scope(this, name, "VkWriteDescriptorSet", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -3009,7 +3009,7 @@ void Serialiser::Serialise(const char *name, VkWriteDescriptorSet &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkCopyDescriptorSet &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkCopyDescriptorSet", 0, true);
|
||||
ScopedContext scope(this, name, "VkCopyDescriptorSet", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -3028,7 +3028,7 @@ void Serialiser::Serialise(const char *name, VkCopyDescriptorSet &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkPushConstantRange &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkPushConstantRange", 0, true);
|
||||
ScopedContext scope(this, name, "VkPushConstantRange", 0, true);
|
||||
|
||||
Serialise("stageFlags", (VkShaderStageFlagBits &)el.stageFlags);
|
||||
Serialise("start", el.start);
|
||||
@@ -3038,7 +3038,7 @@ void Serialiser::Serialise(const char *name, VkPushConstantRange &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkDescriptorSetLayoutBinding &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkDescriptorSetLayoutBinding", 0, true);
|
||||
ScopedContext scope(this, name, "VkDescriptorSetLayoutBinding", 0, true);
|
||||
|
||||
Serialise("descriptorType", el.descriptorType);
|
||||
Serialise("arraySize", el.arraySize);
|
||||
@@ -3068,7 +3068,7 @@ void Serialiser::Serialise(const char *name, VkDescriptorSetLayoutBinding &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkDescriptorSetLayoutCreateInfo &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkDescriptorSetLayoutCreateInfo", 0, true);
|
||||
ScopedContext scope(this, name, "VkDescriptorSetLayoutCreateInfo", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO);
|
||||
Serialise("sType", el.sType);
|
||||
@@ -3080,7 +3080,7 @@ void Serialiser::Serialise(const char *name, VkDescriptorSetLayoutCreateInfo &el
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkChannelMapping &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkChannelMapping", 0, true);
|
||||
ScopedContext scope(this, name, "VkChannelMapping", 0, true);
|
||||
|
||||
Serialise("r", el.r);
|
||||
Serialise("g", el.g);
|
||||
@@ -3091,7 +3091,7 @@ void Serialiser::Serialise(const char *name, VkChannelMapping &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkBufferImageCopy &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkBufferImageCopy", 0, true);
|
||||
ScopedContext scope(this, name, "VkBufferImageCopy", 0, true);
|
||||
|
||||
Serialise("memOffset", el.bufferOffset);
|
||||
Serialise("bufferRowLength", el.bufferRowLength);
|
||||
@@ -3104,7 +3104,7 @@ void Serialiser::Serialise(const char *name, VkBufferImageCopy &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkBufferCopy &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkBufferCopy", 0, true);
|
||||
ScopedContext scope(this, name, "VkBufferCopy", 0, true);
|
||||
|
||||
Serialise("srcOffset", el.srcOffset);
|
||||
Serialise("destOffset", el.destOffset);
|
||||
@@ -3114,7 +3114,7 @@ void Serialiser::Serialise(const char *name, VkBufferCopy &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkImageCopy &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkImageCopy", 0, true);
|
||||
ScopedContext scope(this, name, "VkImageCopy", 0, true);
|
||||
|
||||
Serialise("srcSubresource", el.srcSubresource);
|
||||
Serialise("srcOffset", el.srcOffset);
|
||||
@@ -3126,7 +3126,7 @@ void Serialiser::Serialise(const char *name, VkImageCopy &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkImageBlit &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkImageBlit", 0, true);
|
||||
ScopedContext scope(this, name, "VkImageBlit", 0, true);
|
||||
|
||||
Serialise("srcSubresource", el.srcSubresource);
|
||||
Serialise("srcOffset", el.srcOffset);
|
||||
@@ -3139,7 +3139,7 @@ void Serialiser::Serialise(const char *name, VkImageBlit &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkImageResolve &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkImageResolve", 0, true);
|
||||
ScopedContext scope(this, name, "VkImageResolve", 0, true);
|
||||
|
||||
Serialise("srcSubresource", el.srcSubresource);
|
||||
Serialise("srcOffset", el.srcOffset);
|
||||
@@ -3151,7 +3151,7 @@ void Serialiser::Serialise(const char *name, VkImageResolve &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkRect2D &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkRect2D", 0, true);
|
||||
ScopedContext scope(this, name, "VkRect2D", 0, true);
|
||||
|
||||
Serialise("offset", el.offset);
|
||||
Serialise("extent", el.extent);
|
||||
@@ -3160,7 +3160,7 @@ void Serialiser::Serialise(const char *name, VkRect2D &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkRect3D &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkRect3D", 0, true);
|
||||
ScopedContext scope(this, name, "VkRect3D", 0, true);
|
||||
|
||||
Serialise("offset", el.offset);
|
||||
Serialise("extent", el.extent);
|
||||
@@ -3169,7 +3169,7 @@ void Serialiser::Serialise(const char *name, VkRect3D &el)
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, VkSwapChainCreateInfoWSI &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "VkSwapChainCreateInfoWSI", 0, true);
|
||||
ScopedContext scope(this, name, "VkSwapChainCreateInfoWSI", 0, true);
|
||||
|
||||
RDCASSERT(m_Mode < WRITING || el.sType == VK_STRUCTURE_TYPE_SWAP_CHAIN_CREATE_INFO_WSI);
|
||||
Serialise("sType", el.sType);
|
||||
|
||||
@@ -30,7 +30,7 @@ VulkanResourceManager *VulkanResourceManager::m_Inst = NULL;
|
||||
template<>
|
||||
void Serialiser::Serialise(const char *name, ImageRegionState &el)
|
||||
{
|
||||
ScopedContext scope(this, this, name, "ImageRegionState", 0, true);
|
||||
ScopedContext scope(this, name, "ImageRegionState", 0, true);
|
||||
|
||||
Serialise("range", el.range);
|
||||
Serialise("prevstate", el.prevstate);
|
||||
|
||||
@@ -1434,17 +1434,6 @@ void Serialiser::DebugPrint(const char *fmt, ...)
|
||||
|
||||
m_DebugText += GetIndent();
|
||||
m_DebugText += tmpBuf;
|
||||
|
||||
#ifdef DEBUG_TEXT_SERIALISER
|
||||
FILE *f = FileIO::fopen(m_Filename.c_str(), "ab");
|
||||
|
||||
if(f)
|
||||
{
|
||||
FileIO::fwrite(tmpBuf, 1, strlen(tmpBuf), f);
|
||||
|
||||
FileIO::fclose(f);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
uint32_t Serialiser::PushContext(const char *name, uint32_t chunkIdx, bool smallChunk)
|
||||
|
||||
@@ -152,7 +152,6 @@ class Serialiser
|
||||
NONE = 0,
|
||||
READING,
|
||||
WRITING,
|
||||
DEBUGWRITING,
|
||||
};
|
||||
|
||||
enum SerialiserError
|
||||
@@ -720,39 +719,17 @@ template<> void Serialiser::ReadInto(float &f);
|
||||
class ScopedContext
|
||||
{
|
||||
public:
|
||||
ScopedContext(Serialiser *s, Serialiser *debugser, const char *n, const char *t, uint32_t i, bool smallChunk)
|
||||
ScopedContext(Serialiser *s, const char *n, const char *t, uint32_t i, bool smallChunk)
|
||||
: m_Idx(i), m_Ser(s), m_Ended(false)
|
||||
#ifdef DEBUG_TEXT_SERIALISER
|
||||
, m_DebugSer(debugser)
|
||||
#endif
|
||||
{
|
||||
m_Name = string(n) + " = " + t;
|
||||
m_Ser->PushContext(m_Name.c_str(), m_Idx, smallChunk);
|
||||
|
||||
#ifdef DEBUG_TEXT_SERIALISER
|
||||
if(m_DebugSer)
|
||||
{
|
||||
m_DebugSer->DebugLock();
|
||||
m_DebugSer->PushContext(m_Name.c_str(), m_Idx, smallChunk);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
ScopedContext(Serialiser *s, Serialiser *debugser, const char *n, uint32_t i, bool smallChunk)
|
||||
ScopedContext(Serialiser *s, const char *n, uint32_t i, bool smallChunk)
|
||||
: m_Idx(i), m_Ser(s), m_Ended(false)
|
||||
#ifdef DEBUG_TEXT_SERIALISER
|
||||
, m_DebugSer(debugser)
|
||||
#endif
|
||||
{
|
||||
m_Name = n;
|
||||
m_Ser->PushContext(m_Name.c_str(), m_Idx, smallChunk);
|
||||
|
||||
#ifdef DEBUG_TEXT_SERIALISER
|
||||
if(m_DebugSer)
|
||||
{
|
||||
m_DebugSer->DebugLock();
|
||||
m_DebugSer->PushContext(m_Name.c_str(), m_Idx, smallChunk);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
~ScopedContext()
|
||||
{
|
||||
@@ -769,9 +746,6 @@ class ScopedContext
|
||||
std::string m_Name;
|
||||
uint32_t m_Idx;
|
||||
Serialiser *m_Ser;
|
||||
#ifdef DEBUG_TEXT_SERIALISER
|
||||
Serialiser *m_DebugSer;
|
||||
#endif
|
||||
|
||||
bool m_Ended;
|
||||
|
||||
@@ -781,33 +755,12 @@ class ScopedContext
|
||||
|
||||
m_Ser->PopContext(m_Name.c_str(), m_Idx);
|
||||
|
||||
#ifdef DEBUG_TEXT_SERIALISER
|
||||
if(m_DebugSer)
|
||||
{
|
||||
m_DebugSer->PopContext(m_Name.c_str(), m_Idx);
|
||||
m_DebugSer->DebugUnlock();
|
||||
}
|
||||
#endif
|
||||
|
||||
m_Ended = true;
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef DEBUG_TEXT_SERIALISER
|
||||
#define SCOPED_SERIALISE_CONTEXT(n) ScopedContext scope(m_pSerialiser, m_pDebugSerialiser, GetChunkName(n), n, false);
|
||||
#define SCOPED_SERIALISE_SMALL_CONTEXT(n) ScopedContext scope(m_pSerialiser, m_pDebugSerialiser, GetChunkName(n), n, true);
|
||||
|
||||
#define SERIALISE_ELEMENT(type, name, inValue) type name; if(m_State >= WRITING) name = (inValue); m_pSerialiser->Serialise(#name, name); m_pDebugSerialiser->Serialise(#name, name);
|
||||
#define SERIALISE_ELEMENT_OPT(type, name, inValue, Condition) type name = type(); if(Condition) { if(m_State >= WRITING) name = (inValue); m_pSerialiser->Serialise(#name, name); m_pDebugSerialiser->Serialise(#name, name); }
|
||||
#define SERIALISE_ELEMENT_ARR(type, name, inValues, count) type *name = new type[count]; for(size_t serialiseIdx=0; serialiseIdx < count; serialiseIdx++) { if(m_State >= WRITING) name[serialiseIdx] = (inValues)[serialiseIdx]; m_pSerialiser->Serialise(#name, name[serialiseIdx]); m_pDebugSerialiser->Serialise(#name, name[serialiseIdx]); }
|
||||
#define SERIALISE_ELEMENT_ARR_OPT(type, name, inValues, count, Condition) type *name = NULL; if(Condition) { name = new type[count]; for(size_t serialiseIdx=0; serialiseIdx < count; serialiseIdx++) { if(m_State >= WRITING) name[serialiseIdx] = (inValues)[serialiseIdx]; m_pSerialiser->Serialise(#name, name[serialiseIdx]); m_pDebugSerialiser->Serialise(#name, name[serialiseIdx]); } }
|
||||
#define SERIALISE_ELEMENT_PTR(type, name, inValue) type name; if(inValue && m_State >= WRITING) name = *(inValue); m_pSerialiser->Serialise(#name, name); m_pDebugSerialiser->Serialise(#name, name);
|
||||
#define SERIALISE_ELEMENT_PTR_OPT(type, name, inValue, Condition) type name; if(Condition) { if(inValue && m_State >= WRITING) name = *(inValue); m_pSerialiser->Serialise(#name, name); m_pDebugSerialiser->Serialise(#name, name); }
|
||||
#define SERIALISE_ELEMENT_BUF(type, name, inBuf, Len) type name = (type)NULL; if(m_State >= WRITING) name = (type)(inBuf); size_t CONCAT(buflen, __LINE__) = Len; m_pSerialiser->SerialiseBuffer(#name, name, CONCAT(buflen, __LINE__)); m_pDebugSerialiser->SerialiseBuffer(#name, name, CONCAT(buflen, __LINE__));
|
||||
#define SERIALISE_ELEMENT_BUF_OPT(type, name, inBuf, Len, Condition) type name = (type)NULL; if(Condition) { if(m_State >= WRITING) name = (type)(inBuf); size_t CONCAT(buflen, __LINE__) = Len; m_pSerialiser->SerialiseBuffer(#name, name, CONCAT(buflen, __LINE__)); m_pDebugSerialiser->SerialiseBuffer(#name, name, CONCAT(buflen, __LINE__)); }
|
||||
#else
|
||||
#define SCOPED_SERIALISE_CONTEXT(n) ScopedContext scope(m_pSerialiser, NULL, GetChunkName(n), n, false);
|
||||
#define SCOPED_SERIALISE_SMALL_CONTEXT(n) ScopedContext scope(m_pSerialiser, NULL, GetChunkName(n), n, true);
|
||||
#define SCOPED_SERIALISE_CONTEXT(n) ScopedContext scope(m_pSerialiser, GetChunkName(n), n, false);
|
||||
#define SCOPED_SERIALISE_SMALL_CONTEXT(n) ScopedContext scope(m_pSerialiser, GetChunkName(n), n, true);
|
||||
|
||||
#define SERIALISE_ELEMENT(type, name, inValue) type name; if(m_State >= WRITING) name = (inValue); m_pSerialiser->Serialise(#name, name);
|
||||
#define SERIALISE_ELEMENT_OPT(type, name, inValue, Condition) type name = type(); if(Condition) { if(m_State >= WRITING) name = (inValue); m_pSerialiser->Serialise(#name, name); }
|
||||
@@ -817,7 +770,6 @@ class ScopedContext
|
||||
#define SERIALISE_ELEMENT_PTR_OPT(type, name, inValue, Condition) type name; if(Condition) { if(inValue && m_State >= WRITING) name = *(inValue); m_pSerialiser->Serialise(#name, name); }
|
||||
#define SERIALISE_ELEMENT_BUF(type, name, inBuf, Len) type name = (type)NULL; if(m_State >= WRITING) name = (type)(inBuf); size_t CONCAT(buflen, __LINE__) = Len; m_pSerialiser->SerialiseBuffer(#name, name, CONCAT(buflen, __LINE__));
|
||||
#define SERIALISE_ELEMENT_BUF_OPT(type, name, inBuf, Len, Condition) type name = (type)NULL; if(Condition) { if(m_State >= WRITING) name = (type)(inBuf); size_t CONCAT(buflen, __LINE__) = Len; m_pSerialiser->SerialiseBuffer(#name, name, CONCAT(buflen, __LINE__)); }
|
||||
#endif
|
||||
|
||||
// forward declare generic pointer version to void*
|
||||
template<class T>
|
||||
|
||||
Reference in new issue
Block a user