Centralise resource naming with capture context to allow customisation

* We remove the now unneeded name fields in buffer/texture descriptions
  and some of the pipeline state structs.
* A single function will give the human-readable name for a resource id.
  This will look up a custom set of renames, on top of the names from
  the resource descriptions.
This commit is contained in:
baldurk committed 2017-11-17 16:30:53 +00:00
1 parent d009ed3b30
commit 7c8628b237
32 files changed
+342 -860

No files matched your search

-22
View File
@@ -107,14 +107,6 @@ struct IA
DOCUMENT("A :class:`ShaderReflection` describing the bytecode used to create the input layout.");
ShaderReflection *Bytecode = NULL;
DOCUMENT(R"(``True`` if :data:`name` was assigned by the application, otherwise it's autogenerated
based on the ID.
)");
bool customName = false;
DOCUMENT("The name of the input layout object.");
rdcstr name;
DOCUMENT("A list of :class:`D3D11_VB` with the vertex buffers that are bound.");
rdcarray<VB> vbuffers;
@@ -172,12 +164,6 @@ struct Sampler
{
DOCUMENT("The :class:`ResourceId` of the sampler state object.");
ResourceId Samp;
DOCUMENT("The name of the sampler state object.");
rdcstr name;
DOCUMENT(R"(``True`` if :data:`name` was assigned by the application, otherwise it's autogenerated
based on the ID.
)");
bool customName = false;
DOCUMENT("The :class:`AddressMode` in the U direction.");
AddressMode AddressU = AddressMode::Wrap;
DOCUMENT("The :class:`AddressMode` in the V direction.");
@@ -236,14 +222,6 @@ struct Shader
DOCUMENT("The :class:`ResourceId` of the shader object itself.");
ResourceId Object;
DOCUMENT("The name of the shader object.");
rdcstr name;
DOCUMENT(R"(``True`` if :data:`name` was assigned by the application, otherwise it's autogenerated
based on the ID.
)");
bool customName = false;
DOCUMENT("A :class:`ShaderReflection` describing the reflection data for this shader.");
ShaderReflection *ShaderDetails = NULL;
DOCUMENT(R"(A :class:`ShaderBindpointMapping` to match :data:`ShaderDetails` with the bindpoint
-8
View File
@@ -520,14 +520,6 @@ struct State
DOCUMENT("The :class:`ResourceId` of the pipeline state object.");
ResourceId pipeline;
DOCUMENT(R"(``True`` if :data:`name` was assigned by the application, otherwise it's autogenerated
based on the ID.
)");
bool customName = false;
DOCUMENT("The name of the pipeline state object.");
rdcstr name;
DOCUMENT("The :class:`ResourceId` of the root signature object.");
ResourceId rootSig;
-16
View File
@@ -204,14 +204,6 @@ struct BufferDescription
DOCUMENT("The unique :class:`ResourceId` that identifies this buffer.");
ResourceId ID;
DOCUMENT("The name given to this buffer.");
rdcstr name;
DOCUMENT(R"(``True`` if the name was assigned by the application, otherwise it's autogenerated
based on the ID.
)");
bool customName;
DOCUMENT("The way this buffer will be used in the pipeline.");
BufferCategory creationFlags;
@@ -224,14 +216,6 @@ DECLARE_REFLECTION_STRUCT(BufferDescription);
DOCUMENT("A description of a texture resource.");
struct TextureDescription
{
DOCUMENT("The name given to this buffer.");
rdcstr name;
DOCUMENT(R"(``True`` if the name was assigned by the application, otherwise it's autogenerated
based on the ID.
)");
bool customName;
DOCUMENT("The :class:`ResourceFormat` that describes the format of each pixel in the texture.");
ResourceFormat format;
+5 -22
View File
@@ -101,28 +101,8 @@ struct Shader
DOCUMENT("The :class:`ResourceId` of the shader object itself.");
ResourceId Object;
DOCUMENT("The name of the shader object.");
rdcstr ShaderName;
DOCUMENT(R"(``True`` if :data:`ShaderName` was assigned by the application, otherwise it's
autogenerated based on the ID.
)");
bool customShaderName = false;
DOCUMENT("The name of the program object.");
rdcstr ProgramName;
DOCUMENT(R"(``True`` if :data:`ProgramName` was assigned by the application, otherwise it's
autogenerated based on the ID.
)");
bool customProgramName = false;
DOCUMENT("``True`` if a program pipeline object is in use.");
bool PipelineActive = false;
DOCUMENT("The name of the pipeline object.");
rdcstr PipelineName;
DOCUMENT(R"(``True`` if :data:`PipelineName` was assigned by the application, otherwise it's
autogenerated based on the ID.
)");
bool customPipelineName = false;
DOCUMENT("The :class:`ResourceId` of the program bound to this stage.");
ResourceId Program;
DOCUMENT("A :class:`ShaderReflection` describing the reflection data for this shader.");
ShaderReflection *ShaderDetails = NULL;
@@ -557,6 +537,9 @@ struct State
DOCUMENT("A :class:`GL_Shader` describing the compute shader stage.");
Shader m_CS;
DOCUMENT("The :class:`ResourceId` of the program pipeline (if active).");
ResourceId Pipeline;
DOCUMENT(
"A :class:`GL_FixedVertexProcessing` describing the fixed-function vertex processing stage.");
FixedVertexProcessing m_VtxProcess;
-15
View File
@@ -38,14 +38,6 @@ struct BindingElement
DOCUMENT("``True`` if this is an immutable sampler binding.");
bool immutableSampler = false;
DOCUMENT("The name of the current sampler object, if one is bound. Empty for other bindings.");
rdcstr name;
DOCUMENT(R"(``True`` if :data:`name` was assigned by the application, otherwise it's autogenerated
based on the ID.
)");
bool customName = false;
DOCUMENT("The :class:`ResourceFormat` that the view uses.");
ResourceFormat viewfmt;
DOCUMENT("Four :class:`TextureSwizzle` elements indicating the swizzle applied to this texture.");
@@ -227,13 +219,6 @@ struct Shader
DOCUMENT("The name of the entry point in the shader module that is used.");
rdcstr entryPoint;
DOCUMENT("The name of the shader module.");
rdcstr name;
DOCUMENT(R"(``True`` if :data:`name` was assigned by the application, otherwise it's autogenerated
based on the ID.
)");
bool customName = false;
DOCUMENT("A :class:`ShaderReflection` describing the reflection data for this shader.");
ShaderReflection *ShaderDetails = NULL;
DOCUMENT(R"(A :class:`ShaderBindpointMapping` to match :data:`ShaderDetails` with the bindpoint