Change D3D11 Chunks to enum class, improve names & use ToStr

This commit is contained in:
baldurk
2017-09-27 18:30:34 +01:00
parent f419723160
commit d41eeb432d
5 changed files with 305 additions and 364 deletions
+134 -170
View File
@@ -246,179 +246,143 @@ public:
ret func; \
bool CONCAT(Serialise_, func);
#pragma region Chunks
enum D3D11ChunkType
enum class D3D11Chunk : uint32_t
{
DEVICE_INIT = FIRST_CHUNK_ID,
SET_RESOURCE_NAME,
RELEASE_RESOURCE,
CREATE_SWAP_BUFFER,
CREATE_TEXTURE_1D,
CREATE_TEXTURE_2D,
CREATE_TEXTURE_3D,
CREATE_BUFFER,
CREATE_VERTEX_SHADER,
CREATE_HULL_SHADER,
CREATE_DOMAIN_SHADER,
CREATE_GEOMETRY_SHADER,
CREATE_GEOMETRY_SHADER_WITH_SO,
CREATE_PIXEL_SHADER,
CREATE_COMPUTE_SHADER,
GET_CLASS_INSTANCE,
CREATE_CLASS_INSTANCE,
CREATE_CLASS_LINKAGE,
CREATE_SRV,
CREATE_RTV,
CREATE_DSV,
CREATE_UAV,
CREATE_INPUT_LAYOUT,
CREATE_BLEND_STATE,
CREATE_DEPTHSTENCIL_STATE,
CREATE_RASTER_STATE,
CREATE_SAMPLER_STATE,
CREATE_QUERY,
CREATE_PREDICATE,
CREATE_COUNTER,
CREATE_DEFERRED_CONTEXT,
SET_EXCEPTION_MODE,
OPEN_SHARED_RESOURCE,
CAPTURE_SCOPE,
SET_INPUT_LAYOUT,
SET_VBUFFER,
SET_IBUFFER,
SET_TOPOLOGY,
SET_VS_CBUFFERS,
SET_VS_RESOURCES,
SET_VS_SAMPLERS,
SET_VS,
SET_HS_CBUFFERS,
SET_HS_RESOURCES,
SET_HS_SAMPLERS,
SET_HS,
SET_DS_CBUFFERS,
SET_DS_RESOURCES,
SET_DS_SAMPLERS,
SET_DS,
SET_GS_CBUFFERS,
SET_GS_RESOURCES,
SET_GS_SAMPLERS,
SET_GS,
SET_SO_TARGETS,
SET_PS_CBUFFERS,
SET_PS_RESOURCES,
SET_PS_SAMPLERS,
SET_PS,
SET_CS_CBUFFERS,
SET_CS_RESOURCES,
SET_CS_UAVS,
SET_CS_SAMPLERS,
SET_CS,
SET_VIEWPORTS,
SET_SCISSORS,
SET_RASTER,
SET_RTARGET,
SET_RTARGET_AND_UAVS,
SET_BLEND,
SET_DEPTHSTENCIL,
DRAW_INDEXED_INST,
DRAW_INST,
DRAW_INDEXED,
DRAW,
DRAW_AUTO,
DRAW_INDEXED_INST_INDIRECT,
DRAW_INST_INDIRECT,
MAP,
UNMAP,
COPY_SUBRESOURCE_REGION,
COPY_RESOURCE,
UPDATE_SUBRESOURCE,
COPY_STRUCTURE_COUNT,
RESOLVE_SUBRESOURCE,
GENERATE_MIPS,
CLEAR_DSV,
CLEAR_RTV,
CLEAR_UAV_INT,
CLEAR_UAV_FLOAT,
CLEAR_STATE,
EXECUTE_CMD_LIST,
DISPATCH,
DISPATCH_INDIRECT,
FINISH_CMD_LIST,
FLUSH,
SET_PREDICATION,
SET_RESOURCE_MINLOD,
BEGIN,
END,
CREATE_RASTER_STATE1,
CREATE_BLEND_STATE1,
COPY_SUBRESOURCE_REGION1,
UPDATE_SUBRESOURCE1,
CLEAR_VIEW,
SET_VS_CBUFFERS1,
SET_HS_CBUFFERS1,
SET_DS_CBUFFERS1,
SET_GS_CBUFFERS1,
SET_PS_CBUFFERS1,
SET_CS_CBUFFERS1,
PUSH_EVENT,
SET_MARKER,
POP_EVENT,
DEBUG_MESSAGES,
CONTEXT_CAPTURE_HEADER, // chunk at beginning of context's chunk stream
CONTEXT_CAPTURE_FOOTER, // chunk at end of context's chunk stream
SET_SHADER_DEBUG_PATH,
DISCARD_RESOURCE,
DISCARD_VIEW,
DISCARD_VIEW1,
CREATE_RASTER_STATE2,
CREATE_QUERY1,
CREATE_TEXTURE_2D1,
CREATE_TEXTURE_3D1,
CREATE_SRV1,
CREATE_RTV1,
CREATE_UAV1,
SWAP_PRESENT,
RESTORE_STATE_AFTER_EXEC,
RESTORE_STATE_AFTER_FINISH,
SWAP_DEVICE_STATE,
NUM_D3D11_CHUNKS,
DeviceInitialisation = (uint32_t)SystemChunk::FirstDriverChunk,
CaptureBegin,
CaptureEnd,
CaptureScope,
SetResourceName,
ReleaseResource,
CreateSwapBuffer,
CreateTexture1D,
CreateTexture2D,
CreateTexture3D,
CreateBuffer,
CreateVertexShader,
CreateHullShader,
CreateDomainShader,
CreateGeometryShader,
CreateGeometryShaderWithStreamOutput,
CreatePixelShader,
CreateComputeShader,
GetClassInstance,
CreateClassInstance,
CreateClassLinkage,
CreateShaderResourceView,
CreateRenderTargetView,
CreateDepthStencilView,
CreateUnorderedAccessView,
CreateInputLayout,
CreateBlendState,
CreateDepthStencilState,
CreateRasterizerState,
CreateSamplerState,
CreateQuery,
CreatePredicate,
CreateCounter,
CreateDeferredContext,
SetExceptionMode,
OpenSharedResource,
IASetInputLayout,
IASetVertexBuffers,
IASetIndexBuffer,
IASetPrimitiveTopology,
VSSetConstantBuffers,
VSSetShaderResources,
VSSetSamplers,
VSSetShader,
HSSetConstantBuffers,
HSSetShaderResources,
HSSetSamplers,
HSSetShader,
DSSetConstantBuffers,
DSSetShaderResources,
DSSetSamplers,
DSSetShader,
GSSetConstantBuffers,
GSSetShaderResources,
GSSetSamplers,
GSSetShader,
SOSetTargets,
PSSetConstantBuffers,
PSSetShaderResources,
PSSetSamplers,
PSSetShader,
CSSetConstantBuffers,
CSSetShaderResources,
CSSetUnorderedAccessViews,
CSSetSamplers,
CSSetShader,
RSSetViewports,
RSSetScissorRects,
RSSetState,
OMSetRenderTargets,
OMSetRenderTargetsAndUnorderedAccessViews,
OMSetBlendState,
OMSetDepthStencilState,
DrawIndexedInstanced,
DrawInstanced,
DrawIndexed,
Draw,
DrawAuto,
DrawIndexedInstancedIndirect,
DrawInstancedIndirect,
Map,
Unmap,
CopySubresourceRegion,
CopyResource,
UpdateSubresource,
CopyStructureCount,
ResolveSubresource,
GenerateMips,
ClearDepthStencilView,
ClearRenderTargetView,
ClearUnorderedAccessViewUint,
ClearUnorderedAccessViewFloat,
ClearState,
ExecuteCommandList,
Dispatch,
DispatchIndirect,
FinishCommandList,
Flush,
SetPredication,
SetResourceMinLOD,
Begin,
End,
CreateRasterizerState1,
CreateBlendState1,
CopySubresourceRegion1,
UpdateSubresource1,
ClearView,
VSSetConstantBuffers1,
HSSetConstantBuffers1,
DSSetConstantBuffers1,
GSSetConstantBuffers1,
PSSetConstantBuffers1,
CSSetConstantBuffers1,
PushMarker,
SetMarker,
PopMarker,
SetShaderDebugPath,
DiscardResource,
DiscardView,
DiscardView1,
CreateRasterizerState2,
CreateQuery1,
CreateTexture2D1,
CreateTexture3D1,
CreateShaderResourceView1,
CreateRenderTargetView1,
CreateUnorderedAccessView1,
SwapchainPresent,
PostExecuteCommandListRestore,
PostFinishCommandListSet,
SwapDeviceContextState,
Max,
};
#pragma endregion Chunks
DECLARE_REFLECTION_ENUM(D3D11Chunk);
DECLARE_REFLECTION_ENUM(D3D11_BIND_FLAG);
DECLARE_REFLECTION_ENUM(D3D11_CPU_ACCESS_FLAG);
+2 -2
View File
@@ -201,7 +201,7 @@ private:
void FlattenLog();
const char *GetChunkName(D3D11ChunkType idx);
const char *GetChunkName(D3D11Chunk idx);
void Serialise_DebugMessages();
@@ -282,7 +282,7 @@ public:
ID3D11DeviceContext1 *GetReal1() { return m_pRealContext1; }
bool IsFL11_1();
void ProcessChunk(uint64_t offset, D3D11ChunkType chunk, bool forceExecute);
void ProcessChunk(uint64_t offset, D3D11Chunk chunk, bool forceExecute);
void ReplayFakeContext(ResourceId id);
void ReplayLog(LogState readType, uint32_t startEventID, uint32_t endEventID, bool partial);
+3 -189
View File
@@ -33,173 +33,6 @@
#include "maths/formatpacking.h"
#include "strings/string_utils.h"
const char *D3D11ChunkNames[] = {
"ID3D11Device::Initialisation",
"ID3D11Resource::SetDebugName",
"ID3D11Resource::Release",
"IDXGISwapChain::GetBuffer",
"ID3D11Device::CreateTexture1D",
"ID3D11Device::CreateTexture2D",
"ID3D11Device::CreateTexture3D",
"ID3D11Device::CreateBuffer",
"ID3D11Device::CreateVertexShader",
"ID3D11Device::CreateHullShader",
"ID3D11Device::CreateDomainShader",
"ID3D11Device::CreateGeometryShader",
"ID3D11Device::CreateGeometryShaderWithStreamOut",
"ID3D11Device::CreatePixelShader",
"ID3D11Device::CreateComputeShader",
"ID3D11ClassLinkage::GetClassInstance",
"ID3D11ClassLinkage::CreateClassInstance",
"ID3D11Device::CreateClassLinkage",
"ID3D11Device::CreateShaderResourceView",
"ID3D11Device::CreateRenderTargetView",
"ID3D11Device::CreateDepthStencilView",
"ID3D11Device::CreateUnorderedAccessView",
"ID3D11Device::CreateInputLayout",
"ID3D11Device::CreateBlendState",
"ID3D11Device::CreateDepthStencilState",
"ID3D11Device::CreateRasterizerState",
"ID3D11Device::CreateSamplerState",
"ID3D11Device::CreateQuery",
"ID3D11Device::CreatePredicate",
"ID3D11Device::CreateCounter",
"ID3D11Device::CreateDeferredContext",
"ID3D11Device::SetExceptionMode",
"ID3D11Device::OpenSharedResource",
"Capture",
"ID3D11DeviceContext::IASetInputLayout",
"ID3D11DeviceContext::IASetVertexBuffers",
"ID3D11DeviceContext::IASetIndexBuffer",
"ID3D11DeviceContext::IASetPrimitiveTopology",
"ID3D11DeviceContext::VSSetConstantBuffers",
"ID3D11DeviceContext::VSSetShaderResources",
"ID3D11DeviceContext::VSSetSamplers",
"ID3D11DeviceContext::VSSetShader",
"ID3D11DeviceContext::HSSetConstantBuffers",
"ID3D11DeviceContext::HSSetShaderResources",
"ID3D11DeviceContext::HSSetSamplers",
"ID3D11DeviceContext::HSSetShader",
"ID3D11DeviceContext::DSSetConstantBuffers",
"ID3D11DeviceContext::DSSetShaderResources",
"ID3D11DeviceContext::DSSetSamplers",
"ID3D11DeviceContext::DSSetShader",
"ID3D11DeviceContext::GSSetConstantBuffers",
"ID3D11DeviceContext::GSSetShaderResources",
"ID3D11DeviceContext::GSSetSamplers",
"ID3D11DeviceContext::GSSetShader",
"ID3D11DeviceContext::SOSetTargets",
"ID3D11DeviceContext::PSSetConstantBuffers",
"ID3D11DeviceContext::PSSetShaderResources",
"ID3D11DeviceContext::PSSetSamplers",
"ID3D11DeviceContext::PSSetShader",
"ID3D11DeviceContext::CSSetConstantBuffers",
"ID3D11DeviceContext::CSSetShaderResources",
"ID3D11DeviceContext::CSSetUnorderedAccessViews",
"ID3D11DeviceContext::CSSetSamplers",
"ID3D11DeviceContext::CSSetShader",
"ID3D11DeviceContext::RSSetViewports",
"ID3D11DeviceContext::RSSetScissors",
"ID3D11DeviceContext::RSSetState",
"ID3D11DeviceContext::OMSetRenderTargets",
"ID3D11DeviceContext::OMSetRenderTargetsAndUnorderedAccessViews",
"ID3D11DeviceContext::OMSetBlendState",
"ID3D11DeviceContext::OMSetDepthStencilState",
"ID3D11DeviceContext::DrawIndexedInstanced",
"ID3D11DeviceContext::DrawInstanced",
"ID3D11DeviceContext::DrawIndexed",
"ID3D11DeviceContext::Draw",
"ID3D11DeviceContext::DrawAuto",
"ID3D11DeviceContext::DrawIndexedInstancedIndirect",
"ID3D11DeviceContext::DrawInstancedIndirect",
"ID3D11DeviceContext::Map",
"ID3D11DeviceContext::Unmap",
"ID3D11DeviceContext::CopySubresourceRegion",
"ID3D11DeviceContext::CopyResource",
"ID3D11DeviceContext::UpdateSubresource",
"ID3D11DeviceContext::CopyStructureCount",
"ID3D11DeviceContext::ResolveSubresource",
"ID3D11DeviceContext::GenerateMips",
"ID3D11DeviceContext::ClearDepthStencilView",
"ID3D11DeviceContext::ClearRenderTargetView",
"ID3D11DeviceContext::ClearUnorderedAccessViewInt",
"ID3D11DeviceContext::ClearUnorderedAccessViewFloat",
"ID3D11DeviceContext::ClearState",
"ID3D11DeviceContext::ExecuteCommandList",
"ID3D11DeviceContext::Dispatch",
"ID3D11DeviceContext::DispatchIndirect",
"ID3D11DeviceContext::FinishCommandlist",
"ID3D11DeviceContext::Flush",
"ID3D11DeviceContext::SetPredication",
"ID3D11DeviceContext::SetResourceMinLOD",
"ID3D11DeviceContext::Begin",
"ID3D11DeviceContext::End",
"ID3D11Device2::CreateRasterizerState1",
"ID3D11Device2::CreateBlendState1",
"ID3D11DeviceContext1::CopySubresourceRegion1",
"ID3D11DeviceContext1::UpdateSubresource1",
"ID3D11DeviceContext1::ClearView",
"ID3D11DeviceContext1::VSSetConstantBuffers1",
"ID3D11DeviceContext1::HSSetConstantBuffers1",
"ID3D11DeviceContext1::DSSetConstantBuffers1",
"ID3D11DeviceContext1::GSSetConstantBuffers1",
"ID3D11DeviceContext1::PSSetConstantBuffers1",
"ID3D11DeviceContext1::CSSetConstantBuffers1",
"D3DPERF_PushMarker",
"D3DPERF_SetMarker",
"D3DPERF_PopMarker",
"DebugMessageList",
"ContextBegin",
"ContextEnd",
"SetShaderDebugPath",
"ID3D11DeviceContext1::DiscardResource",
"ID3D11DeviceContext1::DiscardView",
"ID3D11DeviceContext1::DiscardView1",
"ID3D11Device3::CreateRasterizerState2",
"ID3D11Device3::CreateQuery1",
"ID3D11Device3::CreateTexture2D1",
"ID3D11Device3::CreateTexture3D1",
"ID3D11Device3::CreateShaderResourceView1",
"ID3D11Device3::CreateRenderTargetView1",
"ID3D11Device3::CreateUnorderedAccessView1",
"IDXGISwapChain::Present",
"ID3D11DeviceContext::ExecuteCommandList",
"ID3D11DeviceContext::FinishCommandList",
"ID3D11DeviceContext1::SwapDeviceContextState",
};
WRAPPED_POOL_INST(WrappedID3D11Device);
WrappedID3D11Device *WrappedID3D11Device::m_pCurrentWrappedDevice = NULL;
@@ -467,12 +300,6 @@ WrappedID3D11Device::WrappedID3D11Device(ID3D11Device *realDevice, D3D11InitPara
if(GetModuleHandleA("nvwgf2umx.dll"))
LoadLibraryA("nvwgf2umx.dll");
//////////////////////////////////////////////////////////////////////////
// Compile time asserts
RDCCOMPILE_ASSERT(ARRAY_COUNT(D3D11ChunkNames) == NUM_D3D11_CHUNKS - FIRST_CHUNK_ID,
"Not right number of chunk names");
}
WrappedID3D11Device::~WrappedID3D11Device()
@@ -871,23 +698,10 @@ HRESULT WrappedID3D11Device::QueryInterface(REFIID riid, void **ppvObject)
const char *WrappedID3D11Device::GetChunkName(uint32_t idx)
{
if(idx == CREATE_PARAMS)
return "Create Params";
if(idx == THUMBNAIL_DATA)
return "Thumbnail Data";
if(idx == DRIVER_INIT_PARAMS)
return "Driver Init Params";
if(idx == INITIAL_CONTENTS)
return "Initial Contents";
if(idx < FIRST_CHUNK_ID || idx >= NUM_D3D11_CHUNKS)
return "<unknown>";
return D3D11ChunkNames[idx - FIRST_CHUNK_ID];
}
if((SystemChunk)idx < SystemChunk::FirstDriverChunk)
return ::GetChunkName((SystemChunk)idx);
template <>
std::string DoStringise(const D3D11ChunkType &el)
{
return WrappedID3D11Device::GetChunkName(el);
return ::GetChunkName((D3D11Chunk)idx);
}
void WrappedID3D11Device::LazyInit()
+2 -2
View File
@@ -418,7 +418,7 @@ public:
// non wrapping interface
ID3D11Device *GetReal() { return m_pDevice; }
static const char *GetChunkName(uint32_t idx);
static std::string GetChunkName(uint32_t idx);
D3D11DebugManager *GetDebugManager() { return m_DebugManager; }
D3D11ResourceManager *GetResourceManager() { return m_ResourceManager; }
D3D11Replay *GetReplay() { return &m_Replay; }
@@ -497,7 +497,7 @@ public:
void Apply_InitialState(ID3D11DeviceChild *live, D3D11ResourceManager::InitialContentData initial);
void ReadLogInitialisation();
void ProcessChunk(uint64_t offset, D3D11ChunkType context);
void ProcessChunk(uint64_t offset, D3D11Chunk context);
void ReplayLog(uint32_t startEventID, uint32_t endEventID, ReplayLogType replayType);
////////////////////////////////////////////////////////////////
+164 -1
View File
@@ -56,6 +56,169 @@ std::string DoStringise(const ResourceType &el)
END_ENUM_STRINGISE();
}
template <>
std::string DoStringise(const D3D11Chunk &el)
{
RDCCOMPILE_ASSERT((uint32_t)D3D11Chunk::Max == 1131, "Chunks changed without updating names");
BEGIN_ENUM_STRINGISE(D3D11Chunk)
{
STRINGISE_ENUM_CLASS_NAMED(DeviceInitialisation, "Device Initialisation");
STRINGISE_ENUM_CLASS_NAMED(SetResourceName, "ID3D11Resource::SetDebugName");
STRINGISE_ENUM_CLASS_NAMED(ReleaseResource, "IUnknown::Release");
STRINGISE_ENUM_CLASS_NAMED(CreateSwapBuffer, "IDXGISwapChain::GetBuffer");
STRINGISE_ENUM_CLASS_NAMED(CreateTexture1D, "ID3D11Device::CreateTexture1D");
STRINGISE_ENUM_CLASS_NAMED(CreateTexture2D, "ID3D11Device::CreateTexture2D");
STRINGISE_ENUM_CLASS_NAMED(CreateTexture3D, "ID3D11Device::CreateTexture3D");
STRINGISE_ENUM_CLASS_NAMED(CreateBuffer, "ID3D11Device::CreateBuffer");
STRINGISE_ENUM_CLASS_NAMED(CreateVertexShader, "ID3D11Device::CreateVertexShader");
STRINGISE_ENUM_CLASS_NAMED(CreateHullShader, "ID3D11Device::CreateHullShader");
STRINGISE_ENUM_CLASS_NAMED(CreateDomainShader, "ID3D11Device::CreateDomainShader");
STRINGISE_ENUM_CLASS_NAMED(CreateGeometryShader, "ID3D11Device::CreateGeometryShader");
STRINGISE_ENUM_CLASS_NAMED(CreateGeometryShaderWithStreamOutput,
"ID3D11Device::CreateGeometryShaderWithStreamOutput");
STRINGISE_ENUM_CLASS_NAMED(CreatePixelShader, "ID3D11Device::CreatePixelShader");
STRINGISE_ENUM_CLASS_NAMED(CreateComputeShader, "ID3D11Device::CreateComputeShader");
STRINGISE_ENUM_CLASS_NAMED(GetClassInstance, "ID3D11ClassLinkage::GetClassInstance");
STRINGISE_ENUM_CLASS_NAMED(CreateClassInstance, "ID3D11ClassLinkage::CreateClassInstance");
STRINGISE_ENUM_CLASS_NAMED(CreateClassLinkage, "ID3D11Device::CreateClassLinkage");
STRINGISE_ENUM_CLASS_NAMED(CreateShaderResourceView, "ID3D11Device::CreateShaderResourceView");
STRINGISE_ENUM_CLASS_NAMED(CreateRenderTargetView, "ID3D11Device::CreateRenderTargetView");
STRINGISE_ENUM_CLASS_NAMED(CreateDepthStencilView, "ID3D11Device::CreateDepthStencilView");
STRINGISE_ENUM_CLASS_NAMED(CreateUnorderedAccessView,
"ID3D11Device::CreateUnorderedAccessView");
STRINGISE_ENUM_CLASS_NAMED(CreateInputLayout, "ID3D11Device::CreateInputLayout");
STRINGISE_ENUM_CLASS_NAMED(CreateBlendState, "ID3D11Device::CreateBlendState");
STRINGISE_ENUM_CLASS_NAMED(CreateDepthStencilState, "ID3D11Device::CreateDepthStencilState");
STRINGISE_ENUM_CLASS_NAMED(CreateRasterizerState, "ID3D11Device::CreateRasterizerState");
STRINGISE_ENUM_CLASS_NAMED(CreateSamplerState, "ID3D11Device::CreateSamplerState");
STRINGISE_ENUM_CLASS_NAMED(CreateQuery, "ID3D11Device::CreateQuery");
STRINGISE_ENUM_CLASS_NAMED(CreatePredicate, "ID3D11Device::CreatePredicate");
STRINGISE_ENUM_CLASS_NAMED(CreateCounter, "ID3D11Device::CreateCounter");
STRINGISE_ENUM_CLASS_NAMED(CreateDeferredContext, "ID3D11Device::CreateDeferredContext");
STRINGISE_ENUM_CLASS_NAMED(SetExceptionMode, "ID3D11Device::SetExceptionMode");
STRINGISE_ENUM_CLASS_NAMED(OpenSharedResource, "ID3D11Device::OpenSharedResource");
STRINGISE_ENUM_CLASS_NAMED(CaptureScope, "Frame Capture Metadata");
STRINGISE_ENUM_CLASS_NAMED(IASetInputLayout, "ID3D11DeviceContext::IASetInputLayout");
STRINGISE_ENUM_CLASS_NAMED(IASetVertexBuffers, "ID3D11DeviceContext::IASetVertexBuffers");
STRINGISE_ENUM_CLASS_NAMED(IASetIndexBuffer, "ID3D11DeviceContext::IASetIndexBuffer");
STRINGISE_ENUM_CLASS_NAMED(IASetPrimitiveTopology,
"ID3D11DeviceContext::IASetPrimitiveTopology");
STRINGISE_ENUM_CLASS_NAMED(VSSetConstantBuffers, "ID3D11DeviceContext::VSSetConstantBuffers");
STRINGISE_ENUM_CLASS_NAMED(VSSetShaderResources, "ID3D11DeviceContext::VSSetShaderResources");
STRINGISE_ENUM_CLASS_NAMED(VSSetSamplers, "ID3D11DeviceContext::VSSetSamplers");
STRINGISE_ENUM_CLASS_NAMED(VSSetShader, "ID3D11DeviceContext::VSSetShader");
STRINGISE_ENUM_CLASS_NAMED(HSSetConstantBuffers, "ID3D11DeviceContext::HSSetConstantBuffers");
STRINGISE_ENUM_CLASS_NAMED(HSSetShaderResources, "ID3D11DeviceContext::HSSetShaderResources");
STRINGISE_ENUM_CLASS_NAMED(HSSetSamplers, "ID3D11DeviceContext::HSSetSamplers");
STRINGISE_ENUM_CLASS_NAMED(HSSetShader, "ID3D11DeviceContext::HSSetShader");
STRINGISE_ENUM_CLASS_NAMED(DSSetConstantBuffers, "ID3D11DeviceContext::DSSetConstantBuffers");
STRINGISE_ENUM_CLASS_NAMED(DSSetShaderResources, "ID3D11DeviceContext::DSSetShaderResources");
STRINGISE_ENUM_CLASS_NAMED(DSSetSamplers, "ID3D11DeviceContext::DSSetSamplers");
STRINGISE_ENUM_CLASS_NAMED(DSSetShader, "ID3D11DeviceContext::DSSetShader");
STRINGISE_ENUM_CLASS_NAMED(GSSetConstantBuffers, "ID3D11DeviceContext::GSSetConstantBuffers");
STRINGISE_ENUM_CLASS_NAMED(GSSetShaderResources, "ID3D11DeviceContext::GSSetShaderResources");
STRINGISE_ENUM_CLASS_NAMED(GSSetSamplers, "ID3D11DeviceContext::GSSetSamplers");
STRINGISE_ENUM_CLASS_NAMED(GSSetShader, "ID3D11DeviceContext::GSSetShader");
STRINGISE_ENUM_CLASS_NAMED(SOSetTargets, "ID3D11DeviceContext::SOSetTargets");
STRINGISE_ENUM_CLASS_NAMED(PSSetConstantBuffers, "ID3D11DeviceContext::PSSetConstantBuffers");
STRINGISE_ENUM_CLASS_NAMED(PSSetShaderResources, "ID3D11DeviceContext::PSSetShaderResources");
STRINGISE_ENUM_CLASS_NAMED(PSSetSamplers, "ID3D11DeviceContext::PSSetSamplers");
STRINGISE_ENUM_CLASS_NAMED(PSSetShader, "ID3D11DeviceContext::PSSetShader");
STRINGISE_ENUM_CLASS_NAMED(CSSetConstantBuffers, "ID3D11DeviceContext::CSSetConstantBuffers");
STRINGISE_ENUM_CLASS_NAMED(CSSetShaderResources, "ID3D11DeviceContext::CSSetShaderResources");
STRINGISE_ENUM_CLASS_NAMED(CSSetUnorderedAccessViews,
"ID3D11DeviceContext::CSSetUnorderedAccessViews");
STRINGISE_ENUM_CLASS_NAMED(CSSetSamplers, "ID3D11DeviceContext::CSSetSamplers");
STRINGISE_ENUM_CLASS_NAMED(CSSetShader, "ID3D11DeviceContext::CSSetShader");
STRINGISE_ENUM_CLASS_NAMED(RSSetViewports, "ID3D11DeviceContext::RSSetViewports");
STRINGISE_ENUM_CLASS_NAMED(RSSetScissorRects, "ID3D11DeviceContext::RSSetScissors");
STRINGISE_ENUM_CLASS_NAMED(RSSetState, "ID3D11DeviceContext::RSSetState");
STRINGISE_ENUM_CLASS_NAMED(OMSetRenderTargets, "ID3D11DeviceContext::OMSetRenderTargets");
STRINGISE_ENUM_CLASS_NAMED(OMSetRenderTargetsAndUnorderedAccessViews,
"ID3D11DeviceContext::OMSetRenderTargetsAndUnorderedAccessViews");
STRINGISE_ENUM_CLASS_NAMED(OMSetBlendState, "ID3D11DeviceContext::OMSetBlendState");
STRINGISE_ENUM_CLASS_NAMED(OMSetDepthStencilState,
"ID3D11DeviceContext::OMSetDepthStencilState");
STRINGISE_ENUM_CLASS_NAMED(DrawIndexedInstanced, "ID3D11DeviceContext::DrawIndexedInstanced");
STRINGISE_ENUM_CLASS_NAMED(DrawInstanced, "ID3D11DeviceContext::DrawInstanced");
STRINGISE_ENUM_CLASS_NAMED(DrawIndexed, "ID3D11DeviceContext::DrawIndexed");
STRINGISE_ENUM_CLASS_NAMED(Draw, "ID3D11DeviceContext::Draw");
STRINGISE_ENUM_CLASS_NAMED(DrawAuto, "ID3D11DeviceContext::DrawAuto");
STRINGISE_ENUM_CLASS_NAMED(DrawIndexedInstancedIndirect,
"ID3D11DeviceContext::DrawIndexedInstancedIndirect");
STRINGISE_ENUM_CLASS_NAMED(DrawInstancedIndirect, "ID3D11DeviceContext::DrawInstancedIndirect");
STRINGISE_ENUM_CLASS_NAMED(Map, "ID3D11DeviceContext::Map");
STRINGISE_ENUM_CLASS_NAMED(Unmap, "ID3D11DeviceContext::Unmap");
STRINGISE_ENUM_CLASS_NAMED(CopySubresourceRegion, "ID3D11DeviceContext::CopySubresourceRegion");
STRINGISE_ENUM_CLASS_NAMED(CopyResource, "ID3D11DeviceContext::CopyResource");
STRINGISE_ENUM_CLASS_NAMED(UpdateSubresource, "ID3D11DeviceContext::UpdateSubresource");
STRINGISE_ENUM_CLASS_NAMED(CopyStructureCount, "ID3D11DeviceContext::CopyStructureCount");
STRINGISE_ENUM_CLASS_NAMED(ResolveSubresource, "ID3D11DeviceContext::ResolveSubresource");
STRINGISE_ENUM_CLASS_NAMED(GenerateMips, "ID3D11DeviceContext::GenerateMips");
STRINGISE_ENUM_CLASS_NAMED(ClearDepthStencilView, "ID3D11DeviceContext::ClearDepthStencilView");
STRINGISE_ENUM_CLASS_NAMED(ClearRenderTargetView, "ID3D11DeviceContext::ClearRenderTargetView");
STRINGISE_ENUM_CLASS_NAMED(ClearUnorderedAccessViewUint,
"ID3D11DeviceContext::ClearUnorderedAccessViewInt");
STRINGISE_ENUM_CLASS_NAMED(ClearUnorderedAccessViewFloat,
"ID3D11DeviceContext::ClearUnorderedAccessViewFloat");
STRINGISE_ENUM_CLASS_NAMED(ClearState, "ID3D11DeviceContext::ClearState");
STRINGISE_ENUM_CLASS_NAMED(ExecuteCommandList, "ID3D11DeviceContext::ExecuteCommandList");
STRINGISE_ENUM_CLASS_NAMED(Dispatch, "ID3D11DeviceContext::Dispatch");
STRINGISE_ENUM_CLASS_NAMED(DispatchIndirect, "ID3D11DeviceContext::DispatchIndirect");
STRINGISE_ENUM_CLASS_NAMED(FinishCommandList, "ID3D11DeviceContext::FinishCommandlist");
STRINGISE_ENUM_CLASS_NAMED(Flush, "ID3D11DeviceContext::Flush");
STRINGISE_ENUM_CLASS_NAMED(SetPredication, "ID3D11DeviceContext::SetPredication");
STRINGISE_ENUM_CLASS_NAMED(SetResourceMinLOD, "ID3D11DeviceContext::SetResourceMinLOD");
STRINGISE_ENUM_CLASS_NAMED(Begin, "ID3D11DeviceContext::Begin");
STRINGISE_ENUM_CLASS_NAMED(End, "ID3D11DeviceContext::End");
STRINGISE_ENUM_CLASS_NAMED(CreateRasterizerState1, "ID3D11Device2::CreateRasterizerState1");
STRINGISE_ENUM_CLASS_NAMED(CreateBlendState1, "ID3D11Device2::CreateBlendState1");
STRINGISE_ENUM_CLASS_NAMED(CopySubresourceRegion1,
"ID3D11DeviceContext1::CopySubresourceRegion1");
STRINGISE_ENUM_CLASS_NAMED(UpdateSubresource1, "ID3D11DeviceContext1::UpdateSubresource1");
STRINGISE_ENUM_CLASS_NAMED(ClearView, "ID3D11DeviceContext1::ClearView");
STRINGISE_ENUM_CLASS_NAMED(VSSetConstantBuffers1,
"ID3D11DeviceContext1::VSSetConstantBuffers1");
STRINGISE_ENUM_CLASS_NAMED(HSSetConstantBuffers1,
"ID3D11DeviceContext1::HSSetConstantBuffers1");
STRINGISE_ENUM_CLASS_NAMED(DSSetConstantBuffers1,
"ID3D11DeviceContext1::DSSetConstantBuffers1");
STRINGISE_ENUM_CLASS_NAMED(GSSetConstantBuffers1,
"ID3D11DeviceContext1::GSSetConstantBuffers1");
STRINGISE_ENUM_CLASS_NAMED(PSSetConstantBuffers1,
"ID3D11DeviceContext1::PSSetConstantBuffers1");
STRINGISE_ENUM_CLASS_NAMED(CSSetConstantBuffers1,
"ID3D11DeviceContext1::CSSetConstantBuffers1");
STRINGISE_ENUM_CLASS_NAMED(PushMarker, "Push Debug Region");
STRINGISE_ENUM_CLASS_NAMED(SetMarker, "Set Marker");
STRINGISE_ENUM_CLASS_NAMED(PopMarker, "Pop Debug Region");
STRINGISE_ENUM_CLASS_NAMED(CaptureBegin, "Beginning of Capture");
STRINGISE_ENUM_CLASS_NAMED(CaptureEnd, "End of Capture");
STRINGISE_ENUM_CLASS_NAMED(SetShaderDebugPath, "SetShaderDebugPath");
STRINGISE_ENUM_CLASS_NAMED(DiscardResource, "ID3D11DeviceContext1::DiscardResource");
STRINGISE_ENUM_CLASS_NAMED(DiscardView, "ID3D11DeviceContext1::DiscardView");
STRINGISE_ENUM_CLASS_NAMED(DiscardView1, "ID3D11DeviceContext1::DiscardView1");
STRINGISE_ENUM_CLASS_NAMED(CreateRasterizerState2, "ID3D11Device3::CreateRasterizerState2");
STRINGISE_ENUM_CLASS_NAMED(CreateQuery1, "ID3D11Device3::CreateQuery1");
STRINGISE_ENUM_CLASS_NAMED(CreateTexture2D1, "ID3D11Device3::CreateTexture2D1");
STRINGISE_ENUM_CLASS_NAMED(CreateTexture3D1, "ID3D11Device3::CreateTexture3D1");
STRINGISE_ENUM_CLASS_NAMED(CreateShaderResourceView1,
"ID3D11Device3::CreateShaderResourceView1");
STRINGISE_ENUM_CLASS_NAMED(CreateRenderTargetView1, "ID3D11Device3::CreateRenderTargetView1");
STRINGISE_ENUM_CLASS_NAMED(CreateUnorderedAccessView1,
"ID3D11Device3::CreateUnorderedAccessView1");
STRINGISE_ENUM_CLASS_NAMED(SwapchainPresent, "IDXGISwapChain::Present");
STRINGISE_ENUM_CLASS_NAMED(PostExecuteCommandListRestore,
"ID3D11DeviceContext::ExecuteCommandList");
STRINGISE_ENUM_CLASS_NAMED(PostFinishCommandListSet, "ID3D11DeviceContext::FinishCommandList");
STRINGISE_ENUM_CLASS_NAMED(SwapDeviceContextState,
"ID3D11DeviceContext1::SwapDeviceContextState");
STRINGISE_ENUM_CLASS_NAMED(Max, "Max Chunk");
}
END_ENUM_STRINGISE()
}
template <>
std::string DoStringise(const D3D11_BIND_FLAG &el)
{
@@ -627,4 +790,4 @@ TEST_CASE("D3D11 ToStr", "[tostr][d3d]")
"D3D11_BIND_VERTEX_BUFFER | D3D11_BIND_INDEX_BUFFER | D3D11_BIND_FLAG(634880)");
}
#endif
#endif