mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-25 07:56:33 +00:00
Borrow a concept from an upcoming larger refactor to get typenames
* For SWIG bindings we need something that will go type -> string name so we can look up the SWIG type in a template to convert elements in arrays. * An upcoming refactor will contain this kind of typename for proper reflection, so to minimise code churn and avoid adding multiple new solutions for the same kind of thing, we borrow the macro name and implement it for the API structs we need.
This commit is contained in:
@@ -76,6 +76,8 @@ struct MeshFormat
|
||||
float farPlane;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(MeshFormat);
|
||||
|
||||
class Camera;
|
||||
|
||||
struct MeshDisplay
|
||||
@@ -104,6 +106,8 @@ struct MeshDisplay
|
||||
bool32 wireframeDraw;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(MeshDisplay);
|
||||
|
||||
struct TextureDisplay
|
||||
{
|
||||
ResourceId texid;
|
||||
@@ -129,6 +133,8 @@ struct TextureDisplay
|
||||
DebugOverlay overlay;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(TextureDisplay);
|
||||
|
||||
// some dependent structs for TextureSave
|
||||
struct TextureComponentMapping
|
||||
{
|
||||
@@ -136,6 +142,8 @@ struct TextureComponentMapping
|
||||
float whitePoint;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(TextureComponentMapping);
|
||||
|
||||
struct TextureSampleMapping
|
||||
{
|
||||
// if true, texture acts like an array, each slice being
|
||||
@@ -151,6 +159,8 @@ struct TextureSampleMapping
|
||||
uint32_t sampleIndex;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(TextureSampleMapping);
|
||||
|
||||
struct TextureSliceMapping
|
||||
{
|
||||
// select the (depth/array) slice to save.
|
||||
@@ -186,6 +196,8 @@ struct TextureSliceMapping
|
||||
// slice 0 is saved
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(TextureSliceMapping);
|
||||
|
||||
struct TextureSave
|
||||
{
|
||||
ResourceId id;
|
||||
@@ -222,6 +234,8 @@ struct TextureSave
|
||||
int jpegQuality;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(TextureSave);
|
||||
|
||||
// dependent structs for TargetControlMessage
|
||||
struct NewCaptureData
|
||||
{
|
||||
@@ -232,22 +246,30 @@ struct NewCaptureData
|
||||
bool32 local;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(NewCaptureData);
|
||||
|
||||
struct RegisterAPIData
|
||||
{
|
||||
rdctype::str APIName;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(RegisterAPIData);
|
||||
|
||||
struct BusyData
|
||||
{
|
||||
rdctype::str ClientName;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(BusyData);
|
||||
|
||||
struct NewChildData
|
||||
{
|
||||
uint32_t PID;
|
||||
uint32_t ident;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(NewChildData);
|
||||
|
||||
struct TargetControlMessage
|
||||
{
|
||||
TargetControlMessage() {}
|
||||
@@ -258,3 +280,5 @@ struct TargetControlMessage
|
||||
BusyData Busy;
|
||||
NewChildData NewChild;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(TargetControlMessage);
|
||||
|
||||
@@ -364,3 +364,25 @@ struct State
|
||||
};
|
||||
|
||||
}; // namespace D3D11Pipe
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::Layout);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::VB);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::IB);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::IA);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::View);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::Sampler);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::CBuffer);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::Shader);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::SOBind);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::SO);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::Viewport);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::Scissor);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::RasterizerState);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::Rasterizer);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::DepthStencilState);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::StencilOp);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::Blend);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::BlendOp);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::BlendState);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::OM);
|
||||
DECLARE_REFLECTION_STRUCT(D3D11Pipe::State);
|
||||
|
||||
@@ -399,3 +399,28 @@ struct State
|
||||
};
|
||||
|
||||
}; // namespace D3D12Pipe
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::Layout);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::VB);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::IB);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::IA);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::View);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::Sampler);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::CBuffer);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::RegisterSpace);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::Shader);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::SOBind);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::Streamout);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::Viewport);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::Scissor);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::RasterizerState);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::Rasterizer);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::StencilOp);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::DepthStencilState);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::BlendOp);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::Blend);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::BlendState);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::OM);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::ResourceState);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::ResourceData);
|
||||
DECLARE_REFLECTION_STRUCT(D3D12Pipe::State);
|
||||
|
||||
@@ -34,6 +34,8 @@ struct FloatVector
|
||||
float x, y, z, w;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FloatVector);
|
||||
|
||||
struct DirectoryFile
|
||||
{
|
||||
rdctype::str filename;
|
||||
@@ -42,6 +44,8 @@ struct DirectoryFile
|
||||
uint64_t size;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(DirectoryFile);
|
||||
|
||||
struct ResourceFormat
|
||||
{
|
||||
ResourceFormat()
|
||||
@@ -81,6 +85,8 @@ struct ResourceFormat
|
||||
bool32 srgbCorrected;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(ResourceFormat);
|
||||
|
||||
struct FetchBuffer
|
||||
{
|
||||
ResourceId ID;
|
||||
@@ -90,6 +96,8 @@ struct FetchBuffer
|
||||
uint64_t length;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchBuffer);
|
||||
|
||||
struct FetchTexture
|
||||
{
|
||||
rdctype::str name;
|
||||
@@ -107,6 +115,8 @@ struct FetchTexture
|
||||
uint64_t byteSize;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchTexture);
|
||||
|
||||
struct FetchAPIEvent
|
||||
{
|
||||
uint32_t eventID;
|
||||
@@ -118,6 +128,8 @@ struct FetchAPIEvent
|
||||
uint64_t fileOffset;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchAPIEvent);
|
||||
|
||||
struct DebugMessage
|
||||
{
|
||||
uint32_t eventID;
|
||||
@@ -128,6 +140,8 @@ struct DebugMessage
|
||||
rdctype::str description;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(DebugMessage);
|
||||
|
||||
enum BucketRecordType
|
||||
{
|
||||
BUCKET_RECORD_TYPE_LINEAR,
|
||||
@@ -150,6 +164,8 @@ struct FetchFrameConstantBindStats
|
||||
rdctype::array<uint32_t> sizes;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchFrameConstantBindStats);
|
||||
|
||||
struct FetchFrameSamplerBindStats
|
||||
{
|
||||
uint32_t calls;
|
||||
@@ -158,6 +174,8 @@ struct FetchFrameSamplerBindStats
|
||||
rdctype::array<uint32_t> bindslots;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchFrameSamplerBindStats);
|
||||
|
||||
struct FetchFrameResourceBindStats
|
||||
{
|
||||
uint32_t calls;
|
||||
@@ -167,6 +185,8 @@ struct FetchFrameResourceBindStats
|
||||
rdctype::array<uint32_t> bindslots;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchFrameResourceBindStats);
|
||||
|
||||
struct FetchFrameUpdateStats
|
||||
{
|
||||
enum Constants
|
||||
@@ -181,6 +201,8 @@ struct FetchFrameUpdateStats
|
||||
rdctype::array<uint32_t> sizes;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchFrameUpdateStats);
|
||||
|
||||
struct FetchFrameDrawStats
|
||||
{
|
||||
enum Constants
|
||||
@@ -195,12 +217,16 @@ struct FetchFrameDrawStats
|
||||
rdctype::array<uint32_t> counts;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchFrameDrawStats);
|
||||
|
||||
struct FetchFrameDispatchStats
|
||||
{
|
||||
uint32_t calls;
|
||||
uint32_t indirect;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchFrameDispatchStats);
|
||||
|
||||
struct FetchFrameIndexBindStats
|
||||
{
|
||||
uint32_t calls;
|
||||
@@ -208,6 +234,8 @@ struct FetchFrameIndexBindStats
|
||||
uint32_t nulls;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchFrameIndexBindStats);
|
||||
|
||||
struct FetchFrameVertexBindStats
|
||||
{
|
||||
uint32_t calls;
|
||||
@@ -216,6 +244,8 @@ struct FetchFrameVertexBindStats
|
||||
rdctype::array<uint32_t> bindslots;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchFrameVertexBindStats);
|
||||
|
||||
struct FetchFrameLayoutBindStats
|
||||
{
|
||||
uint32_t calls;
|
||||
@@ -223,6 +253,8 @@ struct FetchFrameLayoutBindStats
|
||||
uint32_t nulls;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchFrameLayoutBindStats);
|
||||
|
||||
struct FetchFrameShaderStats
|
||||
{
|
||||
uint32_t calls;
|
||||
@@ -231,6 +263,8 @@ struct FetchFrameShaderStats
|
||||
uint32_t redundants;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchFrameShaderStats);
|
||||
|
||||
struct FetchFrameBlendStats
|
||||
{
|
||||
uint32_t calls;
|
||||
@@ -239,6 +273,8 @@ struct FetchFrameBlendStats
|
||||
uint32_t redundants;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchFrameBlendStats);
|
||||
|
||||
struct FetchFrameDepthStencilStats
|
||||
{
|
||||
uint32_t calls;
|
||||
@@ -247,6 +283,8 @@ struct FetchFrameDepthStencilStats
|
||||
uint32_t redundants;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchFrameDepthStencilStats);
|
||||
|
||||
struct FetchFrameRasterizationStats
|
||||
{
|
||||
uint32_t calls;
|
||||
@@ -257,6 +295,8 @@ struct FetchFrameRasterizationStats
|
||||
rdctype::array<uint32_t> rects;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchFrameRasterizationStats);
|
||||
|
||||
struct FetchFrameOutputStats
|
||||
{
|
||||
uint32_t calls;
|
||||
@@ -265,6 +305,8 @@ struct FetchFrameOutputStats
|
||||
rdctype::array<uint32_t> bindslots;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchFrameOutputStats);
|
||||
|
||||
struct FetchFrameStatistics
|
||||
{
|
||||
bool32 recorded;
|
||||
@@ -284,6 +326,8 @@ struct FetchFrameStatistics
|
||||
FetchFrameOutputStats outputs;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchFrameStatistics);
|
||||
|
||||
struct FetchFrameInfo
|
||||
{
|
||||
FetchFrameInfo()
|
||||
@@ -308,6 +352,8 @@ struct FetchFrameInfo
|
||||
rdctype::array<DebugMessage> debugMessages;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchFrameInfo);
|
||||
|
||||
struct EventUsage
|
||||
{
|
||||
EventUsage() : eventID(0), usage(ResourceUsage::Unused) {}
|
||||
@@ -326,6 +372,8 @@ struct EventUsage
|
||||
ResourceId view;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(EventUsage);
|
||||
|
||||
struct FetchDrawcall
|
||||
{
|
||||
FetchDrawcall() { Reset(); }
|
||||
@@ -396,6 +444,8 @@ struct FetchDrawcall
|
||||
rdctype::array<FetchDrawcall> children;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(FetchDrawcall);
|
||||
|
||||
struct APIProperties
|
||||
{
|
||||
// the pipeline type of the actual log/capture
|
||||
@@ -407,6 +457,8 @@ struct APIProperties
|
||||
bool32 degraded;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(APIProperties);
|
||||
|
||||
struct CounterDescription
|
||||
{
|
||||
GPUCounter counterID;
|
||||
@@ -417,6 +469,8 @@ struct CounterDescription
|
||||
CounterUnit unit;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(CounterDescription);
|
||||
|
||||
union CounterValue
|
||||
{
|
||||
float f;
|
||||
@@ -467,6 +521,8 @@ struct CounterResult
|
||||
CounterValue value;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(CounterResult);
|
||||
|
||||
union PixelValue
|
||||
{
|
||||
float value_f[4];
|
||||
@@ -482,6 +538,8 @@ struct ModificationValue
|
||||
int32_t stencil;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(ModificationValue);
|
||||
|
||||
struct PixelModification
|
||||
{
|
||||
uint32_t eventID;
|
||||
@@ -511,3 +569,5 @@ struct PixelModification
|
||||
!shaderDiscarded && !depthTestFailed && !stencilTestFailed;
|
||||
}
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(PixelModification);
|
||||
|
||||
@@ -436,4 +436,30 @@ struct State
|
||||
Hints m_Hints;
|
||||
};
|
||||
|
||||
}; // namespace GLPipe
|
||||
}; // namespace GLPipe
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::VertexAttribute);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::VB);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::VertexInput);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::Shader);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::FixedVertexProcessing);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::Texture);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::Sampler);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::Buffer);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::ImageLoadStore);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::Feedback);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::Viewport);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::Scissor);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::RasterizerState);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::Rasterizer);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::DepthState);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::StencilOp);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::StencilState);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::Attachment);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::FBO);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::BlendOp);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::Blend);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::BlendState);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::FrameBuffer);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::Hints);
|
||||
DECLARE_REFLECTION_STRUCT(GLPipe::State);
|
||||
|
||||
@@ -27,6 +27,16 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
template <typename T>
|
||||
inline const char *TypeName();
|
||||
|
||||
#define DECLARE_REFLECTION_STRUCT(type) \
|
||||
template <> \
|
||||
inline const char *TypeName<type>() \
|
||||
{ \
|
||||
return #type; \
|
||||
}
|
||||
|
||||
typedef uint8_t byte;
|
||||
typedef uint32_t bool32;
|
||||
|
||||
@@ -146,6 +156,8 @@ private:
|
||||
#endif
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(ResourceId);
|
||||
|
||||
#include "capture_options.h"
|
||||
#include "control_types.h"
|
||||
#include "d3d11_pipestate.h"
|
||||
@@ -290,6 +302,8 @@ struct IReplayRenderer
|
||||
rdctype::array<byte> *data) = 0;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(IReplayRenderer);
|
||||
|
||||
// deprecated C interface, for renderdocui only
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC ReplayRenderer_GetAPIProperties(IReplayRenderer *rend,
|
||||
APIProperties *props);
|
||||
|
||||
@@ -135,6 +135,8 @@ struct ShaderVariable
|
||||
rdctype::array<ShaderVariable> members;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(ShaderVariable);
|
||||
|
||||
struct ShaderDebugState
|
||||
{
|
||||
rdctype::array<ShaderVariable> registers;
|
||||
@@ -146,6 +148,8 @@ struct ShaderDebugState
|
||||
ShaderEvents flags;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(ShaderDebugState);
|
||||
|
||||
struct ShaderDebugTrace
|
||||
{
|
||||
rdctype::array<ShaderVariable> inputs;
|
||||
@@ -154,6 +158,8 @@ struct ShaderDebugTrace
|
||||
rdctype::array<ShaderDebugState> states;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(ShaderDebugTrace);
|
||||
|
||||
struct SigParameter
|
||||
{
|
||||
SigParameter()
|
||||
@@ -190,6 +196,8 @@ struct SigParameter
|
||||
uint32_t arrayIndex;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(SigParameter);
|
||||
|
||||
struct ShaderConstant;
|
||||
|
||||
struct ShaderVariableDescriptor
|
||||
@@ -203,6 +211,8 @@ struct ShaderVariableDescriptor
|
||||
rdctype::str name;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(ShaderVariableDescriptor);
|
||||
|
||||
struct ShaderVariableType
|
||||
{
|
||||
ShaderVariableDescriptor descriptor;
|
||||
@@ -210,12 +220,16 @@ struct ShaderVariableType
|
||||
rdctype::array<ShaderConstant> members;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(ShaderVariableType);
|
||||
|
||||
struct ShaderRegister
|
||||
{
|
||||
uint32_t vec;
|
||||
uint32_t comp;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(ShaderRegister);
|
||||
|
||||
struct ShaderConstant
|
||||
{
|
||||
rdctype::str name;
|
||||
@@ -224,6 +238,8 @@ struct ShaderConstant
|
||||
ShaderVariableType type;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(ShaderConstant);
|
||||
|
||||
struct ConstantBlock
|
||||
{
|
||||
rdctype::str name;
|
||||
@@ -233,6 +249,8 @@ struct ConstantBlock
|
||||
uint32_t byteSize;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(ConstantBlock);
|
||||
|
||||
struct ShaderResource
|
||||
{
|
||||
bool32 IsSampler;
|
||||
@@ -246,6 +264,8 @@ struct ShaderResource
|
||||
int32_t bindPoint;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(ShaderResource);
|
||||
|
||||
struct ShaderDebugChunk
|
||||
{
|
||||
ShaderDebugChunk() : compileFlags(0), entryFile(0) {}
|
||||
@@ -258,6 +278,8 @@ struct ShaderDebugChunk
|
||||
int32_t entryFile; // index in above array of 'main' file with entry point
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(ShaderDebugChunk);
|
||||
|
||||
struct ShaderReflection
|
||||
{
|
||||
ShaderDebugChunk DebugInfo;
|
||||
@@ -279,6 +301,8 @@ struct ShaderReflection
|
||||
rdctype::array<rdctype::str> Interfaces;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(ShaderReflection);
|
||||
|
||||
struct BindpointMap
|
||||
{
|
||||
BindpointMap()
|
||||
@@ -310,6 +334,8 @@ struct BindpointMap
|
||||
uint32_t arraySize;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(BindpointMap);
|
||||
|
||||
struct ShaderBindpointMapping
|
||||
{
|
||||
rdctype::array<int> InputAttributes;
|
||||
@@ -317,3 +343,5 @@ struct ShaderBindpointMapping
|
||||
rdctype::array<BindpointMap> ReadOnlyResources;
|
||||
rdctype::array<BindpointMap> ReadWriteResources;
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(ShaderBindpointMapping);
|
||||
|
||||
@@ -407,3 +407,36 @@ struct State
|
||||
};
|
||||
|
||||
}; // namespace VKPipe
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::BindingElement);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::DescriptorBinding);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::DescriptorSet);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::Pipeline);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::IB);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::InputAssembly);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::VertexAttribute);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::VertexBinding);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::VB);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::VertexInput);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::SpecInfo);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::Shader);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::Tessellation);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::Viewport);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::Scissor);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::ViewportScissor);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::ViewState);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::Raster);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::MultiSample);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::BlendOp);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::Blend);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::ColorBlend);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::StencilOp);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::DepthStencil);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::RenderPass);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::Attachment);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::Framebuffer);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::RenderArea);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::CurrentPass);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::ImageLayout);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::ImageData);
|
||||
DECLARE_REFLECTION_STRUCT(VKPipe::State);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "api/replay/shader_types.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
#include "common/common.h"
|
||||
#include "dxbc_disassemble.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user