mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Enforce python bindings rdcarray instantiations, and add missing ones
This commit is contained in:
@@ -210,10 +210,7 @@ LIST_MODIFY_IN_PLACE_TYPEMAP(typeName)
|
||||
// passing pure lists that aren't C++ side at all).
|
||||
%header %{
|
||||
template<typename innerType>
|
||||
void ARRAY_INSTANTIATION_CHECK_NAME(typeName)(typeName<innerType> *)
|
||||
{
|
||||
// TODO remove this to make it an error to miss the instantiation of this array type
|
||||
}
|
||||
void ARRAY_INSTANTIATION_CHECK_NAME(typeName)(typeName<innerType> *);
|
||||
%}
|
||||
|
||||
// override these typemaps to instantiate a checking template.
|
||||
@@ -257,3 +254,24 @@ void ARRAY_INSTANTIATION_CHECK_NAME(arrayType)(arrayType<innerType> *)
|
||||
%}
|
||||
|
||||
%enddef
|
||||
|
||||
%define TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(arrayType, nspace, innerType)
|
||||
|
||||
ARRAY_ADD_SLOTS(arrayType<nspace::innerType>, arrayType##_of_##nspace##_##innerType)
|
||||
|
||||
// instantiate template
|
||||
%rename(arrayType##_of_##nspace##_##innerType) arrayType<nspace::innerType>;
|
||||
%template(arrayType##_of_##nspace##_##innerType) arrayType<nspace::innerType>;
|
||||
|
||||
ARRAY_DEFINE_SLOTS(arrayType<nspace::innerType>, arrayType##_of_##nspace##_##innerType)
|
||||
|
||||
%header %{
|
||||
|
||||
template<>
|
||||
void ARRAY_INSTANTIATION_CHECK_NAME(arrayType)(arrayType<nspace::innerType> *)
|
||||
{
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
%enddef
|
||||
|
||||
@@ -178,8 +178,78 @@ EXTEND_ARRAY_CLASS_METHODS(StructuredBufferList)
|
||||
// If you get an error with add_your_use_of_rdcarray_to_swig_interface missing, add your type here
|
||||
// or in qrenderdoc.i, depending on which one is appropriate
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, int)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, rdcstr)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, float)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, uint32_t)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, uint64_t)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, rdcstr)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, WindowingSystem)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, DrawcallDescription)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, GPUCounter)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, CounterResult)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, APIEvent)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, BindpointMap)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, BufferDescription)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, CaptureFileFormat)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, ConstantBlock)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, DebugMessage)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, EnvironmentModification)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, EventUsage)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, PathEntry)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, PixelModification)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, ResourceDescription)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, ResourceId)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, ShaderCompileFlag)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, ShaderConstant)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, ShaderDebugState)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, ShaderResource)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, ShaderSampler)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, ShaderSourceFile)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, ShaderVariable)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, SigParameter)
|
||||
TEMPLATE_ARRAY_INSTANTIATE(rdcarray, TextureDescription)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, VKPipe, Attachment)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, VKPipe, BindingElement)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, VKPipe, Blend)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, VKPipe, DescriptorBinding)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, VKPipe, DescriptorSet)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, VKPipe, ImageData)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, VKPipe, ImageLayout)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, VKPipe, SpecInfo)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, VKPipe, VB)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, VKPipe, VertexAttribute)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, VKPipe, VertexBinding)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, VKPipe, ViewportScissor)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D11Pipe, Blend)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D11Pipe, CBuffer)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D11Pipe, Layout)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D11Pipe, Sampler)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D11Pipe, Scissor)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D11Pipe, SOBind)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D11Pipe, VB)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D11Pipe, View)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D11Pipe, Viewport)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D12Pipe, Blend)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D12Pipe, CBuffer)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D12Pipe, Layout)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D12Pipe, RegisterSpace)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D12Pipe, ResourceData)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D12Pipe, ResourceState)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D12Pipe, Sampler)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D12Pipe, Scissor)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D12Pipe, SOBind)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D12Pipe, VB)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D12Pipe, View)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, D3D12Pipe, Viewport)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, GLPipe, Attachment)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, GLPipe, Blend)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, GLPipe, Buffer)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, GLPipe, ImageLoadStore)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, GLPipe, Sampler)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, GLPipe, Scissor)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, GLPipe, Texture)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, GLPipe, VB)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, GLPipe, VertexAttribute)
|
||||
TEMPLATE_NAMESPACE_ARRAY_INSTANTIATE(rdcarray, GLPipe, Viewport)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// declare a function for passing external objects into python
|
||||
|
||||
@@ -150,37 +150,6 @@ struct XCBWindowData
|
||||
|
||||
#endif
|
||||
|
||||
DOCUMENT(R"(Specifies a windowing system to use for creating an output window.
|
||||
|
||||
.. data:: Unknown
|
||||
|
||||
No windowing data is passed and no native window will be output to.
|
||||
|
||||
.. data:: Win32
|
||||
|
||||
The windowing data refers to a Win32 ``HWND`` handle.
|
||||
|
||||
.. data:: Xlib
|
||||
|
||||
The windowing data refers to an Xlib pair of ``Display *`` and ``Drawable``.
|
||||
|
||||
.. data:: XCB
|
||||
|
||||
The windowing data refers to an XCB pair of ``xcb_connection_t *`` and ``xcb_window_t``.
|
||||
|
||||
.. data:: Android
|
||||
|
||||
The windowing data refers to an Android ``ANativeWindow *``.
|
||||
)");
|
||||
enum class WindowingSystem : uint32_t
|
||||
{
|
||||
Unknown,
|
||||
Win32,
|
||||
Xlib,
|
||||
XCB,
|
||||
Android,
|
||||
};
|
||||
|
||||
DOCUMENT(R"(Internal structure used for initialising environment in a replay application.)");
|
||||
struct GlobalEnvironment
|
||||
{
|
||||
@@ -338,6 +307,39 @@ inline enum_name operator++(enum_name &a) \
|
||||
#include "stringise.h"
|
||||
#include "structured_data.h"
|
||||
|
||||
DOCUMENT(R"(Specifies a windowing system to use for creating an output window.
|
||||
|
||||
.. data:: Unknown
|
||||
|
||||
No windowing data is passed and no native window will be output to.
|
||||
|
||||
.. data:: Win32
|
||||
|
||||
The windowing data refers to a Win32 ``HWND`` handle.
|
||||
|
||||
.. data:: Xlib
|
||||
|
||||
The windowing data refers to an Xlib pair of ``Display *`` and ``Drawable``.
|
||||
|
||||
.. data:: XCB
|
||||
|
||||
The windowing data refers to an XCB pair of ``xcb_connection_t *`` and ``xcb_window_t``.
|
||||
|
||||
.. data:: Android
|
||||
|
||||
The windowing data refers to an Android ``ANativeWindow *``.
|
||||
)");
|
||||
enum class WindowingSystem : uint32_t
|
||||
{
|
||||
Unknown,
|
||||
Win32,
|
||||
Xlib,
|
||||
XCB,
|
||||
Android,
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_ENUM(WindowingSystem);
|
||||
|
||||
#ifdef RENDERDOC_EXPORTS
|
||||
struct ResourceId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user