Update bindings to 93bf53426840fd052da2aeb6d5a5a6f380f4c21a

Importantly, this brings in a fix for SDL's gendynapi.py throwing an error.
This commit is contained in:
Susko3 2024-09-15 01:37:32 +01:00
parent 03f3773985
commit edb9a6b69d
3 changed files with 71 additions and 24 deletions

View File

@ -175,6 +175,7 @@ namespace SDL
SDL_GPU_TEXTURETYPE_2D_ARRAY,
SDL_GPU_TEXTURETYPE_3D,
SDL_GPU_TEXTURETYPE_CUBE,
SDL_GPU_TEXTURETYPE_CUBE_ARRAY,
}
public enum SDL_GPUSampleCount
@ -355,16 +356,6 @@ namespace SDL
SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2048,
}
public enum SDL_GPUDriver
{
SDL_GPU_DRIVER_INVALID,
SDL_GPU_DRIVER_PRIVATE,
SDL_GPU_DRIVER_VULKAN,
SDL_GPU_DRIVER_D3D11,
SDL_GPU_DRIVER_D3D12,
SDL_GPU_DRIVER_METAL,
}
public partial struct SDL_GPUViewport
{
public float x;
@ -575,10 +566,10 @@ namespace SDL
public SDL_PropertiesID props;
}
public partial struct SDL_GPUVertexBinding
public partial struct SDL_GPUVertexBufferDescription
{
[NativeTypeName("Uint32")]
public uint index;
public uint slot;
[NativeTypeName("Uint32")]
public uint pitch;
@ -595,7 +586,7 @@ namespace SDL
public uint location;
[NativeTypeName("Uint32")]
public uint binding_index;
public uint buffer_slot;
public SDL_GPUVertexElementFormat format;
@ -605,11 +596,11 @@ namespace SDL
public unsafe partial struct SDL_GPUVertexInputState
{
[NativeTypeName("const SDL_GPUVertexBinding *")]
public SDL_GPUVertexBinding* vertex_bindings;
[NativeTypeName("const SDL_GPUVertexBufferDescription *")]
public SDL_GPUVertexBufferDescription* vertex_buffer_descriptions;
[NativeTypeName("Uint32")]
public uint num_vertex_bindings;
public uint num_vertex_buffers;
[NativeTypeName("const SDL_GPUVertexAttribute *")]
public SDL_GPUVertexAttribute* vertex_attributes;
@ -1034,6 +1025,12 @@ namespace SDL
public static unsafe partial class SDL3
{
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern SDL_bool SDL_GPUSupportsShaderFormats(SDL_GPUShaderFormat format_flags, [NativeTypeName("const char *")] byte* name);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern SDL_bool SDL_GPUSupportsProperties(SDL_PropertiesID props);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern SDL_GPUDevice* SDL_CreateGPUDevice(SDL_GPUShaderFormat format_flags, SDL_bool debug_mode, [NativeTypeName("const char *")] byte* name);
@ -1044,7 +1041,18 @@ namespace SDL
public static extern void SDL_DestroyGPUDevice(SDL_GPUDevice* device);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern SDL_GPUDriver SDL_GetGPUDriver(SDL_GPUDevice* device);
public static extern int SDL_GetNumGPUDrivers();
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGPUDriver", ExactSpelling = true)]
[return: NativeTypeName("const char *")]
public static extern byte* Unsafe_SDL_GetGPUDriver(int index);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGPUDeviceDriver", ExactSpelling = true)]
[return: NativeTypeName("const char *")]
public static extern byte* Unsafe_SDL_GetGPUDeviceDriver(SDL_GPUDevice* device);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern SDL_GPUShaderFormat SDL_GetGPUShaderFormats(SDL_GPUDevice* device);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern SDL_GPUComputePipeline* SDL_CreateGPUComputePipeline(SDL_GPUDevice* device, [NativeTypeName("const SDL_GPUComputePipelineCreateInfo *")] SDL_GPUComputePipelineCreateInfo* createinfo);
@ -1134,7 +1142,7 @@ namespace SDL
public static extern void SDL_SetGPUStencilReference(SDL_GPURenderPass* render_pass, [NativeTypeName("Uint8")] byte reference);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_BindGPUVertexBuffers(SDL_GPURenderPass* render_pass, [NativeTypeName("Uint32")] uint first_binding, [NativeTypeName("const SDL_GPUBufferBinding *")] SDL_GPUBufferBinding* bindings, [NativeTypeName("Uint32")] uint num_bindings);
public static extern void SDL_BindGPUVertexBuffers(SDL_GPURenderPass* render_pass, [NativeTypeName("Uint32")] uint first_slot, [NativeTypeName("const SDL_GPUBufferBinding *")] SDL_GPUBufferBinding* bindings, [NativeTypeName("Uint32")] uint num_bindings);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_BindGPUIndexBuffer(SDL_GPURenderPass* render_pass, [NativeTypeName("const SDL_GPUBufferBinding *")] SDL_GPUBufferBinding* binding, SDL_GPUIndexElementSize index_element_size);
@ -1164,10 +1172,10 @@ namespace SDL
public static extern void SDL_DrawGPUPrimitives(SDL_GPURenderPass* render_pass, [NativeTypeName("Uint32")] uint num_vertices, [NativeTypeName("Uint32")] uint num_instances, [NativeTypeName("Uint32")] uint first_vertex, [NativeTypeName("Uint32")] uint first_instance);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_DrawGPUPrimitivesIndirect(SDL_GPURenderPass* render_pass, SDL_GPUBuffer* buffer, [NativeTypeName("Uint32")] uint offset, [NativeTypeName("Uint32")] uint draw_count, [NativeTypeName("Uint32")] uint pitch);
public static extern void SDL_DrawGPUPrimitivesIndirect(SDL_GPURenderPass* render_pass, SDL_GPUBuffer* buffer, [NativeTypeName("Uint32")] uint offset, [NativeTypeName("Uint32")] uint draw_count);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_DrawGPUIndexedPrimitivesIndirect(SDL_GPURenderPass* render_pass, SDL_GPUBuffer* buffer, [NativeTypeName("Uint32")] uint offset, [NativeTypeName("Uint32")] uint draw_count, [NativeTypeName("Uint32")] uint pitch);
public static extern void SDL_DrawGPUIndexedPrimitivesIndirect(SDL_GPURenderPass* render_pass, SDL_GPUBuffer* buffer, [NativeTypeName("Uint32")] uint offset, [NativeTypeName("Uint32")] uint draw_count);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_EndGPURenderPass(SDL_GPURenderPass* render_pass);

View File

@ -62,6 +62,9 @@ namespace SDL
[NativeTypeName("size_t (*)(void *, const void *, size_t, SDL_IOStatus *)")]
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, nuint, SDL_IOStatus*, nuint> write;
[NativeTypeName("SDL_bool (*)(void *, SDL_IOStatus *)")]
public delegate* unmanaged[Cdecl]<IntPtr, SDL_IOStatus*, SDL_bool> flush;
[NativeTypeName("SDL_bool (*)(void *)")]
public delegate* unmanaged[Cdecl]<IntPtr, SDL_bool> close;
}
@ -124,6 +127,9 @@ namespace SDL
[return: NativeTypeName("size_t")]
public static extern nuint SDL_IOvprintf(SDL_IOStream* context, [NativeTypeName("const char *")] byte* fmt, [NativeTypeName("va_list")] byte* ap);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern SDL_bool SDL_FlushIO(SDL_IOStream* context);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("void*")]
public static extern IntPtr SDL_LoadFile_IO(SDL_IOStream* src, [NativeTypeName("size_t *")] nuint* datasize, SDL_bool closeio);
@ -222,6 +228,9 @@ namespace SDL
[NativeTypeName("#define SDL_PROP_IOSTREAM_STDIO_FILE_POINTER \"SDL.iostream.stdio.file\"")]
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_STDIO_FILE_POINTER => "SDL.iostream.stdio.file"u8;
[NativeTypeName("#define SDL_PROP_IOSTREAM_FILE_DESCRIPTOR_NUMBER \"SDL.iostream.file_descriptor\"")]
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_FILE_DESCRIPTOR_NUMBER => "SDL.iostream.file_descriptor"u8;
[NativeTypeName("#define SDL_PROP_IOSTREAM_ANDROID_AASSET_POINTER \"SDL.iostream.android.aasset\"")]
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_ANDROID_AASSET_POINTER => "SDL.iostream.android.aasset"u8;

View File

@ -42,6 +42,10 @@ namespace SDL
DUMMY_ENUM_VALUE,
}
public partial struct SDL_Environment
{
}
public partial struct SDL_iconv_data_t
{
}
@ -82,15 +86,41 @@ namespace SDL
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern int SDL_GetNumAllocations();
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_getenv", ExactSpelling = true)]
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern SDL_Environment* SDL_GetEnvironment();
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_CleanupEnvironment();
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern SDL_Environment* SDL_CreateEnvironment(SDL_bool populated);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetEnvironmentVariable", ExactSpelling = true)]
[return: NativeTypeName("const char *")]
public static extern byte* Unsafe_SDL_getenv([NativeTypeName("const char *")] byte* name);
public static extern byte* Unsafe_SDL_GetEnvironmentVariable(SDL_Environment* env, [NativeTypeName("const char *")] byte* name);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern int SDL_setenv([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, int overwrite);
[return: NativeTypeName("char **")]
public static extern byte** SDL_GetEnvironmentVariables(SDL_Environment* env);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern int SDL_unsetenv([NativeTypeName("const char *")] byte* name);
public static extern SDL_bool SDL_SetEnvironmentVariable(SDL_Environment* env, [NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, SDL_bool overwrite);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern SDL_bool SDL_UnsetEnvironmentVariable(SDL_Environment* env, [NativeTypeName("const char *")] byte* name);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_DestroyEnvironment(SDL_Environment* env);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_getenv_unsafe", ExactSpelling = true)]
[return: NativeTypeName("const char *")]
public static extern byte* Unsafe_SDL_getenv_unsafe([NativeTypeName("const char *")] byte* name);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern int SDL_setenv_unsafe([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, int overwrite);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern int SDL_unsetenv_unsafe([NativeTypeName("const char *")] byte* name);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_qsort([NativeTypeName("void*")] IntPtr @base, [NativeTypeName("size_t")] nuint nmemb, [NativeTypeName("size_t")] nuint size, [NativeTypeName("SDL_CompareCallback")] delegate* unmanaged[Cdecl]<IntPtr, IntPtr, int> compare);