mirror of https://github.com/ppy/SDL3-CS.git
Generate bindings
This commit is contained in:
parent
3814ee7ce3
commit
4ab453b73b
|
|
@ -0,0 +1,248 @@
|
|||
/*
|
||||
<auto-generated/>
|
||||
C# bindings for Simple DirectMedia Layer.
|
||||
Original copyright notice of input files:
|
||||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
public enum SDL_ShaderCross_IOVarType
|
||||
{
|
||||
SDL_SHADERCROSS_IOVAR_TYPE_UNKNOWN,
|
||||
SDL_SHADERCROSS_IOVAR_TYPE_INT8,
|
||||
SDL_SHADERCROSS_IOVAR_TYPE_UINT8,
|
||||
SDL_SHADERCROSS_IOVAR_TYPE_INT16,
|
||||
SDL_SHADERCROSS_IOVAR_TYPE_UINT16,
|
||||
SDL_SHADERCROSS_IOVAR_TYPE_INT32,
|
||||
SDL_SHADERCROSS_IOVAR_TYPE_UINT32,
|
||||
SDL_SHADERCROSS_IOVAR_TYPE_INT64,
|
||||
SDL_SHADERCROSS_IOVAR_TYPE_UINT64,
|
||||
SDL_SHADERCROSS_IOVAR_TYPE_FLOAT16,
|
||||
SDL_SHADERCROSS_IOVAR_TYPE_FLOAT32,
|
||||
SDL_SHADERCROSS_IOVAR_TYPE_FLOAT64,
|
||||
}
|
||||
|
||||
public enum SDL_ShaderCross_ShaderStage
|
||||
{
|
||||
SDL_SHADERCROSS_SHADERSTAGE_VERTEX,
|
||||
SDL_SHADERCROSS_SHADERSTAGE_FRAGMENT,
|
||||
SDL_SHADERCROSS_SHADERSTAGE_COMPUTE,
|
||||
}
|
||||
|
||||
public unsafe partial struct SDL_ShaderCross_IOVarMetadata
|
||||
{
|
||||
[NativeTypeName("char *")]
|
||||
public byte* name;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint location;
|
||||
|
||||
public SDL_ShaderCross_IOVarType vector_type;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint vector_size;
|
||||
}
|
||||
|
||||
public unsafe partial struct SDL_ShaderCross_GraphicsShaderMetadata
|
||||
{
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint num_samplers;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint num_storage_textures;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint num_storage_buffers;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint num_uniform_buffers;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint num_inputs;
|
||||
|
||||
public SDL_ShaderCross_IOVarMetadata* inputs;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint num_outputs;
|
||||
|
||||
public SDL_ShaderCross_IOVarMetadata* outputs;
|
||||
}
|
||||
|
||||
public partial struct SDL_ShaderCross_ComputePipelineMetadata
|
||||
{
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint num_samplers;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint num_readonly_storage_textures;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint num_readonly_storage_buffers;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint num_readwrite_storage_textures;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint num_readwrite_storage_buffers;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint num_uniform_buffers;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint threadcount_x;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint threadcount_y;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint threadcount_z;
|
||||
}
|
||||
|
||||
public unsafe partial struct SDL_ShaderCross_SPIRV_Info
|
||||
{
|
||||
[NativeTypeName("const Uint8 *")]
|
||||
public byte* bytecode;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public nuint bytecode_size;
|
||||
|
||||
[NativeTypeName("const char *")]
|
||||
public byte* entrypoint;
|
||||
|
||||
public SDL_ShaderCross_ShaderStage shader_stage;
|
||||
|
||||
[NativeTypeName("bool")]
|
||||
public SDLBool enable_debug;
|
||||
|
||||
[NativeTypeName("const char *")]
|
||||
public byte* name;
|
||||
|
||||
public SDL_PropertiesID props;
|
||||
}
|
||||
|
||||
public unsafe partial struct SDL_ShaderCross_HLSL_Define
|
||||
{
|
||||
[NativeTypeName("char *")]
|
||||
public byte* name;
|
||||
|
||||
[NativeTypeName("char *")]
|
||||
public byte* value;
|
||||
}
|
||||
|
||||
public unsafe partial struct SDL_ShaderCross_HLSL_Info
|
||||
{
|
||||
[NativeTypeName("const char *")]
|
||||
public byte* source;
|
||||
|
||||
[NativeTypeName("const char *")]
|
||||
public byte* entrypoint;
|
||||
|
||||
[NativeTypeName("const char *")]
|
||||
public byte* include_dir;
|
||||
|
||||
public SDL_ShaderCross_HLSL_Define* defines;
|
||||
|
||||
public SDL_ShaderCross_ShaderStage shader_stage;
|
||||
|
||||
[NativeTypeName("bool")]
|
||||
public SDLBool enable_debug;
|
||||
|
||||
[NativeTypeName("const char *")]
|
||||
public byte* name;
|
||||
|
||||
public SDL_PropertiesID props;
|
||||
}
|
||||
|
||||
public static unsafe partial class SDL3_shadercross
|
||||
{
|
||||
[DllImport("SDL3_shadercross", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_ShaderCross_Init();
|
||||
|
||||
[DllImport("SDL3_shadercross", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_ShaderCross_Quit();
|
||||
|
||||
[DllImport("SDL3_shadercross", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_GPUShaderFormat SDL_ShaderCross_GetSPIRVShaderFormats();
|
||||
|
||||
[DllImport("SDL3_shadercross", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
public static extern IntPtr SDL_ShaderCross_TranspileMSLFromSPIRV([NativeTypeName("const SDL_ShaderCross_SPIRV_Info *")] SDL_ShaderCross_SPIRV_Info* info);
|
||||
|
||||
[DllImport("SDL3_shadercross", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
public static extern IntPtr SDL_ShaderCross_TranspileHLSLFromSPIRV([NativeTypeName("const SDL_ShaderCross_SPIRV_Info *")] SDL_ShaderCross_SPIRV_Info* info);
|
||||
|
||||
[DllImport("SDL3_shadercross", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
public static extern IntPtr SDL_ShaderCross_CompileDXBCFromSPIRV([NativeTypeName("const SDL_ShaderCross_SPIRV_Info *")] SDL_ShaderCross_SPIRV_Info* info, [NativeTypeName("size_t *")] nuint* size);
|
||||
|
||||
[DllImport("SDL3_shadercross", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
public static extern IntPtr SDL_ShaderCross_CompileDXILFromSPIRV([NativeTypeName("const SDL_ShaderCross_SPIRV_Info *")] SDL_ShaderCross_SPIRV_Info* info, [NativeTypeName("size_t *")] nuint* size);
|
||||
|
||||
[DllImport("SDL3_shadercross", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_GPUShader* SDL_ShaderCross_CompileGraphicsShaderFromSPIRV(SDL_GPUDevice* device, [NativeTypeName("const SDL_ShaderCross_SPIRV_Info *")] SDL_ShaderCross_SPIRV_Info* info, [NativeTypeName("const SDL_ShaderCross_GraphicsShaderMetadata *")] SDL_ShaderCross_GraphicsShaderMetadata* metadata, SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3_shadercross", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_GPUComputePipeline* SDL_ShaderCross_CompileComputePipelineFromSPIRV(SDL_GPUDevice* device, [NativeTypeName("const SDL_ShaderCross_SPIRV_Info *")] SDL_ShaderCross_SPIRV_Info* info, [NativeTypeName("const SDL_ShaderCross_ComputePipelineMetadata *")] SDL_ShaderCross_ComputePipelineMetadata* metadata, SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3_shadercross", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_ShaderCross_GraphicsShaderMetadata* SDL_ShaderCross_ReflectGraphicsSPIRV([NativeTypeName("const Uint8 *")] byte* bytecode, [NativeTypeName("size_t")] nuint bytecode_size, SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3_shadercross", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_ShaderCross_ComputePipelineMetadata* SDL_ShaderCross_ReflectComputeSPIRV([NativeTypeName("const Uint8 *")] byte* bytecode, [NativeTypeName("size_t")] nuint bytecode_size, SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3_shadercross", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_GPUShaderFormat SDL_ShaderCross_GetHLSLShaderFormats();
|
||||
|
||||
[DllImport("SDL3_shadercross", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
public static extern IntPtr SDL_ShaderCross_CompileDXBCFromHLSL([NativeTypeName("const SDL_ShaderCross_HLSL_Info *")] SDL_ShaderCross_HLSL_Info* info, [NativeTypeName("size_t *")] nuint* size);
|
||||
|
||||
[DllImport("SDL3_shadercross", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
public static extern IntPtr SDL_ShaderCross_CompileDXILFromHLSL([NativeTypeName("const SDL_ShaderCross_HLSL_Info *")] SDL_ShaderCross_HLSL_Info* info, [NativeTypeName("size_t *")] nuint* size);
|
||||
|
||||
[DllImport("SDL3_shadercross", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
public static extern IntPtr SDL_ShaderCross_CompileSPIRVFromHLSL([NativeTypeName("const SDL_ShaderCross_HLSL_Info *")] SDL_ShaderCross_HLSL_Info* info, [NativeTypeName("size_t *")] nuint* size);
|
||||
|
||||
[NativeTypeName("#define SDL_SHADERCROSS_MAJOR_VERSION 3")]
|
||||
public const int SDL_SHADERCROSS_MAJOR_VERSION = 3;
|
||||
|
||||
[NativeTypeName("#define SDL_SHADERCROSS_MINOR_VERSION 0")]
|
||||
public const int SDL_SHADERCROSS_MINOR_VERSION = 0;
|
||||
|
||||
[NativeTypeName("#define SDL_SHADERCROSS_MICRO_VERSION 0")]
|
||||
public const int SDL_SHADERCROSS_MICRO_VERSION = 0;
|
||||
|
||||
[NativeTypeName("#define SDL_SHADERCROSS_PROP_SPIRV_PSSL_COMPATIBILITY \"SDL.shadercross.spirv.pssl.compatibility\"")]
|
||||
public static ReadOnlySpan<byte> SDL_SHADERCROSS_PROP_SPIRV_PSSL_COMPATIBILITY => "SDL.shadercross.spirv.pssl.compatibility"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_SHADERCROSS_PROP_SPIRV_MSL_VERSION \"SDL.shadercross.spirv.msl.version\"")]
|
||||
public static ReadOnlySpan<byte> SDL_SHADERCROSS_PROP_SPIRV_MSL_VERSION => "SDL.shadercross.spirv.msl.version"u8;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue