4#include <SDL3/SDL_gpu.h>
5#include "SDL3pp_pixels.h"
6#include "SDL3pp_properties.h"
7#include "SDL3pp_rect.h"
8#include "SDL3pp_stdinc.h"
9#include "SDL3pp_surface.h"
10#include "SDL3pp_video.h"
500 : m_gPUBuffer(gPUBuffer)
554 constexpr operator GPUBufferRaw() const noexcept {
return m_gPUBuffer; }
594 : m_gPUTransferBuffer(gPUTransferBuffer)
635 return m_gPUTransferBuffer;
685 : m_gPUTexture(gPUTexture)
794 : m_gPUSampler(gPUSampler)
860 : m_gPUShader(gPUShader)
944 constexpr operator GPUShaderRaw() const noexcept {
return m_gPUShader; }
980 : m_gPUComputePipeline(gPUComputePipeline)
1039 return m_gPUComputePipeline;
1082 : m_gPUGraphicsPipeline(gPUGraphicsPipeline)
1117 return m_gPUGraphicsPipeline;
1150 SDL_GPU_INDEXELEMENTSIZE_16BIT;
1153 SDL_GPU_INDEXELEMENTSIZE_32BIT;
1189 : m_gPURenderPass(gPURenderPass)
1200 return m_gPURenderPass;
1264 std::span<const GPUBufferBinding> bindings);
1300 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings);
1364 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings);
1531 : m_gPUComputePass(gPUComputePass)
1542 return m_gPUComputePass;
1575 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings);
1776 : m_gPUCopyPass(gPUCopyPass)
2074 : m_gPUCommandBuffer(gPUCommandBuffer)
2085 return m_gPUCommandBuffer;
2227 std::span<const GPUColorTargetInfo> color_target_infos,
2263 std::span<const GPUStorageTextureReadWriteBinding> storage_texture_bindings,
2264 std::span<const GPUStorageBufferReadWriteBinding> storage_buffer_bindings);
2350 Uint32* swapchain_texture_width =
nullptr,
2351 Uint32* swapchain_texture_height =
nullptr);
2394 Uint32* swapchain_texture_width =
nullptr,
2395 Uint32* swapchain_texture_height =
nullptr);
2478 SDL_GPU_SHADERFORMAT_INVALID;
2481 SDL_GPU_SHADERFORMAT_PRIVATE;
2484 SDL_GPU_SHADERFORMAT_SPIRV;
2487 SDL_GPU_SHADERFORMAT_DXBC;
2490 SDL_GPU_SHADERFORMAT_DXIL;
2493 SDL_GPU_SHADERFORMAT_MSL;
2496 SDL_GPU_SHADERFORMAT_METALLIB;
2526 SDL_GPU_SWAPCHAINCOMPOSITION_SDR;
2529 SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR;
2532 SDL_GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR;
2535 SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084;
2565 SDL_GPU_PRESENTMODE_VSYNC;
2568 SDL_GPU_PRESENTMODE_IMMEDIATE;
2571 SDL_GPU_PRESENTMODE_MAILBOX;
2657 SDL_GPU_TEXTUREFORMAT_INVALID;
2660 SDL_GPU_TEXTUREFORMAT_A8_UNORM;
2663 SDL_GPU_TEXTUREFORMAT_R8_UNORM;
2666 SDL_GPU_TEXTUREFORMAT_R8G8_UNORM;
2669 SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM;
2672 SDL_GPU_TEXTUREFORMAT_R16_UNORM;
2675 SDL_GPU_TEXTUREFORMAT_R16G16_UNORM;
2678 SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UNORM;
2681 SDL_GPU_TEXTUREFORMAT_R10G10B10A2_UNORM;
2684 SDL_GPU_TEXTUREFORMAT_B5G6R5_UNORM;
2687 SDL_GPU_TEXTUREFORMAT_B5G5R5A1_UNORM;
2690 SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM;
2693 SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM;
2696 SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM;
2699 SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM;
2702 SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM;
2705 SDL_GPU_TEXTUREFORMAT_BC4_R_UNORM;
2708 SDL_GPU_TEXTUREFORMAT_BC5_RG_UNORM;
2711 SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM;
2714 SDL_GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT;
2717 SDL_GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT;
2720 SDL_GPU_TEXTUREFORMAT_R8_SNORM;
2723 SDL_GPU_TEXTUREFORMAT_R8G8_SNORM;
2726 SDL_GPU_TEXTUREFORMAT_R8G8B8A8_SNORM;
2729 SDL_GPU_TEXTUREFORMAT_R16_SNORM;
2732 SDL_GPU_TEXTUREFORMAT_R16G16_SNORM;
2735 SDL_GPU_TEXTUREFORMAT_R16G16B16A16_SNORM;
2738 SDL_GPU_TEXTUREFORMAT_R16_FLOAT;
2741 SDL_GPU_TEXTUREFORMAT_R16G16_FLOAT;
2744 SDL_GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT;
2747 SDL_GPU_TEXTUREFORMAT_R32_FLOAT;
2750 SDL_GPU_TEXTUREFORMAT_R32G32_FLOAT;
2753 SDL_GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT;
2756 SDL_GPU_TEXTUREFORMAT_R11G11B10_UFLOAT;
2759 SDL_GPU_TEXTUREFORMAT_R8_UINT;
2762 SDL_GPU_TEXTUREFORMAT_R8G8_UINT;
2765 SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UINT;
2768 SDL_GPU_TEXTUREFORMAT_R16_UINT;
2771 SDL_GPU_TEXTUREFORMAT_R16G16_UINT;
2774 SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UINT;
2777 SDL_GPU_TEXTUREFORMAT_R32_UINT;
2780 SDL_GPU_TEXTUREFORMAT_R32G32_UINT;
2783 SDL_GPU_TEXTUREFORMAT_R32G32B32A32_UINT;
2786 SDL_GPU_TEXTUREFORMAT_R8_INT;
2789 SDL_GPU_TEXTUREFORMAT_R8G8_INT;
2792 SDL_GPU_TEXTUREFORMAT_R8G8B8A8_INT;
2795 SDL_GPU_TEXTUREFORMAT_R16_INT;
2798 SDL_GPU_TEXTUREFORMAT_R16G16_INT;
2801 SDL_GPU_TEXTUREFORMAT_R16G16B16A16_INT;
2804 SDL_GPU_TEXTUREFORMAT_R32_INT;
2807 SDL_GPU_TEXTUREFORMAT_R32G32_INT;
2810 SDL_GPU_TEXTUREFORMAT_R32G32B32A32_INT;
2813 SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB;
2816 SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB;
2819 SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB;
2822 SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB;
2825 SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB;
2828 SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB;
2831 SDL_GPU_TEXTUREFORMAT_D16_UNORM;
2834 SDL_GPU_TEXTUREFORMAT_D24_UNORM;
2837 SDL_GPU_TEXTUREFORMAT_D32_FLOAT;
2840 SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT;
2843 SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT;
2846 SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM;
2849 SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM;
2852 SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM;
2855 SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM;
2858 SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM;
2861 SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM;
2864 SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM;
2867 SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM;
2870 SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM;
2873 SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM;
2876 SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM;
2879 SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM;
2882 SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM;
2885 SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM;
2888 SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB;
2891 SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB;
2894 SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB;
2897 SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB;
2900 SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB;
2903 SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB;
2906 SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB;
2909 SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB;
2912 SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB;
2915 SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB;
2918 SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB;
2921 SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB;
2924 SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB;
2927 SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB;
2930 SDL_GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT;
2933 SDL_GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT;
2936 SDL_GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT;
2939 SDL_GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT;
2942 SDL_GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT;
2945 SDL_GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT;
2948 SDL_GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT;
2951 SDL_GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT;
2954 SDL_GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT;
2957 SDL_GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT;
2960 SDL_GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT;
2963 SDL_GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT;
2966 SDL_GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT;
2969 SDL_GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT;
2981 SDL_GPU_TEXTURETYPE_2D;
2984 SDL_GPU_TEXTURETYPE_2D_ARRAY;
2987 SDL_GPU_TEXTURETYPE_3D;
2990 SDL_GPU_TEXTURETYPE_CUBE;
2993 SDL_GPU_TEXTURETYPE_CUBE_ARRAY;
3018 SDL_GPU_TEXTUREUSAGE_SAMPLER;
3021 SDL_GPU_TEXTUREUSAGE_COLOR_TARGET;
3024 SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET;
3028 SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ;
3033 SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ;
3037 SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE;
3045 SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE;
3061 SDL_GPU_SAMPLECOUNT_1;
3106#if SDL_VERSION_ATLEAST(3, 4, 0)
3848 void WaitForFences(
bool wait_all, std::span<GPUFence* const> fences);
3902#ifdef SDL_PLATFORM_GDK
3942 using GPUDeviceBase::GPUDeviceBase;
4137 SDL_GPU_PRIMITIVETYPE_TRIANGLELIST;
4140 SDL_GPU_PRIMITIVETYPE_TRIANGLESTRIP;
4143 SDL_GPU_PRIMITIVETYPE_LINELIST;
4146 SDL_GPU_PRIMITIVETYPE_LINESTRIP;
4149 SDL_GPU_PRIMITIVETYPE_POINTLIST;
4205 SDL_GPU_STOREOP_RESOLVE_AND_STORE;
4217 SDL_GPU_CUBEMAPFACE_POSITIVEX;
4220 SDL_GPU_CUBEMAPFACE_NEGATIVEX;
4223 SDL_GPU_CUBEMAPFACE_POSITIVEY;
4226 SDL_GPU_CUBEMAPFACE_NEGATIVEY;
4229 SDL_GPU_CUBEMAPFACE_POSITIVEZ;
4232 SDL_GPU_CUBEMAPFACE_NEGATIVEZ;
4257 SDL_GPU_BUFFERUSAGE_VERTEX;
4260 SDL_GPU_BUFFERUSAGE_INDEX;
4263 SDL_GPU_BUFFERUSAGE_INDIRECT;
4266 SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ;
4271 SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ;
4275 SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE;
4290 SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD;
4293 SDL_GPU_TRANSFERBUFFERUSAGE_DOWNLOAD;
4305 SDL_GPU_SHADERSTAGE_VERTEX;
4308 SDL_GPU_SHADERSTAGE_FRAGMENT;
4320 SDL_GPU_VERTEXELEMENTFORMAT_INVALID;
4323 SDL_GPU_VERTEXELEMENTFORMAT_INT;
4326 SDL_GPU_VERTEXELEMENTFORMAT_INT2;
4329 SDL_GPU_VERTEXELEMENTFORMAT_INT3;
4332 SDL_GPU_VERTEXELEMENTFORMAT_INT4;
4335 SDL_GPU_VERTEXELEMENTFORMAT_UINT;
4338 SDL_GPU_VERTEXELEMENTFORMAT_UINT2;
4341 SDL_GPU_VERTEXELEMENTFORMAT_UINT3;
4344 SDL_GPU_VERTEXELEMENTFORMAT_UINT4;
4347 SDL_GPU_VERTEXELEMENTFORMAT_FLOAT;
4350 SDL_GPU_VERTEXELEMENTFORMAT_FLOAT2;
4353 SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3;
4356 SDL_GPU_VERTEXELEMENTFORMAT_FLOAT4;
4359 SDL_GPU_VERTEXELEMENTFORMAT_BYTE2;
4362 SDL_GPU_VERTEXELEMENTFORMAT_BYTE4;
4365 SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2;
4368 SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4;
4371 SDL_GPU_VERTEXELEMENTFORMAT_BYTE2_NORM;
4374 SDL_GPU_VERTEXELEMENTFORMAT_BYTE4_NORM;
4377 SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM;
4380 SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM;
4383 SDL_GPU_VERTEXELEMENTFORMAT_SHORT2;
4386 SDL_GPU_VERTEXELEMENTFORMAT_SHORT4;
4389 SDL_GPU_VERTEXELEMENTFORMAT_USHORT2;
4392 SDL_GPU_VERTEXELEMENTFORMAT_USHORT4;
4395 SDL_GPU_VERTEXELEMENTFORMAT_SHORT2_NORM;
4398 SDL_GPU_VERTEXELEMENTFORMAT_SHORT4_NORM;
4401 SDL_GPU_VERTEXELEMENTFORMAT_USHORT2_NORM;
4404 SDL_GPU_VERTEXELEMENTFORMAT_USHORT4_NORM;
4407 SDL_GPU_VERTEXELEMENTFORMAT_HALF2;
4410 SDL_GPU_VERTEXELEMENTFORMAT_HALF4;
4423 SDL_GPU_VERTEXINPUTRATE_VERTEX;
4427 SDL_GPU_VERTEXINPUTRATE_INSTANCE;
4439 SDL_GPU_FILLMODE_FILL;
4442 SDL_GPU_FILLMODE_LINE;
4454 SDL_GPU_CULLMODE_NONE;
4457 SDL_GPU_CULLMODE_FRONT;
4460 SDL_GPU_CULLMODE_BACK;
4477 SDL_GPU_FRONTFACE_COUNTER_CLOCKWISE;
4492 SDL_GPU_COMPAREOP_INVALID;
4495 SDL_GPU_COMPAREOP_NEVER;
4498 SDL_GPU_COMPAREOP_LESS;
4501 SDL_GPU_COMPAREOP_EQUAL;
4504 SDL_GPU_COMPAREOP_LESS_OR_EQUAL;
4508 SDL_GPU_COMPAREOP_GREATER;
4511 SDL_GPU_COMPAREOP_NOT_EQUAL;
4514 SDL_GPU_COMPAREOP_GREATER_OR_EQUAL;
4518 SDL_GPU_COMPAREOP_ALWAYS;
4531 SDL_GPU_STENCILOP_INVALID;
4534 SDL_GPU_STENCILOP_KEEP;
4537 SDL_GPU_STENCILOP_ZERO;
4540 SDL_GPU_STENCILOP_REPLACE;
4544 SDL_GPU_STENCILOP_INCREMENT_AND_CLAMP;
4547 SDL_GPU_STENCILOP_DECREMENT_AND_CLAMP;
4551 SDL_GPU_STENCILOP_INVERT;
4554 SDL_GPU_STENCILOP_INCREMENT_AND_WRAP;
4559 SDL_GPU_STENCILOP_DECREMENT_AND_WRAP;
4575 SDL_GPU_BLENDOP_INVALID;
4585 SDL_GPU_BLENDOP_REVERSE_SUBTRACT;
4588 SDL_GPU_BLENDOP_MIN;
4591 SDL_GPU_BLENDOP_MAX;
4607 SDL_GPU_BLENDFACTOR_INVALID;
4614 SDL_GPU_BLENDFACTOR_SRC_COLOR;
4617 SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_COLOR;
4620 SDL_GPU_BLENDFACTOR_DST_COLOR;
4623 SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_COLOR;
4626 SDL_GPU_BLENDFACTOR_SRC_ALPHA;
4629 SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA;
4632 SDL_GPU_BLENDFACTOR_DST_ALPHA;
4635 SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_ALPHA;
4638 SDL_GPU_BLENDFACTOR_CONSTANT_COLOR;
4641 SDL_GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR;
4644 SDL_GPU_BLENDFACTOR_SRC_ALPHA_SATURATE;
4657 SDL_GPU_COLORCOMPONENT_R;
4660 SDL_GPU_COLORCOMPONENT_G;
4663 SDL_GPU_COLORCOMPONENT_B;
4666 SDL_GPU_COLORCOMPONENT_A;
4678 SDL_GPU_FILTER_NEAREST;
4681 SDL_GPU_FILTER_LINEAR;
4693 SDL_GPU_SAMPLERMIPMAPMODE_NEAREST;
4696 SDL_GPU_SAMPLERMIPMAPMODE_LINEAR;
4709 SDL_GPU_SAMPLERADDRESSMODE_REPEAT;
4714 SDL_GPU_SAMPLERADDRESSMODE_MIRRORED_REPEAT;
4718 SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE;
4915 return SDL_GPUSupportsShaderFormats(format_flags, name);
4930 return SDL_GPUSupportsProperties(props);
4963 return GPUDevice(format_flags, debug_mode, name);
5102 SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN;
5105 SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOLEAN;
5107#if SDL_VERSION_ATLEAST(3, 4, 0)
5110 SDL_PROP_GPU_DEVICE_CREATE_VERBOSE_BOOLEAN;
5115 SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING;
5117#if SDL_VERSION_ATLEAST(3, 4, 0)
5120 SDL_PROP_GPU_DEVICE_CREATE_FEATURE_CLIP_DISTANCE_BOOLEAN;
5124 SDL_PROP_GPU_DEVICE_CREATE_FEATURE_DEPTH_CLAMPING_BOOLEAN;
5129 SDL_PROP_GPU_DEVICE_CREATE_FEATURE_INDIRECT_DRAW_FIRST_INSTANCE_BOOLEAN;
5132 SDL_PROP_GPU_DEVICE_CREATE_FEATURE_ANISOTROPY_BOOLEAN;
5138 SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN;
5142 SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOLEAN;
5145 SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN;
5148 SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN;
5151 SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN;
5154 SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN;
5157#if SDL_VERSION_ATLEAST(3, 4, 0)
5160 SDL_PROP_GPU_DEVICE_CREATE_D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN;
5170 SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING;
5173#if SDL_VERSION_ATLEAST(3, 4, 2)
5176 SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_VERSION_NUMBER;
5182 SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_PATH_STRING;
5188#if SDL_VERSION_ATLEAST(3, 4, 0)
5191 SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN;
5194 SDL_PROP_GPU_DEVICE_CREATE_VULKAN_OPTIONS_POINTER;
5199#if SDL_VERSION_ATLEAST(3, 4, 2)
5202 SDL_PROP_GPU_DEVICE_CREATE_METAL_ALLOW_MACFAMILY1_BOOLEAN;
5210#if SDL_VERSION_ATLEAST(3, 4, 0)
5243 SDL_DestroyGPUDevice(device);
5276inline const char*
GetGPUDriver(
int index) {
return SDL_GetGPUDriver(index); }
5288 return SDL_GetGPUDeviceDriver(device);
5307 return SDL_GetGPUShaderFormats(device);
5315#if SDL_VERSION_ATLEAST(3, 4, 0)
5420 return CheckError(SDL_GetGPUDeviceProperties(device));
5443 SDL_PROP_GPU_DEVICE_NAME_STRING;
5446 SDL_PROP_GPU_DEVICE_DRIVER_NAME_STRING;
5449 SDL_PROP_GPU_DEVICE_DRIVER_VERSION_STRING;
5452 SDL_PROP_GPU_DEVICE_DRIVER_INFO_STRING;
5519 : m_gPUComputePipeline(
5520 CheckError(SDL_CreateGPUComputePipeline(device, &createinfo)))
5532 SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING;
5573 : m_gPUGraphicsPipeline(
5574 CheckError(SDL_CreateGPUGraphicsPipeline(device, &createinfo)))
5586 SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING;
5625 : m_gPUSampler(
CheckError(SDL_CreateGPUSampler(device, &createinfo)))
5637 SDL_PROP_GPU_SAMPLER_CREATE_NAME_STRING;
5726 : m_gPUShader(
CheckError(SDL_CreateGPUShader(device, &createinfo)))
5738 SDL_PROP_GPU_SHADER_CREATE_NAME_STRING;
5814 : m_gPUTexture(
CheckError(SDL_CreateGPUTexture(device, &createinfo)))
5826 SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_R_FLOAT;
5829 SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_G_FLOAT;
5832 SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_B_FLOAT;
5835 SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_A_FLOAT;
5838 SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_DEPTH_FLOAT;
5841#if SDL_VERSION_ATLEAST(3, 2, 12)
5844 SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_NUMBER;
5850 SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING;
5911 : m_gPUBuffer(
CheckError(SDL_CreateGPUBuffer(device, &createinfo)))
5923 SDL_PROP_GPU_BUFFER_CREATE_NAME_STRING;
5970 : m_gPUTransferBuffer(
5971 CheckError(SDL_CreateGPUTransferBuffer(device, &createinfo)))
5983 SDL_PROP_GPU_TRANSFERBUFFER_CREATE_NAME_STRING;
6008 SDL_SetGPUBufferName(device, buffer, text);
6037 SDL_SetGPUTextureName(device, texture, text);
6063 SDL_InsertGPUDebugLabel(command_buffer, text);
6099 SDL_PushGPUDebugGroup(command_buffer, name);
6123 SDL_PopGPUDebugGroup(command_buffer);
6143 SDL_ReleaseGPUTexture(device, texture);
6163 SDL_ReleaseGPUSampler(device, sampler);
6183 SDL_ReleaseGPUBuffer(device, buffer);
6204 SDL_ReleaseGPUTransferBuffer(device, transfer_buffer);
6226 SDL_ReleaseGPUComputePipeline(device, compute_pipeline);
6247 SDL_ReleaseGPUShader(device, shader);
6268 SDL_ReleaseGPUGraphicsPipeline(device, graphics_pipeline);
6303 return CheckError(SDL_AcquireGPUCommandBuffer(device));
6333 SDL_PushGPUVertexUniformData(
6341 m_gPUCommandBuffer, slot_index, std::move(data));
6363 SDL_PushGPUFragmentUniformData(
6371 m_gPUCommandBuffer, slot_index, std::move(data));
6393 SDL_PushGPUComputeUniformData(
6401 m_gPUCommandBuffer, slot_index, std::move(data));
6437 std::span<const GPUColorTargetInfo> color_target_infos,
6440 return SDL_BeginGPURenderPass(command_buffer,
6441 color_target_infos.data(),
6443 depth_stencil_target_info);
6447 std::span<const GPUColorTargetInfo> color_target_infos,
6451 m_gPUCommandBuffer, color_target_infos, depth_stencil_target_info);
6467 SDL_BindGPUGraphicsPipeline(render_pass, graphics_pipeline);
6486 SDL_SetGPUViewport(render_pass, &viewport);
6504 SDL_SetGPUScissor(render_pass, &scissor);
6526 SDL_SetGPUBlendConstants(render_pass, blend_constants);
6544 SDL_SetGPUStencilReference(render_pass, reference);
6564 std::span<const GPUBufferBinding> bindings)
6566 SDL_BindGPUVertexBuffers(
6567 render_pass, first_slot, bindings.data(),
narrowU32(bindings.size()));
6572 std::span<const GPUBufferBinding> bindings)
6591 SDL_BindGPUIndexBuffer(render_pass, &binding, index_element_size);
6623 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings)
6625 SDL_BindGPUVertexSamplers(render_pass,
6627 texture_sampler_bindings.data(),
6628 narrowU32(texture_sampler_bindings.size()));
6633 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings)
6636 m_gPURenderPass, first_slot, texture_sampler_bindings);
6664 SDL_BindGPUVertexStorageTextures(render_pass,
6666 storage_textures.
data(),
6675 m_gPURenderPass, first_slot, storage_textures);
6700 SDL_BindGPUVertexStorageBuffers(render_pass,
6702 storage_buffers.
data(),
6711 m_gPURenderPass, first_slot, storage_buffers);
6736 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings)
6738 SDL_BindGPUFragmentSamplers(render_pass,
6740 texture_sampler_bindings.data(),
6741 narrowU32(texture_sampler_bindings.size()));
6746 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings)
6749 m_gPURenderPass, first_slot, texture_sampler_bindings);
6777 SDL_BindGPUFragmentStorageTextures(render_pass,
6779 storage_textures.
data(),
6788 m_gPURenderPass, first_slot, storage_textures);
6813 SDL_BindGPUFragmentStorageBuffers(render_pass,
6815 storage_buffers.
data(),
6824 m_gPURenderPass, first_slot, storage_buffers);
6857 SDL_DrawGPUIndexedPrimitives(render_pass,
6905 SDL_DrawGPUPrimitives(
6906 render_pass, num_vertices, num_instances, first_vertex, first_instance);
6915 m_gPURenderPass, num_vertices, num_instances, first_vertex, first_instance);
6939 SDL_DrawGPUPrimitivesIndirect(render_pass, buffer, offset, draw_count);
6970 SDL_DrawGPUIndexedPrimitivesIndirect(render_pass, buffer, offset, draw_count);
6978 m_gPURenderPass, buffer, offset, draw_count);
6993 SDL_EndGPURenderPass(render_pass);
7033 std::span<const GPUStorageTextureReadWriteBinding> storage_texture_bindings,
7034 std::span<const GPUStorageBufferReadWriteBinding> storage_buffer_bindings)
7036 return SDL_BeginGPUComputePass(command_buffer,
7037 storage_texture_bindings.data(),
7038 narrowU32(storage_texture_bindings.size()),
7039 storage_buffer_bindings.data(),
7040 narrowU32(storage_buffer_bindings.size()));
7044 std::span<const GPUStorageTextureReadWriteBinding> storage_texture_bindings,
7045 std::span<const GPUStorageBufferReadWriteBinding> storage_buffer_bindings)
7048 m_gPUCommandBuffer, storage_texture_bindings, storage_buffer_bindings);
7062 SDL_BindGPUComputePipeline(compute_pass, compute_pipeline);
7092 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings)
7094 SDL_BindGPUComputeSamplers(compute_pass,
7096 texture_sampler_bindings.data(),
7097 narrowU32(texture_sampler_bindings.size()));
7102 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings)
7105 m_gPUComputePass, first_slot, texture_sampler_bindings);
7133 SDL_BindGPUComputeStorageTextures(compute_pass,
7135 storage_textures.
data(),
7144 m_gPUComputePass, first_slot, storage_textures);
7169 SDL_BindGPUComputeStorageBuffers(compute_pass,
7171 storage_buffers.
data(),
7180 m_gPUComputePass, first_slot, storage_buffers);
7208 SDL_DispatchGPUCompute(
7209 compute_pass, groupcount_x, groupcount_y, groupcount_z);
7217 m_gPUComputePass, groupcount_x, groupcount_y, groupcount_z);
7241 SDL_DispatchGPUComputeIndirect(compute_pass, buffer, offset);
7261 SDL_EndGPUComputePass(compute_pass);
7285 return CheckError(SDL_MapGPUTransferBuffer(device, transfer_buffer, cycle));
7305 SDL_UnmapGPUTransferBuffer(device, transfer_buffer);
7330 return SDL_BeginGPUCopyPass(command_buffer);
7360 SDL_UploadToGPUTexture(copy_pass, &source, &destination, cycle);
7389 SDL_UploadToGPUBuffer(copy_pass, &source, &destination, cycle);
7427 SDL_CopyGPUTextureToTexture(copy_pass, &source, &destination, w, h, d, cycle);
7439 m_gPUCopyPass, source, destination, w, h, d, cycle);
7463 SDL_CopyGPUBufferToBuffer(copy_pass, &source, &destination, size, cycle);
7492 SDL_DownloadFromGPUTexture(copy_pass, &source, &destination);
7518 SDL_DownloadFromGPUBuffer(copy_pass, &source, &destination);
7537 SDL_EndGPUCopyPass(copy_pass);
7555 SDL_GenerateMipmapsForGPUTexture(command_buffer, texture);
7576 SDL_BlitGPUTexture(command_buffer, &info);
7603 return SDL_WindowSupportsGPUSwapchainComposition(
7604 device, window, swapchain_composition);
7612 get(), window, swapchain_composition);
7633 return SDL_WindowSupportsGPUPresentMode(device, window, present_mode);
7670 CheckError(SDL_ClaimWindowForGPUDevice(device, window));
7690 SDL_ReleaseWindowFromGPUDevice(device, window);
7726 return SDL_SetGPUSwapchainParameters(
7727 device, window, swapchain_composition, present_mode);
7736 get(), window, swapchain_composition, present_mode);
7765 Uint32 allowed_frames_in_flight)
7767 return SDL_SetGPUAllowedFramesInFlight(device, allowed_frames_in_flight);
7771 Uint32 allowed_frames_in_flight)
7790 return SDL_GetGPUSwapchainTextureFormat(device, window);
7848 Uint32* swapchain_texture_width =
nullptr,
7849 Uint32* swapchain_texture_height =
nullptr)
7852 CheckError(SDL_AcquireGPUSwapchainTexture(command_buffer,
7855 swapchain_texture_width,
7856 swapchain_texture_height));
7862 Uint32* swapchain_texture_width,
7863 Uint32* swapchain_texture_height)
7867 swapchain_texture_width,
7868 swapchain_texture_height);
7889 CheckError(SDL_WaitForGPUSwapchain(device, window));
7940 Uint32* swapchain_texture_width =
nullptr,
7941 Uint32* swapchain_texture_height =
nullptr)
7944 CheckError(SDL_WaitAndAcquireGPUSwapchainTexture(command_buffer,
7947 swapchain_texture_width,
7948 swapchain_texture_height));
7954 Uint32* swapchain_texture_width,
7955 Uint32* swapchain_texture_height)
7959 swapchain_texture_width,
7960 swapchain_texture_height);
7985 CheckError(SDL_SubmitGPUCommandBuffer(command_buffer));
8020 return CheckError(SDL_SubmitGPUCommandBufferAndAcquireFence(command_buffer));
8051 CheckError(SDL_CancelGPUCommandBuffer(command_buffer));
8092 std::span<GPUFence* const> fences)
8095 device, wait_all, fences.data(),
narrowU32(fences.size())));
8099 std::span<GPUFence* const> fences)
8117 return SDL_QueryGPUFence(device, fence);
8139 SDL_ReleaseGPUFence(device, fence);
8159 return SDL_GPUTextureFormatTexelBlockSize(format);
8178 return SDL_GPUTextureSupportsFormat(device, format, type, usage);
8202 return SDL_GPUTextureSupportsSampleCount(device, format, sample_count);
8226 Uint32 depth_or_layer_count)
8228 return SDL_CalculateGPUTextureFormatSize(
8229 format, width, height, depth_or_layer_count);
8232#if SDL_VERSION_ATLEAST(3, 4, 0)
8245 return SDL_GetPixelFormatFromGPUTextureFormat(format);
8259 return SDL_GetGPUTextureFormatFromPixelFormat(format);
8264#ifdef SDL_PLATFORM_GDK
An opaque handle representing a buffer.
Definition SDL3pp_gpu.h:490
constexpr GPUBuffer(GPUBufferRaw gPUBuffer={}) noexcept
Wraps GPUBuffer.
Definition SDL3pp_gpu.h:499
An opaque handle representing a command buffer.
Definition SDL3pp_gpu.h:2064
constexpr GPUCommandBuffer(GPUCommandBufferRaw gPUCommandBuffer={}) noexcept
Wraps GPUCommandBuffer.
Definition SDL3pp_gpu.h:2073
An opaque handle representing a compute pass.
Definition SDL3pp_gpu.h:1521
constexpr GPUComputePass(GPUComputePassRaw gPUComputePass={}) noexcept
Wraps GPUComputePass.
Definition SDL3pp_gpu.h:1530
An opaque handle representing a compute pipeline.
Definition SDL3pp_gpu.h:969
constexpr GPUComputePipeline(GPUComputePipelineRaw gPUComputePipeline={}) noexcept
Wraps GPUComputePipeline.
Definition SDL3pp_gpu.h:978
An opaque handle representing a copy pass.
Definition SDL3pp_gpu.h:1766
constexpr GPUCopyPass(GPUCopyPassRaw gPUCopyPass={}) noexcept
Wraps GPUCopyPass.
Definition SDL3pp_gpu.h:1775
An opaque handle representing a graphics pipeline.
Definition SDL3pp_gpu.h:1071
constexpr GPUGraphicsPipeline(GPUGraphicsPipelineRaw gPUGraphicsPipeline={}) noexcept
Wraps GPUGraphicsPipeline.
Definition SDL3pp_gpu.h:1080
An opaque handle representing a render pass.
Definition SDL3pp_gpu.h:1179
constexpr GPURenderPass(GPURenderPassRaw gPURenderPass={}) noexcept
Wraps GPURenderPass.
Definition SDL3pp_gpu.h:1188
An opaque handle representing a sampler.
Definition SDL3pp_gpu.h:784
constexpr GPUSampler(GPUSamplerRaw gPUSampler={}) noexcept
Wraps GPUSampler.
Definition SDL3pp_gpu.h:793
An opaque handle representing a compiled shader object.
Definition SDL3pp_gpu.h:850
constexpr GPUShader(GPUShaderRaw gPUShader={}) noexcept
Wraps GPUShader.
Definition SDL3pp_gpu.h:859
An opaque handle representing a texture.
Definition SDL3pp_gpu.h:675
constexpr GPUTexture(GPUTextureRaw gPUTexture={}) noexcept
Wraps GPUTexture.
Definition SDL3pp_gpu.h:684
An opaque handle representing a transfer buffer.
Definition SDL3pp_gpu.h:583
constexpr GPUTransferBuffer(GPUTransferBufferRaw gPUTransferBuffer={}) noexcept
Wraps GPUTransferBuffer.
Definition SDL3pp_gpu.h:592
Optional-like shim for references.
Definition SDL3pp_optionalRef.h:20
constexpr RawPointer release() noexcept
Definition SDL3pp_resource.h:57
friend constexpr void swap(ResourceBaseT &lhs, ResourceBaseT &rhs) noexcept
Definition SDL3pp_resource.h:65
constexpr RawPointer get() const noexcept
Definition SDL3pp_resource.h:54
constexpr ResourceBaseT()=default
Default constructor, creates null/invalid resource.
Source byte stream.
Definition SDL3pp_strings.h:246
constexpr size_t size_bytes() const
Retrieves contained size in bytes.
Definition SDL3pp_strings.h:310
constexpr const char * data() const
Retrieves contained data.
Definition SDL3pp_strings.h:313
span-like for empty-derived structs
Definition SDL3pp_spanRef.h:24
constexpr T * data() const
Retrieves contained data.
Definition SDL3pp_spanRef.h:75
constexpr size_t size() const
Retrieves contained size.
Definition SDL3pp_spanRef.h:69
Helpers to use C++ strings parameters.
Definition SDL3pp_strings.h:58
constexpr void CheckError(bool result)
Check and throw if returned value from SDL is an error.
Definition SDL3pp_error.h:199
GPUGraphicsPipeline CreateGPUGraphicsPipeline(GPUDeviceRef device, const GPUGraphicsPipelineCreateInfo &createinfo)
Creates a pipeline object to be used in a graphics workflow.
Definition SDL3pp_gpu.h:5557
void ReleaseTexture(GPUTexture texture)
Frees the given texture as soon as it is safe to do so.
Definition SDL3pp_gpu.h:6146
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_UINT
GPU_VERTEXELEMENTFORMAT_UINT.
Definition SDL3pp_gpu.h:4334
SDL_GPUPresentMode GPUPresentMode
Specifies the timing that will be used to present swapchain textures to the OS.
Definition SDL3pp_gpu.h:2562
constexpr GPUShaderFormat GPU_SHADERFORMAT_DXIL
DXIL SM6_0 shaders for D3D12.
Definition SDL3pp_gpu.h:2489
void Dispatch(Uint32 groupcount_x, Uint32 groupcount_y, Uint32 groupcount_z)
Dispatches compute work.
Definition SDL3pp_gpu.h:7212
void PushComputeUniformData(Uint32 slot_index, SourceBytes data)
Pushes data to a uniform slot on the command buffer.
Definition SDL3pp_gpu.h:6397
void ReleaseComputePipeline(GPUComputePipeline compute_pipeline)
Frees the given compute pipeline as soon as it is safe to do so.
Definition SDL3pp_gpu.h:6229
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB.
Definition SDL3pp_gpu.h:2926
constexpr GPUFillMode GPU_FILLMODE_FILL
Polygons will be rendered via rasterization.
Definition SDL3pp_gpu.h:4438
SDL_GPUTransferBufferUsage GPUTransferBufferUsage
Specifies how a transfer buffer is intended to be used by the client.
Definition SDL3pp_gpu.h:4287
constexpr GPUShaderFormat GPU_SHADERFORMAT_PRIVATE
Shaders for NDA'd platforms.
Definition SDL3pp_gpu.h:2480
constexpr GPUCompareOp GPU_COMPAREOP_LESS_OR_EQUAL
The comparison evaluates reference <= test.
Definition SDL3pp_gpu.h:4503
constexpr GPUSwapchainComposition GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084
GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084.
Definition SDL3pp_gpu.h:2534
int GetNumGPUDrivers()
Get the number of GPU drivers compiled into SDL.
Definition SDL3pp_gpu.h:5257
void PushGPUFragmentUniformData(GPUCommandBuffer command_buffer, Uint32 slot_index, SourceBytes data)
Pushes data to a fragment uniform slot on the command buffer.
Definition SDL3pp_gpu.h:6359
bool SetAllowedFramesInFlight(Uint32 allowed_frames_in_flight)
Configures the maximum allowed number of frames in flight.
Definition SDL3pp_gpu.h:7770
constexpr GPUIndexElementSize GPU_INDEXELEMENTSIZE_32BIT
The index elements are 32-bit.
Definition SDL3pp_gpu.h:1152
GPUDevice CreateGPUDeviceWithProperties(PropertiesRef props)
Creates a GPU context.
Definition SDL3pp_gpu.h:5087
void BindGPUFragmentStorageTextures(GPURenderPass render_pass, Uint32 first_slot, SpanRef< const GPUTextureRaw > storage_textures)
Binds storage textures for use on the fragment shader.
Definition SDL3pp_gpu.h:6772
SDL_GPUCompareOp GPUCompareOp
Specifies a comparison operator for depth, stencil and sampler operations.
Definition SDL3pp_gpu.h:4489
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT
GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT.
Definition SDL3pp_gpu.h:2941
constexpr GPUStencilOp GPU_STENCILOP_ZERO
Sets the value to 0.
Definition SDL3pp_gpu.h:4536
void * MapTransferBuffer(GPUTransferBuffer transfer_buffer, bool cycle)
Maps a transfer buffer into application address space.
Definition SDL3pp_gpu.h:7288
constexpr GPUCompareOp GPU_COMPAREOP_ALWAYS
The comparison always evaluates true.
Definition SDL3pp_gpu.h:4517
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8_UNORM
GPU_TEXTUREFORMAT_R8_UNORM.
Definition SDL3pp_gpu.h:2662
SDL_GPUCullMode GPUCullMode
Specifies the facing direction in which triangle faces will be culled.
Definition SDL3pp_gpu.h:4451
constexpr GPUBlendOp GPU_BLENDOP_MIN
min(source, destination)
Definition SDL3pp_gpu.h:4587
void DrawGPUIndexedPrimitivesIndirect(GPURenderPass render_pass, GPUBuffer buffer, Uint32 offset, Uint32 draw_count)
Draws data using bound graphics state with an index buffer enabled and with draw parameters set from ...
Definition SDL3pp_gpu.h:6965
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_FLOAT2
GPU_VERTEXELEMENTFORMAT_FLOAT2.
Definition SDL3pp_gpu.h:4349
void CopyGPUTextureToTexture(GPUCopyPass copy_pass, const GPUTextureLocation &source, const GPUTextureLocation &destination, Uint32 w, Uint32 h, Uint32 d, bool cycle)
Performs a texture-to-texture copy.
Definition SDL3pp_gpu.h:7419
SDL_GPUTransferBufferCreateInfo GPUTransferBufferCreateInfo
A structure specifying the parameters of a transfer buffer.
Definition SDL3pp_gpu.h:564
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32G32_FLOAT
GPU_TEXTUREFORMAT_R32G32_FLOAT.
Definition SDL3pp_gpu.h:2749
constexpr GPUTextureUsageFlags GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE
Texture supports reads and writes in the same compute shader.
Definition SDL3pp_gpu.h:3044
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_USHORT2_NORM
GPU_VERTEXELEMENTFORMAT_USHORT2_NORM.
Definition SDL3pp_gpu.h:4400
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8_INT
GPU_TEXTUREFORMAT_R8G8_INT.
Definition SDL3pp_gpu.h:2788
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_6x6_UNORM
GPU_TEXTUREFORMAT_ASTC_6x6_UNORM.
Definition SDL3pp_gpu.h:2857
Uint32 GPUShaderFormat
Specifies the format of shader code.
Definition SDL3pp_gpu.h:2475
void ReleaseGPUShader(GPUDeviceRef device, GPUShader shader)
Frees the given shader as soon as it is safe to do so.
Definition SDL3pp_gpu.h:6245
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16B16A16_INT
GPU_TEXTUREFORMAT_R16G16B16A16_INT.
Definition SDL3pp_gpu.h:2800
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_12x12_UNORM
GPU_TEXTUREFORMAT_ASTC_12x12_UNORM.
Definition SDL3pp_gpu.h:2884
void BlitGPUTexture(GPUCommandBuffer command_buffer, const GPUBlitInfo &info)
Blits from a source texture region to a destination texture region.
Definition SDL3pp_gpu.h:7573
GPUFence * SubmitGPUCommandBufferAndAcquireFence(GPUCommandBuffer command_buffer)
Submits a command buffer so its commands can be processed on the GPU, and acquires a fence associated...
Definition SDL3pp_gpu.h:8017
SDL_GPUCubeMapFace GPUCubeMapFace
Specifies the face of a cube map.
Definition SDL3pp_gpu.h:4214
SDL_GPUFence GPUFence
An opaque handle representing a fence.
Definition SDL3pp_gpu.h:2038
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT
GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT.
Definition SDL3pp_gpu.h:2929
constexpr GPUStencilOp GPU_STENCILOP_INVERT
Bitwise-inverts the current value.
Definition SDL3pp_gpu.h:4550
PixelFormat GetPixelFormatFromGPUTextureFormat(GPUTextureFormat format)
Get the SDL pixel format corresponding to a GPU texture format.
Definition SDL3pp_gpu.h:8243
constexpr GPUFrontFace GPU_FRONTFACE_CLOCKWISE
A triangle with clockwise vertex winding will be considered front-facing.
Definition SDL3pp_gpu.h:4480
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_D32_FLOAT
GPU_TEXTUREFORMAT_D32_FLOAT.
Definition SDL3pp_gpu.h:2836
SDL_GPUTexture * GPUTextureRaw
Alias to raw representation for GPUTexture.
Definition SDL3pp_gpu.h:402
SDL_GPUShaderStage GPUShaderStage
Specifies which stage a shader program corresponds to.
Definition SDL3pp_gpu.h:4302
GPUSampler CreateSampler(const GPUSamplerCreateInfo &createinfo)
Creates a sampler object to be used when binding textures in a graphics workflow.
Definition SDL3pp_gpu.h:5617
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_FLOAT3
GPU_VERTEXELEMENTFORMAT_FLOAT3.
Definition SDL3pp_gpu.h:4352
constexpr GPUCompareOp GPU_COMPAREOP_GREATER_OR_EQUAL
The comparison evaluates reference >= test.
Definition SDL3pp_gpu.h:4513
SDL_GPUVertexAttribute GPUVertexAttribute
A structure specifying a vertex attribute.
Definition SDL3pp_gpu.h:4803
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT
GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT.
Definition SDL3pp_gpu.h:2947
void DrawIndexedPrimitives(Uint32 num_indices, Uint32 num_instances, Uint32 first_index, Sint32 vertex_offset, Uint32 first_instance)
Draws data using bound graphics state with an index buffer and instancing enabled.
Definition SDL3pp_gpu.h:6865
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_UBYTE2
GPU_VERTEXELEMENTFORMAT_UBYTE2.
Definition SDL3pp_gpu.h:4364
SDL_GPUTextureFormat GPUTextureFormat
Specifies the pixel format of a texture.
Definition SDL3pp_gpu.h:2654
void BindGPUVertexStorageTextures(GPURenderPass render_pass, Uint32 first_slot, SpanRef< const GPUTextureRaw > storage_textures)
Binds storage textures for use on the vertex shader.
Definition SDL3pp_gpu.h:6659
constexpr GPUPrimitiveType GPU_PRIMITIVETYPE_LINELIST
A series of separate lines.
Definition SDL3pp_gpu.h:4142
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_USHORT4_NORM
GPU_VERTEXELEMENTFORMAT_USHORT4_NORM.
Definition SDL3pp_gpu.h:4403
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32_UINT
GPU_TEXTUREFORMAT_R32_UINT.
Definition SDL3pp_gpu.h:2776
void PushGPUDebugGroup(GPUCommandBuffer command_buffer, StringParam name)
Begins a debug group with an arbitrary name.
Definition SDL3pp_gpu.h:6097
GPUBuffer CreateBuffer(const GPUBufferCreateInfo &createinfo)
Creates a buffer object to be used in graphics or compute workflows.
Definition SDL3pp_gpu.h:5903
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x6_UNORM
GPU_TEXTUREFORMAT_ASTC_8x6_UNORM.
Definition SDL3pp_gpu.h:2863
SDL_GPUFillMode GPUFillMode
Specifies the fill mode of the graphics pipeline.
Definition SDL3pp_gpu.h:4436
void SetGPUViewport(GPURenderPass render_pass, const GPUViewport &viewport)
Sets the current viewport state on a command buffer.
Definition SDL3pp_gpu.h:6483
constexpr GPUBlendFactor GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR
1 - blend constant
Definition SDL3pp_gpu.h:4640
PropertiesRef GetProperties()
Get the properties associated with a GPU device.
Definition SDL3pp_gpu.h:5423
void SetScissor(const RectRaw &scissor)
Sets the current scissor state on a command buffer.
Definition SDL3pp_gpu.h:6507
constexpr GPUCompareOp GPU_COMPAREOP_NOT_EQUAL
The comparison evaluates reference != test.
Definition SDL3pp_gpu.h:4510
SDL_GPUGraphicsPipelineTargetInfo GPUGraphicsPipelineTargetInfo
A structure specifying the descriptions of render targets used in a graphics pipeline.
Definition SDL3pp_gpu.h:4897
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_USHORT2
GPU_VERTEXELEMENTFORMAT_USHORT2.
Definition SDL3pp_gpu.h:4388
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16B16A16_UNORM
GPU_TEXTUREFORMAT_R16G16B16A16_UNORM.
Definition SDL3pp_gpu.h:2677
SDL_GPUViewport GPUViewport
A structure specifying a viewport.
Definition SDL3pp_gpu.h:1128
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16_UINT
GPU_TEXTUREFORMAT_R16G16_UINT.
Definition SDL3pp_gpu.h:2770
SDL_GPUColorTargetInfo GPUColorTargetInfo
A structure specifying the parameters of a color target used by a render pass.
Definition SDL3pp_gpu.h:1943
void CancelGPUCommandBuffer(GPUCommandBuffer command_buffer)
Cancels a command buffer.
Definition SDL3pp_gpu.h:8049
SDL_GPUIndexElementSize GPUIndexElementSize
Specifies the size of elements in an index buffer.
Definition SDL3pp_gpu.h:1147
SDL_GPUSamplerCreateInfo GPUSamplerCreateInfo
A structure specifying the parameters of a sampler.
Definition SDL3pp_gpu.h:771
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x8_UNORM
GPU_TEXTUREFORMAT_ASTC_10x8_UNORM.
Definition SDL3pp_gpu.h:2875
constexpr GPUPrimitiveType GPU_PRIMITIVETYPE_TRIANGLELIST
A series of separate triangles.
Definition SDL3pp_gpu.h:4136
bool QueryGPUFence(GPUDeviceRef device, GPUFence *fence)
Checks the status of a fence.
Definition SDL3pp_gpu.h:8115
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_A8_UNORM
GPU_TEXTUREFORMAT_A8_UNORM.
Definition SDL3pp_gpu.h:2659
void ReleaseGPUTransferBuffer(GPUDeviceRef device, GPUTransferBuffer transfer_buffer)
Frees the given transfer buffer as soon as it is safe to do so.
Definition SDL3pp_gpu.h:6201
void * MapGPUTransferBuffer(GPUDeviceRef device, GPUTransferBuffer transfer_buffer, bool cycle)
Maps a transfer buffer into application address space.
Definition SDL3pp_gpu.h:7281
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_INT4
GPU_VERTEXELEMENTFORMAT_INT4.
Definition SDL3pp_gpu.h:4331
SDL_GPUGraphicsPipelineCreateInfo GPUGraphicsPipelineCreateInfo
A structure specifying the parameters of a graphics pipeline state.
Definition SDL3pp_gpu.h:1057
GPUTexture WaitAndAcquireGPUSwapchainTexture(GPUCommandBuffer command_buffer, WindowRef window, Uint32 *swapchain_texture_width=nullptr, Uint32 *swapchain_texture_height=nullptr)
Blocks the thread until a swapchain texture is available to be acquired, and then acquires it.
Definition SDL3pp_gpu.h:7937
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT
GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT.
Definition SDL3pp_gpu.h:2935
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32_FLOAT
GPU_TEXTUREFORMAT_R32_FLOAT.
Definition SDL3pp_gpu.h:2746
constexpr GPUStoreOp GPU_STOREOP_RESOLVE
The multisample contents generated during the render pass will be resolved to a non-multisample textu...
Definition SDL3pp_gpu.h:4197
GPUGraphicsPipeline CreateGraphicsPipeline(const GPUGraphicsPipelineCreateInfo &createinfo)
Creates a pipeline object to be used in a graphics workflow.
Definition SDL3pp_gpu.h:5564
constexpr GPUSamplerAddressMode GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE
Specifies that the coordinates will clamp to the 0-1 range.
Definition SDL3pp_gpu.h:4717
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16_UNORM
GPU_TEXTUREFORMAT_R16G16_UNORM.
Definition SDL3pp_gpu.h:2674
bool SetGPUAllowedFramesInFlight(GPUDeviceRef device, Uint32 allowed_frames_in_flight)
Configures the maximum allowed number of frames in flight.
Definition SDL3pp_gpu.h:7764
void ReleaseWindow(WindowRef window)
Unclaims a window, destroying its swapchain structure.
Definition SDL3pp_gpu.h:7693
void DrawGPUPrimitives(GPURenderPass render_pass, Uint32 num_vertices, Uint32 num_instances, Uint32 first_vertex, Uint32 first_instance)
Draws data using bound graphics state.
Definition SDL3pp_gpu.h:6899
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB.
Definition SDL3pp_gpu.h:2905
void BindSamplers(Uint32 first_slot, std::span< const GPUTextureSamplerBinding > texture_sampler_bindings)
Binds texture-sampler pairs for use on the compute shader.
Definition SDL3pp_gpu.h:7100
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT
GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT.
Definition SDL3pp_gpu.h:2938
SDL_GPUTextureLocation GPUTextureLocation
A structure specifying a location in a texture.
Definition SDL3pp_gpu.h:1690
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC1_RGBA_UNORM
GPU_TEXTUREFORMAT_BC1_RGBA_UNORM.
Definition SDL3pp_gpu.h:2695
void BlitTexture(const GPUBlitInfo &info)
Blits from a source texture region to a destination texture region.
Definition SDL3pp_gpu.h:7579
void DownloadFromTexture(const GPUTextureRegion &source, const GPUTextureTransferInfo &destination)
Copies data from a texture to a transfer buffer on the GPU timeline.
Definition SDL3pp_gpu.h:7495
void BindFragmentSamplers(Uint32 first_slot, std::span< const GPUTextureSamplerBinding > texture_sampler_bindings)
Binds texture-sampler pairs for use on the fragment shader.
Definition SDL3pp_gpu.h:6744
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32G32_UINT
GPU_TEXTUREFORMAT_R32G32_UINT.
Definition SDL3pp_gpu.h:2779
void BindGPUIndexBuffer(GPURenderPass render_pass, const GPUBufferBinding &binding, GPUIndexElementSize index_element_size)
Binds an index buffer on a command buffer for use with subsequent draw calls.
Definition SDL3pp_gpu.h:6587
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC3_RGBA_UNORM
GPU_TEXTUREFORMAT_BC3_RGBA_UNORM.
Definition SDL3pp_gpu.h:2701
GPUShader CreateShader(const GPUShaderCreateInfo &createinfo)
Creates a shader to be used when creating a graphics pipeline.
Definition SDL3pp_gpu.h:5718
Uint32 GPUTextureFormatTexelBlockSize(GPUTextureFormat format)
Obtains the texel block size for a texture format.
Definition SDL3pp_gpu.h:8157
constexpr GPUTextureUsageFlags GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ
Texture supports storage reads in graphics stages.
Definition SDL3pp_gpu.h:3027
void BindStorageBuffers(Uint32 first_slot, SpanRef< const GPUBufferRaw > storage_buffers)
Binds storage buffers as readonly for use on the compute pipeline.
Definition SDL3pp_gpu.h:7175
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_SHORT2
GPU_VERTEXELEMENTFORMAT_SHORT2.
Definition SDL3pp_gpu.h:4382
bool WindowSupportsPresentMode(WindowRef window, GPUPresentMode present_mode)
Determines whether a presentation mode is supported by the window.
Definition SDL3pp_gpu.h:7636
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8_SNORM
GPU_TEXTUREFORMAT_R8_SNORM.
Definition SDL3pp_gpu.h:2719
SDL_GPUBlendOp GPUBlendOp
Specifies the operator to be used when pixels in a render target are blended with existing pixels in ...
Definition SDL3pp_gpu.h:4572
constexpr GPUTextureUsageFlags GPU_TEXTUREUSAGE_SAMPLER
Texture supports sampling.
Definition SDL3pp_gpu.h:3017
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB.
Definition SDL3pp_gpu.h:2917
void Cancel()
Cancels a command buffer.
Definition SDL3pp_gpu.h:8054
SDL_GPUStorageTextureReadWriteBinding GPUStorageTextureReadWriteBinding
A structure specifying parameters related to binding textures in a compute pass.
Definition SDL3pp_gpu.h:2002
GPUTexture AcquireGPUSwapchainTexture(GPUCommandBuffer command_buffer, WindowRef window, Uint32 *swapchain_texture_width=nullptr, Uint32 *swapchain_texture_height=nullptr)
Acquire a texture to use in presentation.
Definition SDL3pp_gpu.h:7845
SDL_GPUColorTargetDescription GPUColorTargetDescription
A structure specifying the parameters of color targets used in a graphics pipeline.
Definition SDL3pp_gpu.h:4885
constexpr GPUColorComponentFlags GPU_COLORCOMPONENT_A
the alpha component
Definition SDL3pp_gpu.h:4665
constexpr GPUBufferUsageFlags GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE
Buffer supports storage writes in the compute stage.
Definition SDL3pp_gpu.h:4274
constexpr GPUSamplerMipmapMode GPU_SAMPLERMIPMAPMODE_LINEAR
Linear filtering.
Definition SDL3pp_gpu.h:4695
bool GPUTextureSupportsSampleCount(GPUDeviceRef device, GPUTextureFormat format, GPUSampleCount sample_count)
Determines if a sample count for a texture format is supported.
Definition SDL3pp_gpu.h:8198
constexpr GPUShaderFormat GPU_SHADERFORMAT_DXBC
DXBC SM5_1 shaders for D3D12.
Definition SDL3pp_gpu.h:2486
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT
GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT.
Definition SDL3pp_gpu.h:2956
void SetStencilReference(Uint8 reference)
Sets the current stencil reference value on a command buffer.
Definition SDL3pp_gpu.h:6547
bool WindowSupportsGPUSwapchainComposition(GPUDeviceRef device, WindowRef window, GPUSwapchainComposition swapchain_composition)
Determines whether a swapchain composition is supported by the window.
Definition SDL3pp_gpu.h:7598
void ReleaseFence(GPUFence *fence)
Releases a fence obtained from SubmitGPUCommandBufferAndAcquireFence.
Definition SDL3pp_gpu.h:8142
GPUShaderFormat GetGPUShaderFormats(GPUDeviceRef device)
Returns the supported shader formats for this GPU context.
Definition SDL3pp_gpu.h:5305
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R11G11B10_UFLOAT
GPU_TEXTUREFORMAT_R11G11B10_UFLOAT.
Definition SDL3pp_gpu.h:2755
GPUBuffer CreateGPUBuffer(GPUDeviceRef device, const GPUBufferCreateInfo &createinfo)
Creates a buffer object to be used in graphics or compute workflows.
Definition SDL3pp_gpu.h:5897
constexpr GPUTextureUsageFlags GPU_TEXTUREUSAGE_COLOR_TARGET
Texture is a color render target.
Definition SDL3pp_gpu.h:3020
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_INT
GPU_VERTEXELEMENTFORMAT_INT.
Definition SDL3pp_gpu.h:4322
GPUTextureFormat GetGPUTextureFormatFromPixelFormat(PixelFormat format)
Get the GPU texture format corresponding to an SDL pixel format.
Definition SDL3pp_gpu.h:8257
GPUTexture AcquireSwapchainTexture(WindowRef window, Uint32 *swapchain_texture_width=nullptr, Uint32 *swapchain_texture_height=nullptr)
Acquire a texture to use in presentation.
Definition SDL3pp_gpu.h:7860
constexpr GPUStencilOp GPU_STENCILOP_REPLACE
Sets the value to reference.
Definition SDL3pp_gpu.h:4539
SDL_GPUDepthStencilTargetInfo GPUDepthStencilTargetInfo
A structure specifying the parameters of a depth-stencil target used by a render pass.
Definition SDL3pp_gpu.h:1992
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16_INT
GPU_TEXTUREFORMAT_R16_INT.
Definition SDL3pp_gpu.h:2794
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT
GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT.
Definition SDL3pp_gpu.h:2839
void BindFragmentStorageTextures(Uint32 first_slot, SpanRef< const GPUTextureRaw > storage_textures)
Binds storage textures for use on the fragment shader.
Definition SDL3pp_gpu.h:6783
SDL_GPUTextureRegion GPUTextureRegion
A structure specifying a region of a texture.
Definition SDL3pp_gpu.h:1715
void UploadToBuffer(const GPUTransferBufferLocation &source, const GPUBufferRegion &destination, bool cycle)
Uploads data from a transfer buffer to a buffer.
Definition SDL3pp_gpu.h:7392
constexpr GPUBlendFactor GPU_BLENDFACTOR_DST_COLOR
destination color
Definition SDL3pp_gpu.h:4619
SDL_GPUTextureTransferInfo GPUTextureTransferInfo
A structure specifying parameters related to transferring data to or from a texture.
Definition SDL3pp_gpu.h:1739
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT
GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT.
Definition SDL3pp_gpu.h:2743
void BindVertexSamplers(Uint32 first_slot, std::span< const GPUTextureSamplerBinding > texture_sampler_bindings)
Binds texture-sampler pairs for use on the vertex shader.
Definition SDL3pp_gpu.h:6631
void DrawPrimitivesIndirect(GPUBuffer buffer, Uint32 offset, Uint32 draw_count)
Draws data using bound graphics state and with draw parameters set from a buffer.
Definition SDL3pp_gpu.h:6942
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_FLOAT4
GPU_VERTEXELEMENTFORMAT_FLOAT4.
Definition SDL3pp_gpu.h:4355
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT
GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT.
Definition SDL3pp_gpu.h:2962
void GDKSuspendGPU()
Call this to suspend GPU operation on Xbox when you receive the EVENT_DID_ENTER_BACKGROUND event.
Definition SDL3pp_gpu.h:8281
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB.
Definition SDL3pp_gpu.h:2896
SDL_GPUGraphicsPipeline * GPUGraphicsPipelineRaw
Alias to raw representation for GPUGraphicsPipeline.
Definition SDL3pp_gpu.h:426
GPUCopyPass BeginCopyPass()
Begins a copy pass on a command buffer.
Definition SDL3pp_gpu.h:7333
SDL_GPUBufferRegion GPUBufferRegion
A structure specifying a region of a buffer.
Definition SDL3pp_gpu.h:1678
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT
GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT.
Definition SDL3pp_gpu.h:2959
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32G32_INT
GPU_TEXTUREFORMAT_R32G32_INT.
Definition SDL3pp_gpu.h:2806
void ReleaseGPUTexture(GPUDeviceRef device, GPUTexture texture)
Frees the given texture as soon as it is safe to do so.
Definition SDL3pp_gpu.h:6141
constexpr GPUBlendOp GPU_BLENDOP_INVALID
GPU_BLENDOP_INVALID.
Definition SDL3pp_gpu.h:4574
GPUTextureFormat GetSwapchainTextureFormat(WindowRef window)
Obtains the texture format of the swapchain for the given window.
Definition SDL3pp_gpu.h:7793
constexpr GPUSwapchainComposition GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR
GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR.
Definition SDL3pp_gpu.h:2531
GPURenderPass BeginGPURenderPass(GPUCommandBuffer command_buffer, std::span< const GPUColorTargetInfo > color_target_infos, OptionalRef< const GPUDepthStencilTargetInfo > depth_stencil_target_info)
Begins a render pass on a command buffer.
Definition SDL3pp_gpu.h:6435
void BindVertexStorageTextures(Uint32 first_slot, SpanRef< const GPUTextureRaw > storage_textures)
Binds storage textures for use on the vertex shader.
Definition SDL3pp_gpu.h:6670
void DrawGPUIndexedPrimitives(GPURenderPass render_pass, Uint32 num_indices, Uint32 num_instances, Uint32 first_index, Sint32 vertex_offset, Uint32 first_instance)
Draws data using bound graphics state with an index buffer and instancing enabled.
Definition SDL3pp_gpu.h:6850
SDL_GPUTransferBuffer * GPUTransferBufferRaw
Alias to raw representation for GPUTransferBuffer.
Definition SDL3pp_gpu.h:396
constexpr GPUPresentMode GPU_PRESENTMODE_IMMEDIATE
GPU_PRESENTMODE_IMMEDIATE.
Definition SDL3pp_gpu.h:2567
constexpr GPUBufferUsageFlags GPU_BUFFERUSAGE_VERTEX
Buffer is a vertex buffer.
Definition SDL3pp_gpu.h:4256
GPUCommandBuffer AcquireGPUCommandBuffer(GPUDeviceRef device)
Acquire a command buffer.
Definition SDL3pp_gpu.h:6301
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8B8A8_UINT
GPU_TEXTUREFORMAT_R8G8B8A8_UINT.
Definition SDL3pp_gpu.h:2764
bool GPUTextureSupportsFormat(GPUDeviceRef device, GPUTextureFormat format, GPUTextureType type, GPUTextureUsageFlags usage)
Determines whether a texture format is supported for a given type and usage.
Definition SDL3pp_gpu.h:8173
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC4_R_UNORM
GPU_TEXTUREFORMAT_BC4_R_UNORM.
Definition SDL3pp_gpu.h:2704
void BindGPUVertexSamplers(GPURenderPass render_pass, Uint32 first_slot, std::span< const GPUTextureSamplerBinding > texture_sampler_bindings)
Binds texture-sampler pairs for use on the vertex shader.
Definition SDL3pp_gpu.h:6620
void WaitForGPUSwapchain(GPUDeviceRef device, WindowRef window)
Blocks the thread until a swapchain texture is available to be acquired.
Definition SDL3pp_gpu.h:7887
constexpr GPUBufferUsageFlags GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ
Buffer supports storage reads in graphics stages.
Definition SDL3pp_gpu.h:4265
constexpr GPUCubeMapFace GPU_CUBEMAPFACE_POSITIVEZ
GPU_CUBEMAPFACE_POSITIVEZ.
Definition SDL3pp_gpu.h:4228
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB.
Definition SDL3pp_gpu.h:2887
Uint32 GPUBufferUsageFlags
Specifies how a buffer is intended to be used by the client.
Definition SDL3pp_gpu.h:4254
void DispatchIndirect(GPUBuffer buffer, Uint32 offset)
Dispatches compute work with parameters set from a buffer.
Definition SDL3pp_gpu.h:7244
SDL_GPUStorageBufferReadWriteBinding GPUStorageBufferReadWriteBinding
A structure specifying parameters related to binding buffers in a compute pass.
Definition SDL3pp_gpu.h:2012
constexpr GPUCompareOp GPU_COMPAREOP_EQUAL
The comparison evaluates reference == test.
Definition SDL3pp_gpu.h:4500
SDL_GPUIndexedIndirectDrawCommand GPUIndexedIndirectDrawCommand
A structure specifying the parameters of an indexed indirect draw command.
Definition SDL3pp_gpu.h:4760
void SetTextureName(GPUTexture texture, StringParam text)
Sets an arbitrary string constant to label a texture.
Definition SDL3pp_gpu.h:6040
void ReleaseGPUGraphicsPipeline(GPUDeviceRef device, GPUGraphicsPipeline graphics_pipeline)
Frees the given graphics pipeline as soon as it is safe to do so.
Definition SDL3pp_gpu.h:6265
void SetViewport(const GPUViewport &viewport)
Sets the current viewport state on a command buffer.
Definition SDL3pp_gpu.h:6489
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_SHORT2_NORM
GPU_VERTEXELEMENTFORMAT_SHORT2_NORM.
Definition SDL3pp_gpu.h:4394
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_BYTE4
GPU_VERTEXELEMENTFORMAT_BYTE4.
Definition SDL3pp_gpu.h:4361
constexpr GPUSwapchainComposition GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR
GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR.
Definition SDL3pp_gpu.h:2528
SDL_GPUComputePipeline * GPUComputePipelineRaw
Alias to raw representation for GPUComputePipeline.
Definition SDL3pp_gpu.h:420
constexpr GPUBlendFactor GPU_BLENDFACTOR_ONE_MINUS_SRC_COLOR
1 - source color
Definition SDL3pp_gpu.h:4616
bool TextureSupportsFormat(GPUTextureFormat format, GPUTextureType type, GPUTextureUsageFlags usage)
Determines whether a texture format is supported for a given type and usage.
Definition SDL3pp_gpu.h:8181
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_B5G5R5A1_UNORM
GPU_TEXTUREFORMAT_B5G5R5A1_UNORM.
Definition SDL3pp_gpu.h:2686
void Submit()
Submits a command buffer so its commands can be processed on the GPU.
Definition SDL3pp_gpu.h:7988
void ReleaseWindowFromGPUDevice(GPUDeviceRef device, WindowRef window)
Unclaims a window, destroying its swapchain structure.
Definition SDL3pp_gpu.h:7688
constexpr GPUFilter GPU_FILTER_LINEAR
Linear filtering.
Definition SDL3pp_gpu.h:4680
void BindGPUComputePipeline(GPUComputePass compute_pass, GPUComputePipeline compute_pipeline)
Binds a compute pipeline on a command buffer for use in compute dispatch.
Definition SDL3pp_gpu.h:7059
void ReleaseGPUSampler(GPUDeviceRef device, GPUSampler sampler)
Frees the given sampler as soon as it is safe to do so.
Definition SDL3pp_gpu.h:6161
void BindFragmentStorageBuffers(Uint32 first_slot, SpanRef< const GPUBufferRaw > storage_buffers)
Binds storage buffers for use on the fragment shader.
Definition SDL3pp_gpu.h:6819
constexpr GPUBlendFactor GPU_BLENDFACTOR_CONSTANT_COLOR
blend constant
Definition SDL3pp_gpu.h:4637
constexpr GPUVertexInputRate GPU_VERTEXINPUTRATE_VERTEX
Attribute addressing is a function of the vertex index.
Definition SDL3pp_gpu.h:4422
SDL_GPULoadOp GPULoadOp
Specifies how the contents of a texture attached to a render pass are treated at the beginning of the...
Definition SDL3pp_gpu.h:4159
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8B8A8_UNORM
GPU_TEXTUREFORMAT_R8G8B8A8_UNORM.
Definition SDL3pp_gpu.h:2668
SDL_GPUCommandBuffer * GPUCommandBufferRaw
Alias to raw representation for GPUCommandBuffer.
Definition SDL3pp_gpu.h:432
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8B8A8_INT
GPU_TEXTUREFORMAT_R8G8B8A8_INT.
Definition SDL3pp_gpu.h:2791
void CopyTextureToTexture(const GPUTextureLocation &source, const GPUTextureLocation &destination, Uint32 w, Uint32 h, Uint32 d, bool cycle)
Performs a texture-to-texture copy.
Definition SDL3pp_gpu.h:7430
constexpr GPUTransferBufferUsage GPU_TRANSFERBUFFERUSAGE_UPLOAD
GPU_TRANSFERBUFFERUSAGE_UPLOAD.
Definition SDL3pp_gpu.h:4289
SDL_GPUShaderCreateInfo GPUShaderCreateInfo
A structure specifying code and metadata for creating a shader object.
Definition SDL3pp_gpu.h:838
GPUSampler CreateGPUSampler(GPUDeviceRef device, const GPUSamplerCreateInfo &createinfo)
Creates a sampler object to be used when binding textures in a graphics workflow.
Definition SDL3pp_gpu.h:5611
SDL_GPUPrimitiveType GPUPrimitiveType
Specifies the primitive topology of a graphics pipeline.
Definition SDL3pp_gpu.h:4134
SDL_GPUBufferCreateInfo GPUBufferCreateInfo
A structure specifying the parameters of a buffer.
Definition SDL3pp_gpu.h:466
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT
GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT.
Definition SDL3pp_gpu.h:2752
constexpr GPUStoreOp GPU_STOREOP_RESOLVE_AND_STORE
The multisample contents generated during the render pass will be resolved to a non-multisample textu...
Definition SDL3pp_gpu.h:4204
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16_SNORM
GPU_TEXTUREFORMAT_R16_SNORM.
Definition SDL3pp_gpu.h:2728
SDL_GPUStencilOp GPUStencilOp
Specifies what happens to a stored stencil value if stencil tests fail or pass.
Definition SDL3pp_gpu.h:4528
constexpr GPUPresentMode GPU_PRESENTMODE_VSYNC
GPU_PRESENTMODE_VSYNC.
Definition SDL3pp_gpu.h:2564
constexpr GPUSamplerAddressMode GPU_SAMPLERADDRESSMODE_REPEAT
Specifies that the coordinates will wrap around.
Definition SDL3pp_gpu.h:4708
Uint32 GPUTextureUsageFlags
Specifies how a texture is intended to be used by the client.
Definition SDL3pp_gpu.h:3015
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_HALF4
GPU_VERTEXELEMENTFORMAT_HALF4.
Definition SDL3pp_gpu.h:4409
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_UINT3
GPU_VERTEXELEMENTFORMAT_UINT3.
Definition SDL3pp_gpu.h:4340
constexpr GPUCubeMapFace GPU_CUBEMAPFACE_NEGATIVEX
GPU_CUBEMAPFACE_NEGATIVEX.
Definition SDL3pp_gpu.h:4219
void End()
Ends the current compute pass.
Definition SDL3pp_gpu.h:7264
SDL_GPUVertexInputState GPUVertexInputState
A structure specifying the parameters of a graphics pipeline vertex input state.
Definition SDL3pp_gpu.h:4815
constexpr GPUShaderStage GPU_SHADERSTAGE_VERTEX
GPU_SHADERSTAGE_VERTEX.
Definition SDL3pp_gpu.h:4304
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_D24_UNORM
GPU_TEXTUREFORMAT_D24_UNORM.
Definition SDL3pp_gpu.h:2833
void SetGPUStencilReference(GPURenderPass render_pass, Uint8 reference)
Sets the current stencil reference value on a command buffer.
Definition SDL3pp_gpu.h:6542
void BindGPUFragmentStorageBuffers(GPURenderPass render_pass, Uint32 first_slot, SpanRef< const GPUBufferRaw > storage_buffers)
Binds storage buffers for use on the fragment shader.
Definition SDL3pp_gpu.h:6808
constexpr GPUCompareOp GPU_COMPAREOP_LESS
The comparison evaluates reference < test.
Definition SDL3pp_gpu.h:4497
constexpr GPUTextureUsageFlags GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET
Texture is a depth stencil target.
Definition SDL3pp_gpu.h:3023
void DispatchGPUCompute(GPUComputePass compute_pass, Uint32 groupcount_x, Uint32 groupcount_y, Uint32 groupcount_z)
Dispatches compute work.
Definition SDL3pp_gpu.h:7203
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_INT2
GPU_VERTEXELEMENTFORMAT_INT2.
Definition SDL3pp_gpu.h:4325
GPUComputePipeline CreateGPUComputePipeline(GPUDeviceRef device, const GPUComputePipelineCreateInfo &createinfo)
Creates a pipeline object to be used in a compute workflow.
Definition SDL3pp_gpu.h:5503
constexpr GPUPrimitiveType GPU_PRIMITIVETYPE_POINTLIST
A series of separate points.
Definition SDL3pp_gpu.h:4148
constexpr GPUBlendFactor GPU_BLENDFACTOR_ONE_MINUS_DST_COLOR
1 - destination color
Definition SDL3pp_gpu.h:4622
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC7_RGBA_UNORM
GPU_TEXTUREFORMAT_BC7_RGBA_UNORM.
Definition SDL3pp_gpu.h:2710
GPUComputePass BeginGPUComputePass(GPUCommandBuffer command_buffer, std::span< const GPUStorageTextureReadWriteBinding > storage_texture_bindings, std::span< const GPUStorageBufferReadWriteBinding > storage_buffer_bindings)
Begins a compute pass on a command buffer.
Definition SDL3pp_gpu.h:7031
bool SetGPUSwapchainParameters(GPUDeviceRef device, WindowRef window, GPUSwapchainComposition swapchain_composition, GPUPresentMode present_mode)
Changes the swapchain parameters for the given claimed window.
Definition SDL3pp_gpu.h:7720
void BindGPUFragmentSamplers(GPURenderPass render_pass, Uint32 first_slot, std::span< const GPUTextureSamplerBinding > texture_sampler_bindings)
Binds texture-sampler pairs for use on the fragment shader.
Definition SDL3pp_gpu.h:6733
GPUShaderFormat GetShaderFormats()
Returns the supported shader formats for this GPU context.
Definition SDL3pp_gpu.h:5310
SDL_GPUStoreOp GPUStoreOp
Specifies how the contents of a texture attached to a render pass are treated at the end of the rende...
Definition SDL3pp_gpu.h:4181
constexpr GPUVertexInputRate GPU_VERTEXINPUTRATE_INSTANCE
Attribute addressing is a function of the instance index.
Definition SDL3pp_gpu.h:4426
void GDKSuspendGPU(GPUDeviceRef device)
Call this to suspend GPU operation on Xbox when you receive the EVENT_DID_ENTER_BACKGROUND event.
Definition SDL3pp_gpu.h:8279
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT
GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT.
Definition SDL3pp_gpu.h:2713
constexpr GPUShaderStage GPU_SHADERSTAGE_FRAGMENT
GPU_SHADERSTAGE_FRAGMENT.
Definition SDL3pp_gpu.h:4307
constexpr GPUCompareOp GPU_COMPAREOP_INVALID
GPU_COMPAREOP_INVALID.
Definition SDL3pp_gpu.h:4491
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC5_RG_UNORM
GPU_TEXTUREFORMAT_BC5_RG_UNORM.
Definition SDL3pp_gpu.h:2707
void BindIndexBuffer(const GPUBufferBinding &binding, GPUIndexElementSize index_element_size)
Binds an index buffer on a command buffer for use with subsequent draw calls.
Definition SDL3pp_gpu.h:6594
void BindGPUVertexStorageBuffers(GPURenderPass render_pass, Uint32 first_slot, SpanRef< const GPUBufferRaw > storage_buffers)
Binds storage buffers for use on the vertex shader.
Definition SDL3pp_gpu.h:6695
constexpr GPUCubeMapFace GPU_CUBEMAPFACE_NEGATIVEZ
GPU_CUBEMAPFACE_NEGATIVEZ.
Definition SDL3pp_gpu.h:4231
void UnmapGPUTransferBuffer(GPUDeviceRef device, GPUTransferBuffer transfer_buffer)
Unmaps a previously mapped transfer buffer.
Definition SDL3pp_gpu.h:7302
constexpr GPUPrimitiveType GPU_PRIMITIVETYPE_LINESTRIP
A series of connected lines.
Definition SDL3pp_gpu.h:4145
constexpr GPUStencilOp GPU_STENCILOP_DECREMENT_AND_WRAP
Decrements the current value and wraps to the maximum value.
Definition SDL3pp_gpu.h:4558
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8_UINT
GPU_TEXTUREFORMAT_R8_UINT.
Definition SDL3pp_gpu.h:2758
constexpr GPUSampleCount GPU_SAMPLECOUNT_4
MSAA 4x.
Definition SDL3pp_gpu.h:3065
constexpr GPUTransferBufferUsage GPU_TRANSFERBUFFERUSAGE_DOWNLOAD
GPU_TRANSFERBUFFERUSAGE_DOWNLOAD.
Definition SDL3pp_gpu.h:4292
constexpr GPUStencilOp GPU_STENCILOP_INVALID
GPU_STENCILOP_INVALID.
Definition SDL3pp_gpu.h:4530
constexpr GPUTextureType GPU_TEXTURETYPE_CUBE_ARRAY
The texture is a cube array image.
Definition SDL3pp_gpu.h:2992
void GDKResumeGPU()
Call this to resume GPU operation on Xbox when you receive the EVENT_WILL_ENTER_FOREGROUND event.
Definition SDL3pp_gpu.h:8298
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32_INT
GPU_TEXTUREFORMAT_R32_INT.
Definition SDL3pp_gpu.h:2803
bool WindowSupportsGPUPresentMode(GPUDeviceRef device, WindowRef window, GPUPresentMode present_mode)
Determines whether a presentation mode is supported by the window.
Definition SDL3pp_gpu.h:7629
void UploadToGPUTexture(GPUCopyPass copy_pass, const GPUTextureTransferInfo &source, const GPUTextureRegion &destination, bool cycle)
Uploads data from a transfer buffer to a texture.
Definition SDL3pp_gpu.h:7355
void DownloadFromGPUBuffer(GPUCopyPass copy_pass, const GPUBufferRegion &source, const GPUTransferBufferLocation &destination)
Copies data from a buffer to a transfer buffer on the GPU timeline.
Definition SDL3pp_gpu.h:7514
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT
GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT.
Definition SDL3pp_gpu.h:2932
void WaitForSwapchain(WindowRef window)
Blocks the thread until a swapchain texture is available to be acquired.
Definition SDL3pp_gpu.h:7892
SDL_GPUDepthStencilState GPUDepthStencilState
A structure specifying the parameters of the graphics pipeline depth stencil state.
Definition SDL3pp_gpu.h:4875
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB
GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB.
Definition SDL3pp_gpu.h:2818
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT
GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT.
Definition SDL3pp_gpu.h:2965
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB
GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB.
Definition SDL3pp_gpu.h:2815
constexpr GPUColorComponentFlags GPU_COLORCOMPONENT_B
the blue component
Definition SDL3pp_gpu.h:4662
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB.
Definition SDL3pp_gpu.h:2908
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16B16A16_SNORM
GPU_TEXTUREFORMAT_R16G16B16A16_SNORM.
Definition SDL3pp_gpu.h:2734
constexpr GPUSampleCount GPU_SAMPLECOUNT_8
MSAA 8x.
Definition SDL3pp_gpu.h:3067
constexpr GPUTextureType GPU_TEXTURETYPE_3D
The texture is a 3-dimensional image.
Definition SDL3pp_gpu.h:2986
SDL_GPURenderPass * GPURenderPassRaw
Alias to raw representation for GPURenderPass.
Definition SDL3pp_gpu.h:438
constexpr GPUBufferUsageFlags GPU_BUFFERUSAGE_INDEX
Buffer is an index buffer.
Definition SDL3pp_gpu.h:4259
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT
GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT.
Definition SDL3pp_gpu.h:2716
SDL_GPUVertexBufferDescription GPUVertexBufferDescription
A structure specifying the parameters of vertex buffers used in a graphics pipeline.
Definition SDL3pp_gpu.h:4789
constexpr GPUIndexElementSize GPU_INDEXELEMENTSIZE_16BIT
The index elements are 16-bit.
Definition SDL3pp_gpu.h:1149
SDL_GPUFrontFace GPUFrontFace
Specifies the vertex winding that will cause a triangle to be determined to be front-facing.
Definition SDL3pp_gpu.h:4470
constexpr GPUStencilOp GPU_STENCILOP_DECREMENT_AND_CLAMP
Decrements the current value and clamps to 0.
Definition SDL3pp_gpu.h:4546
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_UINT4
GPU_VERTEXELEMENTFORMAT_UINT4.
Definition SDL3pp_gpu.h:4343
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16_UINT
GPU_TEXTUREFORMAT_R16_UINT.
Definition SDL3pp_gpu.h:2767
void ClaimWindow(WindowRef window)
Claims a window, creating a swapchain structure for it.
Definition SDL3pp_gpu.h:7673
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16_FLOAT
GPU_TEXTUREFORMAT_R16G16_FLOAT.
Definition SDL3pp_gpu.h:2740
void BindVertexBuffers(Uint32 first_slot, std::span< const GPUBufferBinding > bindings)
Binds vertex buffers on a command buffer for use with subsequent draw calls.
Definition SDL3pp_gpu.h:6570
constexpr GPUSampleCount GPU_SAMPLECOUNT_2
MSAA 2x.
Definition SDL3pp_gpu.h:3063
constexpr GPUTextureUsageFlags GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE
Texture supports storage writes in the compute stage.
Definition SDL3pp_gpu.h:3036
void End()
Ends the given render pass.
Definition SDL3pp_gpu.h:6996
SDL_GPUBufferBinding GPUBufferBinding
A structure specifying parameters in a buffer binding call.
Definition SDL3pp_gpu.h:1138
void BindVertexStorageBuffers(Uint32 first_slot, SpanRef< const GPUBufferRaw > storage_buffers)
Binds storage buffers for use on the vertex shader.
Definition SDL3pp_gpu.h:6706
void WaitForGPUIdle(GPUDeviceRef device)
Blocks the thread until the GPU is completely idle.
Definition SDL3pp_gpu.h:8069
GPUComputePass BeginComputePass(std::span< const GPUStorageTextureReadWriteBinding > storage_texture_bindings, std::span< const GPUStorageBufferReadWriteBinding > storage_buffer_bindings)
Begins a compute pass on a command buffer.
Definition SDL3pp_gpu.h:7043
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x5_UNORM
GPU_TEXTUREFORMAT_ASTC_8x5_UNORM.
Definition SDL3pp_gpu.h:2860
SDL_GPURasterizerState GPURasterizerState
A structure specifying the parameters of the graphics pipeline rasterizer state.
Definition SDL3pp_gpu.h:4855
GPUTransferBuffer CreateGPUTransferBuffer(GPUDeviceRef device, const GPUTransferBufferCreateInfo &createinfo)
Creates a transfer buffer to be used when uploading to or downloading from graphics resources.
Definition SDL3pp_gpu.h:5954
constexpr GPUCullMode GPU_CULLMODE_FRONT
Front-facing triangles are culled.
Definition SDL3pp_gpu.h:4456
constexpr GPUCubeMapFace GPU_CUBEMAPFACE_POSITIVEY
GPU_CUBEMAPFACE_POSITIVEY.
Definition SDL3pp_gpu.h:4222
void WaitForFences(bool wait_all, std::span< GPUFence *const > fences)
Blocks the thread until the given fences are signaled.
Definition SDL3pp_gpu.h:8098
constexpr GPUCompareOp GPU_COMPAREOP_GREATER
The comparison evaluates reference > test.
Definition SDL3pp_gpu.h:4507
SDL_GPUComputePipelineCreateInfo GPUComputePipelineCreateInfo
A structure specifying the parameters of a compute pipeline state.
Definition SDL3pp_gpu.h:955
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16_FLOAT
GPU_TEXTUREFORMAT_R16_FLOAT.
Definition SDL3pp_gpu.h:2737
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT
GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT.
Definition SDL3pp_gpu.h:2968
void GenerateMipmapsForTexture(GPUTexture texture)
Generates mipmaps for the given texture.
Definition SDL3pp_gpu.h:7558
GPUTexture CreateTexture(const GPUTextureCreateInfo &createinfo)
Creates a texture object to be used in graphics or compute workflows.
Definition SDL3pp_gpu.h:5806
constexpr GPUFrontFace GPU_FRONTFACE_COUNTER_CLOCKWISE
A triangle with counter-clockwise vertex winding will be considered front-facing.
Definition SDL3pp_gpu.h:4476
SDL_GPUMultisampleState GPUMultisampleState
A structure specifying the parameters of the graphics pipeline multisample state.
Definition SDL3pp_gpu.h:4865
void PushGPUVertexUniformData(GPUCommandBuffer command_buffer, Uint32 slot_index, SourceBytes data)
Pushes data to a vertex uniform slot on the command buffer.
Definition SDL3pp_gpu.h:6329
constexpr GPUColorComponentFlags GPU_COLORCOMPONENT_R
the red component
Definition SDL3pp_gpu.h:4656
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT
GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT.
Definition SDL3pp_gpu.h:2953
constexpr GPUSamplerMipmapMode GPU_SAMPLERMIPMAPMODE_NEAREST
Point filtering.
Definition SDL3pp_gpu.h:4692
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_BYTE2_NORM
GPU_VERTEXELEMENTFORMAT_BYTE2_NORM.
Definition SDL3pp_gpu.h:4370
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_HALF2
GPU_VERTEXELEMENTFORMAT_HALF2.
Definition SDL3pp_gpu.h:4406
SDL_GPUSampler * GPUSamplerRaw
Alias to raw representation for GPUSampler.
Definition SDL3pp_gpu.h:408
void ClaimWindowForGPUDevice(GPUDeviceRef device, WindowRef window)
Claims a window, creating a swapchain structure for it.
Definition SDL3pp_gpu.h:7668
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_6x5_UNORM
GPU_TEXTUREFORMAT_ASTC_6x5_UNORM.
Definition SDL3pp_gpu.h:2854
constexpr GPUCullMode GPU_CULLMODE_BACK
Back-facing triangles are culled.
Definition SDL3pp_gpu.h:4459
SDL_GPUIndirectDrawCommand GPUIndirectDrawCommand
A structure specifying the parameters of an indirect draw command.
Definition SDL3pp_gpu.h:4744
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_UINT2
GPU_VERTEXELEMENTFORMAT_UINT2.
Definition SDL3pp_gpu.h:4337
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x6_UNORM
GPU_TEXTUREFORMAT_ASTC_10x6_UNORM.
Definition SDL3pp_gpu.h:2872
GPUTransferBuffer CreateTransferBuffer(const GPUTransferBufferCreateInfo &createinfo)
Creates a transfer buffer to be used when uploading to or downloading from graphics resources.
Definition SDL3pp_gpu.h:5961
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8B8A8_SNORM
GPU_TEXTUREFORMAT_R8G8B8A8_SNORM.
Definition SDL3pp_gpu.h:2725
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_UBYTE4
GPU_VERTEXELEMENTFORMAT_UBYTE4.
Definition SDL3pp_gpu.h:4367
void PushFragmentUniformData(Uint32 slot_index, SourceBytes data)
Pushes data to a fragment uniform slot on the command buffer.
Definition SDL3pp_gpu.h:6367
void UploadToGPUBuffer(GPUCopyPass copy_pass, const GPUTransferBufferLocation &source, const GPUBufferRegion &destination, bool cycle)
Uploads data from a transfer buffer to a buffer.
Definition SDL3pp_gpu.h:7384
void PushGPUComputeUniformData(GPUCommandBuffer command_buffer, Uint32 slot_index, SourceBytes data)
Pushes data to a uniform slot on the command buffer.
Definition SDL3pp_gpu.h:6389
constexpr GPUBlendFactor GPU_BLENDFACTOR_INVALID
GPU_BLENDFACTOR_INVALID.
Definition SDL3pp_gpu.h:4606
Uint32 CalculateGPUTextureFormatSize(GPUTextureFormat format, Uint32 width, Uint32 height, Uint32 depth_or_layer_count)
Calculate the size in bytes of a texture format with dimensions.
Definition SDL3pp_gpu.h:8223
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_INVALID
GPU_VERTEXELEMENTFORMAT_INVALID.
Definition SDL3pp_gpu.h:4319
void PushVertexUniformData(Uint32 slot_index, SourceBytes data)
Pushes data to a vertex uniform slot on the command buffer.
Definition SDL3pp_gpu.h:6337
SDL_GPUCopyPass * GPUCopyPassRaw
Alias to raw representation for GPUCopyPass.
Definition SDL3pp_gpu.h:450
GPUShader CreateGPUShader(GPUDeviceRef device, const GPUShaderCreateInfo &createinfo)
Creates a shader to be used when creating a graphics pipeline.
Definition SDL3pp_gpu.h:5712
constexpr GPUStencilOp GPU_STENCILOP_INCREMENT_AND_CLAMP
Increments the current value and clamps to the maximum value.
Definition SDL3pp_gpu.h:4543
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_SHORT4_NORM
GPU_VERTEXELEMENTFORMAT_SHORT4_NORM.
Definition SDL3pp_gpu.h:4397
SDL_GPUVertexElementFormat GPUVertexElementFormat
Specifies the format of a vertex attribute.
Definition SDL3pp_gpu.h:4317
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT
GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT.
Definition SDL3pp_gpu.h:2842
void GenerateMipmapsForGPUTexture(GPUCommandBuffer command_buffer, GPUTexture texture)
Generates mipmaps for the given texture.
Definition SDL3pp_gpu.h:7552
constexpr GPUTextureType GPU_TEXTURETYPE_2D
The texture is a 2-dimensional image.
Definition SDL3pp_gpu.h:2980
void CopyBufferToBuffer(const GPUBufferLocation &source, const GPUBufferLocation &destination, Uint32 size, bool cycle)
Performs a buffer-to-buffer copy.
Definition SDL3pp_gpu.h:7466
constexpr GPUBlendFactor GPU_BLENDFACTOR_SRC_COLOR
source color
Definition SDL3pp_gpu.h:4613
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC2_RGBA_UNORM
GPU_TEXTUREFORMAT_BC2_RGBA_UNORM.
Definition SDL3pp_gpu.h:2698
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB
GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB.
Definition SDL3pp_gpu.h:2812
void ReleaseGPUComputePipeline(GPUDeviceRef device, GPUComputePipeline compute_pipeline)
Frees the given compute pipeline as soon as it is safe to do so.
Definition SDL3pp_gpu.h:6223
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_B4G4R4A4_UNORM
GPU_TEXTUREFORMAT_B4G4R4A4_UNORM.
Definition SDL3pp_gpu.h:2689
GPUTexture CreateGPUTexture(GPUDeviceRef device, const GPUTextureCreateInfo &createinfo)
Creates a texture object to be used in graphics or compute workflows.
Definition SDL3pp_gpu.h:5800
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB.
Definition SDL3pp_gpu.h:2923
void DestroyGPUDevice(GPUDeviceRaw device)
Destroys a GPU context previously returned by CreateGPUDevice.
Definition SDL3pp_gpu.h:5241
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x10_UNORM
GPU_TEXTUREFORMAT_ASTC_10x10_UNORM.
Definition SDL3pp_gpu.h:2878
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB.
Definition SDL3pp_gpu.h:2890
bool QueryFence(GPUFence *fence)
Checks the status of a fence.
Definition SDL3pp_gpu.h:8120
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_12x10_UNORM
GPU_TEXTUREFORMAT_ASTC_12x10_UNORM.
Definition SDL3pp_gpu.h:2881
void BindGPUGraphicsPipeline(GPURenderPass render_pass, GPUGraphicsPipeline graphics_pipeline)
Binds a graphics pipeline on a render pass to be used in rendering.
Definition SDL3pp_gpu.h:6464
SDL_GPUTextureType GPUTextureType
Specifies the type of a texture.
Definition SDL3pp_gpu.h:2978
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB.
Definition SDL3pp_gpu.h:2893
constexpr GPUShaderFormat GPU_SHADERFORMAT_METALLIB
Precompiled metallib shaders for Metal.
Definition SDL3pp_gpu.h:2495
constexpr GPUFillMode GPU_FILLMODE_LINE
Polygon edges will be drawn as line segments.
Definition SDL3pp_gpu.h:4441
void CopyGPUBufferToBuffer(GPUCopyPass copy_pass, const GPUBufferLocation &source, const GPUBufferLocation &destination, Uint32 size, bool cycle)
Performs a buffer-to-buffer copy.
Definition SDL3pp_gpu.h:7457
SDL_GPUIndirectDispatchCommand GPUIndirectDispatchCommand
A structure specifying the parameters of an indexed dispatch command.
Definition SDL3pp_gpu.h:4769
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_4x4_UNORM
GPU_TEXTUREFORMAT_ASTC_4x4_UNORM.
Definition SDL3pp_gpu.h:2845
constexpr GPUPrimitiveType GPU_PRIMITIVETYPE_TRIANGLESTRIP
A series of connected triangles.
Definition SDL3pp_gpu.h:4139
SDL_GPUColorTargetBlendState GPUColorTargetBlendState
A structure specifying the blend state of a color target.
Definition SDL3pp_gpu.h:4837
SDL_GPUTransferBufferLocation GPUTransferBufferLocation
A structure specifying a location in a transfer buffer.
Definition SDL3pp_gpu.h:1752
constexpr GPUShaderFormat GPU_SHADERFORMAT_MSL
MSL shaders for Metal.
Definition SDL3pp_gpu.h:2492
PropertiesRef GetGPUDeviceProperties(GPUDeviceRef device)
Get the properties associated with a GPU device.
Definition SDL3pp_gpu.h:5418
SDL_GPUBuffer * GPUBufferRaw
Alias to raw representation for GPUBuffer.
Definition SDL3pp_gpu.h:390
void PopDebugGroup()
Ends the most-recently pushed debug group.
Definition SDL3pp_gpu.h:6126
void UploadToTexture(const GPUTextureTransferInfo &source, const GPUTextureRegion &destination, bool cycle)
Uploads data from a transfer buffer to a texture.
Definition SDL3pp_gpu.h:7363
SDL_GPUSamplerMipmapMode GPUSamplerMipmapMode
Specifies a mipmap mode used by a sampler.
Definition SDL3pp_gpu.h:4690
bool SetSwapchainParameters(WindowRef window, GPUSwapchainComposition swapchain_composition, GPUPresentMode present_mode)
Changes the swapchain parameters for the given claimed window.
Definition SDL3pp_gpu.h:7730
Uint8 GPUColorComponentFlags
Specifies which color components are written in a graphics pipeline.
Definition SDL3pp_gpu.h:4654
const char * GetGPUDeviceDriver(GPUDeviceRef device)
Returns the name of the backend used to create this GPU context.
Definition SDL3pp_gpu.h:5286
constexpr GPUCompareOp GPU_COMPAREOP_NEVER
The comparison always evaluates false.
Definition SDL3pp_gpu.h:4494
SDL_GPUVulkanOptions GPUVulkanOptions
A structure specifying additional options when using Vulkan.
Definition SDL3pp_gpu.h:5228
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16_SNORM
GPU_TEXTUREFORMAT_R16G16_SNORM.
Definition SDL3pp_gpu.h:2731
void SetBlendConstants(FColorRaw blend_constants)
Sets the current blend constants on a command buffer.
Definition SDL3pp_gpu.h:6529
constexpr GPUBlendFactor GPU_BLENDFACTOR_SRC_ALPHA
source alpha
Definition SDL3pp_gpu.h:4625
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB.
Definition SDL3pp_gpu.h:2902
void ReleaseSampler(GPUSampler sampler)
Frees the given sampler as soon as it is safe to do so.
Definition SDL3pp_gpu.h:6166
bool TextureSupportsSampleCount(GPUTextureFormat format, GPUSampleCount sample_count)
Determines if a sample count for a texture format is supported.
Definition SDL3pp_gpu.h:8205
SDL_GPUSamplerAddressMode GPUSamplerAddressMode
Specifies behavior of texture sampling when the coordinates exceed the 0-1 range.
Definition SDL3pp_gpu.h:4706
void Destroy()
Destroys a GPU context previously returned by CreateGPUDevice.
Definition SDL3pp_gpu.h:5246
GPUDevice CreateGPUDevice(GPUShaderFormat format_flags, bool debug_mode, StringParam name)
Creates a GPU context.
Definition SDL3pp_gpu.h:4959
void ReleaseBuffer(GPUBuffer buffer)
Frees the given buffer as soon as it is safe to do so.
Definition SDL3pp_gpu.h:6186
void ReleaseGraphicsPipeline(GPUGraphicsPipeline graphics_pipeline)
Frees the given graphics pipeline as soon as it is safe to do so.
Definition SDL3pp_gpu.h:6271
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB.
Definition SDL3pp_gpu.h:2899
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R10G10B10A2_UNORM
GPU_TEXTUREFORMAT_R10G10B10A2_UNORM.
Definition SDL3pp_gpu.h:2680
void BindPipeline(GPUGraphicsPipeline graphics_pipeline)
Binds a graphics pipeline on a render pass to be used in rendering.
Definition SDL3pp_gpu.h:6470
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_B8G8R8A8_UNORM
GPU_TEXTUREFORMAT_B8G8R8A8_UNORM.
Definition SDL3pp_gpu.h:2692
void DrawGPUPrimitivesIndirect(GPURenderPass render_pass, GPUBuffer buffer, Uint32 offset, Uint32 draw_count)
Draws data using bound graphics state and with draw parameters set from a buffer.
Definition SDL3pp_gpu.h:6934
constexpr GPULoadOp GPU_LOADOP_DONT_CARE
The previous contents of the texture need not be preserved.
Definition SDL3pp_gpu.h:4171
constexpr GPUBlendFactor GPU_BLENDFACTOR_ZERO
0
Definition SDL3pp_gpu.h:4609
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8_SNORM
GPU_TEXTUREFORMAT_R8G8_SNORM.
Definition SDL3pp_gpu.h:2722
SDL_GPUSwapchainComposition GPUSwapchainComposition
Specifies the texture format and colorspace of the swapchain textures.
Definition SDL3pp_gpu.h:2523
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32G32B32A32_INT
GPU_TEXTUREFORMAT_R32G32B32A32_INT.
Definition SDL3pp_gpu.h:2809
GPUCommandBuffer AcquireCommandBuffer()
Acquire a command buffer.
Definition SDL3pp_gpu.h:6306
constexpr GPUBlendOp GPU_BLENDOP_MAX
max(source, destination)
Definition SDL3pp_gpu.h:4590
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16_INT
GPU_TEXTUREFORMAT_R16G16_INT.
Definition SDL3pp_gpu.h:2797
bool WindowSupportsSwapchainComposition(WindowRef window, GPUSwapchainComposition swapchain_composition)
Determines whether a swapchain composition is supported by the window.
Definition SDL3pp_gpu.h:7607
const char * GetGPUDriver(int index)
Get the name of a built in GPU driver.
Definition SDL3pp_gpu.h:5276
constexpr GPUStoreOp GPU_STOREOP_STORE
The contents generated during the render pass will be written to memory.
Definition SDL3pp_gpu.h:4184
SDL_GPUSampleCount GPUSampleCount
Specifies the sample count of a texture.
Definition SDL3pp_gpu.h:3058
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB
GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB.
Definition SDL3pp_gpu.h:2821
void InsertDebugLabel(StringParam text)
Inserts an arbitrary string label into the command buffer callstream.
Definition SDL3pp_gpu.h:6066
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB
GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB.
Definition SDL3pp_gpu.h:2827
constexpr GPUBlendFactor GPU_BLENDFACTOR_SRC_ALPHA_SATURATE
min(source alpha, 1 - destination alpha)
Definition SDL3pp_gpu.h:4643
constexpr GPUBlendFactor GPU_BLENDFACTOR_ONE_MINUS_DST_ALPHA
1 - destination alpha
Definition SDL3pp_gpu.h:4634
GPUTextureFormat GetGPUSwapchainTextureFormat(GPUDeviceRef device, WindowRef window)
Obtains the texture format of the swapchain for the given window.
Definition SDL3pp_gpu.h:7787
void BindPipeline(GPUComputePipeline compute_pipeline)
Binds a compute pipeline on a command buffer for use in compute dispatch.
Definition SDL3pp_gpu.h:7065
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_BYTE2
GPU_VERTEXELEMENTFORMAT_BYTE2.
Definition SDL3pp_gpu.h:4358
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x8_UNORM
GPU_TEXTUREFORMAT_ASTC_8x8_UNORM.
Definition SDL3pp_gpu.h:2866
constexpr GPUStencilOp GPU_STENCILOP_KEEP
Keeps the current value.
Definition SDL3pp_gpu.h:4533
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_INT3
GPU_VERTEXELEMENTFORMAT_INT3.
Definition SDL3pp_gpu.h:4328
void SetGPUBufferName(GPUDeviceRef device, GPUBuffer buffer, StringParam text)
Sets an arbitrary string constant to label a buffer.
Definition SDL3pp_gpu.h:6004
constexpr GPUBufferUsageFlags GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ
Buffer supports storage reads in the compute stage.
Definition SDL3pp_gpu.h:4270
void DownloadFromBuffer(const GPUBufferRegion &source, const GPUTransferBufferLocation &destination)
Copies data from a buffer to a transfer buffer on the GPU timeline.
Definition SDL3pp_gpu.h:7521
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB.
Definition SDL3pp_gpu.h:2911
void SetGPUBlendConstants(GPURenderPass render_pass, FColorRaw blend_constants)
Sets the current blend constants on a command buffer.
Definition SDL3pp_gpu.h:6523
SDL_GPUTextureCreateInfo GPUTextureCreateInfo
A structure specifying the parameters of a texture.
Definition SDL3pp_gpu.h:654
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16B16A16_UINT
GPU_TEXTUREFORMAT_R16G16B16A16_UINT.
Definition SDL3pp_gpu.h:2773
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT
GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT.
Definition SDL3pp_gpu.h:2950
SDL_GPUFilter GPUFilter
Specifies a filter operation used by a sampler.
Definition SDL3pp_gpu.h:4675
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_5x4_UNORM
GPU_TEXTUREFORMAT_ASTC_5x4_UNORM.
Definition SDL3pp_gpu.h:2848
void End()
Ends the current copy pass.
Definition SDL3pp_gpu.h:7540
ResourceRefT< GPUDeviceBase > GPUDeviceRef
Reference for GPUDevice.
Definition SDL3pp_gpu.h:387
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_USHORT4
GPU_VERTEXELEMENTFORMAT_USHORT4.
Definition SDL3pp_gpu.h:4391
GPUFence * SubmitAndAcquireFence()
Submits a command buffer so its commands can be processed on the GPU, and acquires a fence associated...
Definition SDL3pp_gpu.h:8023
bool GPUSupportsProperties(PropertiesRef props)
Checks for GPU runtime support.
Definition SDL3pp_gpu.h:4928
constexpr GPUShaderFormat GPU_SHADERFORMAT_INVALID
INVALID.
Definition SDL3pp_gpu.h:2477
void WaitForGPUFences(GPUDeviceRef device, bool wait_all, std::span< GPUFence *const > fences)
Blocks the thread until the given fences are signaled.
Definition SDL3pp_gpu.h:8090
void BindGPUComputeStorageBuffers(GPUComputePass compute_pass, Uint32 first_slot, SpanRef< const GPUBufferRaw > storage_buffers)
Binds storage buffers as readonly for use on the compute pipeline.
Definition SDL3pp_gpu.h:7164
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_B5G6R5_UNORM
GPU_TEXTUREFORMAT_B5G6R5_UNORM.
Definition SDL3pp_gpu.h:2683
void DownloadFromGPUTexture(GPUCopyPass copy_pass, const GPUTextureRegion &source, const GPUTextureTransferInfo &destination)
Copies data from a texture to a transfer buffer on the GPU timeline.
Definition SDL3pp_gpu.h:7488
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8_UNORM
GPU_TEXTUREFORMAT_R8G8_UNORM.
Definition SDL3pp_gpu.h:2665
void EndGPURenderPass(GPURenderPass render_pass)
Ends the given render pass.
Definition SDL3pp_gpu.h:6991
constexpr GPUBlendOp GPU_BLENDOP_REVERSE_SUBTRACT
(destination * destination_factor) - (source * source_factor)
Definition SDL3pp_gpu.h:4584
constexpr GPUColorComponentFlags GPU_COLORCOMPONENT_G
the green component
Definition SDL3pp_gpu.h:4659
void SetBufferName(GPUBuffer buffer, StringParam text)
Sets an arbitrary string constant to label a buffer.
Definition SDL3pp_gpu.h:6011
constexpr GPUSwapchainComposition GPU_SWAPCHAINCOMPOSITION_SDR
GPU_SWAPCHAINCOMPOSITION_SDR.
Definition SDL3pp_gpu.h:2525
constexpr GPUBufferUsageFlags GPU_BUFFERUSAGE_INDIRECT
Buffer is an indirect buffer.
Definition SDL3pp_gpu.h:4262
constexpr GPUTextureUsageFlags GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ
Texture supports storage reads in the compute stage.
Definition SDL3pp_gpu.h:3032
constexpr GPUBlendOp GPU_BLENDOP_SUBTRACT
(source * source_factor) - (destination * destination_factor)
Definition SDL3pp_gpu.h:4581
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8_INT
GPU_TEXTUREFORMAT_R8_INT.
Definition SDL3pp_gpu.h:2785
void InsertGPUDebugLabel(GPUCommandBuffer command_buffer, StringParam text)
Inserts an arbitrary string label into the command buffer callstream.
Definition SDL3pp_gpu.h:6060
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16_UNORM
GPU_TEXTUREFORMAT_R16_UNORM.
Definition SDL3pp_gpu.h:2671
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB.
Definition SDL3pp_gpu.h:2920
SDL_GPUDevice * GPUDeviceRaw
Alias to raw representation for GPUDevice.
Definition SDL3pp_gpu.h:380
void ReleaseTransferBuffer(GPUTransferBuffer transfer_buffer)
Frees the given transfer buffer as soon as it is safe to do so.
Definition SDL3pp_gpu.h:6207
SDL_GPUBlitRegion GPUBlitRegion
A structure specifying a region of a texture used in the blit operation.
Definition SDL3pp_gpu.h:4728
SDL_GPUTextureSamplerBinding GPUTextureSamplerBinding
A structure specifying parameters in a sampler binding call.
Definition SDL3pp_gpu.h:1165
void EndGPUCopyPass(GPUCopyPass copy_pass)
Ends the current copy pass.
Definition SDL3pp_gpu.h:7535
void DispatchGPUComputeIndirect(GPUComputePass compute_pass, GPUBuffer buffer, Uint32 offset)
Dispatches compute work with parameters set from a buffer.
Definition SDL3pp_gpu.h:7237
GPUTexture WaitAndAcquireSwapchainTexture(WindowRef window, Uint32 *swapchain_texture_width=nullptr, Uint32 *swapchain_texture_height=nullptr)
Blocks the thread until a swapchain texture is available to be acquired, and then acquires it.
Definition SDL3pp_gpu.h:7952
constexpr GPUStoreOp GPU_STOREOP_DONT_CARE
The contents generated during the render pass are not needed and may be discarded.
Definition SDL3pp_gpu.h:4190
constexpr GPULoadOp GPU_LOADOP_CLEAR
The contents of the texture will be cleared to a color.
Definition SDL3pp_gpu.h:4165
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM
GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM.
Definition SDL3pp_gpu.h:4379
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32G32B32A32_UINT
GPU_TEXTUREFORMAT_R32G32B32A32_UINT.
Definition SDL3pp_gpu.h:2782
SDL_GPUShader * GPUShaderRaw
Alias to raw representation for GPUShader.
Definition SDL3pp_gpu.h:414
constexpr GPUTextureType GPU_TEXTURETYPE_2D_ARRAY
The texture is a 2-dimensional array image.
Definition SDL3pp_gpu.h:2983
constexpr GPUPresentMode GPU_PRESENTMODE_MAILBOX
GPU_PRESENTMODE_MAILBOX.
Definition SDL3pp_gpu.h:2570
constexpr GPUCubeMapFace GPU_CUBEMAPFACE_NEGATIVEY
GPU_CUBEMAPFACE_NEGATIVEY.
Definition SDL3pp_gpu.h:4225
SDL_GPUBlendFactor GPUBlendFactor
Specifies a blending factor to be used when pixels in a render target are blended with existing pixel...
Definition SDL3pp_gpu.h:4604
void PushDebugGroup(StringParam name)
Begins a debug group with an arbitrary name.
Definition SDL3pp_gpu.h:6102
bool GPUSupportsShaderFormats(GPUShaderFormat format_flags, StringParam name)
Checks for GPU runtime support.
Definition SDL3pp_gpu.h:4912
void ReleaseGPUFence(GPUDeviceRef device, GPUFence *fence)
Releases a fence obtained from SubmitGPUCommandBufferAndAcquireFence.
Definition SDL3pp_gpu.h:8137
constexpr GPUShaderFormat GPU_SHADERFORMAT_SPIRV
SPIR-V shaders for Vulkan.
Definition SDL3pp_gpu.h:2483
constexpr GPUSamplerAddressMode GPU_SAMPLERADDRESSMODE_MIRRORED_REPEAT
Specifies that the coordinates will wrap around mirrored.
Definition SDL3pp_gpu.h:4713
const char * GetDriver()
Returns the name of the backend used to create this GPU context.
Definition SDL3pp_gpu.h:5291
void BindGPUVertexBuffers(GPURenderPass render_pass, Uint32 first_slot, std::span< const GPUBufferBinding > bindings)
Binds vertex buffers on a command buffer for use with subsequent draw calls.
Definition SDL3pp_gpu.h:6562
void BindStorageTextures(Uint32 first_slot, SpanRef< const GPUTextureRaw > storage_textures)
Binds storage textures as readonly for use on the compute pipeline.
Definition SDL3pp_gpu.h:7139
void DrawPrimitives(Uint32 num_vertices, Uint32 num_instances, Uint32 first_vertex, Uint32 first_instance)
Draws data using bound graphics state.
Definition SDL3pp_gpu.h:6909
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT
GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT.
Definition SDL3pp_gpu.h:2944
void SetGPUScissor(GPURenderPass render_pass, const RectRaw &scissor)
Sets the current scissor state on a command buffer.
Definition SDL3pp_gpu.h:6502
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_D16_UNORM
GPU_TEXTUREFORMAT_D16_UNORM.
Definition SDL3pp_gpu.h:2830
void SubmitGPUCommandBuffer(GPUCommandBuffer command_buffer)
Submits a command buffer so its commands can be processed on the GPU.
Definition SDL3pp_gpu.h:7983
void ReleaseShader(GPUShader shader)
Frees the given shader as soon as it is safe to do so.
Definition SDL3pp_gpu.h:6250
constexpr GPUFilter GPU_FILTER_NEAREST
Point filtering.
Definition SDL3pp_gpu.h:4677
void SetGPUTextureName(GPUDeviceRef device, GPUTexture texture, StringParam text)
Sets an arbitrary string constant to label a texture.
Definition SDL3pp_gpu.h:6033
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB.
Definition SDL3pp_gpu.h:2914
SDL_GPUStencilOpState GPUStencilOpState
A structure specifying the stencil operation state of a graphics pipeline.
Definition SDL3pp_gpu.h:4824
constexpr GPUCubeMapFace GPU_CUBEMAPFACE_POSITIVEX
GPU_CUBEMAPFACE_POSITIVEX.
Definition SDL3pp_gpu.h:4216
void BindGPUComputeSamplers(GPUComputePass compute_pass, Uint32 first_slot, std::span< const GPUTextureSamplerBinding > texture_sampler_bindings)
Binds texture-sampler pairs for use on the compute shader.
Definition SDL3pp_gpu.h:7089
void UnmapTransferBuffer(GPUTransferBuffer transfer_buffer)
Unmaps a previously mapped transfer buffer.
Definition SDL3pp_gpu.h:7308
void WaitForIdle()
Blocks the thread until the GPU is completely idle.
Definition SDL3pp_gpu.h:8074
void BindGPUComputeStorageTextures(GPUComputePass compute_pass, Uint32 first_slot, SpanRef< const GPUTextureRaw > storage_textures)
Binds storage textures as readonly for use on the compute pipeline.
Definition SDL3pp_gpu.h:7128
SDL_GPUBufferLocation GPUBufferLocation
A structure specifying a location in a buffer.
Definition SDL3pp_gpu.h:1701
GPUCopyPass BeginGPUCopyPass(GPUCommandBuffer command_buffer)
Begins a copy pass on a command buffer.
Definition SDL3pp_gpu.h:7328
constexpr GPUBlendOp GPU_BLENDOP_ADD
(source * source_factor) + (destination * destination_factor)
Definition SDL3pp_gpu.h:4578
constexpr GPUTextureType GPU_TEXTURETYPE_CUBE
The texture is a cube image.
Definition SDL3pp_gpu.h:2989
constexpr GPUStencilOp GPU_STENCILOP_INCREMENT_AND_WRAP
Increments the current value and wraps back to 0.
Definition SDL3pp_gpu.h:4553
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB
GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB.
Definition SDL3pp_gpu.h:2824
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_INVALID
GPU_TEXTUREFORMAT_INVALID.
Definition SDL3pp_gpu.h:2656
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_5x5_UNORM
GPU_TEXTUREFORMAT_ASTC_5x5_UNORM.
Definition SDL3pp_gpu.h:2851
GPUComputePipeline CreateComputePipeline(const GPUComputePipelineCreateInfo &createinfo)
Creates a pipeline object to be used in a compute workflow.
Definition SDL3pp_gpu.h:5510
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_BYTE4_NORM
GPU_VERTEXELEMENTFORMAT_BYTE4_NORM.
Definition SDL3pp_gpu.h:4373
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_FLOAT
GPU_VERTEXELEMENTFORMAT_FLOAT.
Definition SDL3pp_gpu.h:4346
constexpr GPUSampleCount GPU_SAMPLECOUNT_1
No multisampling.
Definition SDL3pp_gpu.h:3060
GPURenderPass BeginRenderPass(std::span< const GPUColorTargetInfo > color_target_infos, OptionalRef< const GPUDepthStencilTargetInfo > depth_stencil_target_info)
Begins a render pass on a command buffer.
Definition SDL3pp_gpu.h:6446
constexpr GPUBlendFactor GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA
1 - source alpha
Definition SDL3pp_gpu.h:4628
constexpr GPUBlendFactor GPU_BLENDFACTOR_ONE
1
Definition SDL3pp_gpu.h:4611
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM
GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM.
Definition SDL3pp_gpu.h:4376
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_SHORT4
GPU_VERTEXELEMENTFORMAT_SHORT4.
Definition SDL3pp_gpu.h:4385
void PopGPUDebugGroup(GPUCommandBuffer command_buffer)
Ends the most-recently pushed debug group.
Definition SDL3pp_gpu.h:6121
SDL_GPUComputePass * GPUComputePassRaw
Alias to raw representation for GPUComputePass.
Definition SDL3pp_gpu.h:444
void ReleaseGPUBuffer(GPUDeviceRef device, GPUBuffer buffer)
Frees the given buffer as soon as it is safe to do so.
Definition SDL3pp_gpu.h:6181
void GDKResumeGPU(GPUDeviceRef device)
Call this to resume GPU operation on Xbox when you receive the EVENT_WILL_ENTER_FOREGROUND event.
Definition SDL3pp_gpu.h:8296
constexpr GPULoadOp GPU_LOADOP_LOAD
The previous contents of the texture will be preserved.
Definition SDL3pp_gpu.h:4162
constexpr GPUCullMode GPU_CULLMODE_NONE
No triangles are culled.
Definition SDL3pp_gpu.h:4453
constexpr GPUBlendFactor GPU_BLENDFACTOR_DST_ALPHA
destination alpha
Definition SDL3pp_gpu.h:4631
void DrawIndexedPrimitivesIndirect(GPUBuffer buffer, Uint32 offset, Uint32 draw_count)
Draws data using bound graphics state with an index buffer enabled and with draw parameters set from ...
Definition SDL3pp_gpu.h:6973
void EndGPUComputePass(GPUComputePass compute_pass)
Ends the current compute pass.
Definition SDL3pp_gpu.h:7259
SDL_GPUVertexInputRate GPUVertexInputRate
Specifies the rate at which vertex attributes are pulled from buffers.
Definition SDL3pp_gpu.h:4419
SDL_GPUBlitInfo GPUBlitInfo
A structure containing parameters for a blit command.
Definition SDL3pp_gpu.h:2026
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x5_UNORM
GPU_TEXTUREFORMAT_ASTC_10x5_UNORM.
Definition SDL3pp_gpu.h:2869
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8_UINT
GPU_TEXTUREFORMAT_R8G8_UINT.
Definition SDL3pp_gpu.h:2761
SDL_FColor FColorRaw
Alias to raw representation for FColor.
Definition SDL3pp_pixels.h:89
ResourceRefT< PropertiesBase > PropertiesRef
Reference for Properties.
Definition SDL3pp_properties.h:55
SDL_Rect RectRaw
Alias to raw representation for Rect.
Definition SDL3pp_rect.h:34
::Sint32 Sint32
A signed 32-bit integer type.
Definition SDL3pp_stdinc.h:283
::Uint32 Uint32
An unsigned 32-bit integer type.
Definition SDL3pp_stdinc.h:296
::Uint8 Uint8
An unsigned 8-bit integer type.
Definition SDL3pp_stdinc.h:244
ResourceRefT< WindowBase > WindowRef
Reference for Window.
Definition SDL3pp_video.h:57
Properties for GPUBuffer creation.
Definition SDL3pp_gpu.h:5920
constexpr auto NAME_STRING
String for name.
Definition SDL3pp_gpu.h:5922
Properties for GPUComputePipeline creation.
Definition SDL3pp_gpu.h:5529
constexpr auto NAME_STRING
String for name.
Definition SDL3pp_gpu.h:5531
Properties for GPUDevice creation.
Definition SDL3pp_gpu.h:5099
constexpr auto NAME_STRING
String for name.
Definition SDL3pp_gpu.h:5114
constexpr auto FEATURE_INDIRECT_DRAW_FIRST_INSTANCE_BOOLEAN
Enable feature indirect draw first instance.
Definition SDL3pp_gpu.h:5128
constexpr auto D3D12_AGILITY_SDK_PATH_STRING
String for d3d12 agility sdk path.
Definition SDL3pp_gpu.h:5181
constexpr auto DEBUGMODE_BOOLEAN
Enable debugmode.
Definition SDL3pp_gpu.h:5101
constexpr auto FEATURE_DEPTH_CLAMPING_BOOLEAN
Enable feature depth clamping.
Definition SDL3pp_gpu.h:5123
constexpr auto SHADERS_PRIVATE_BOOLEAN
Enable shaders private.
Definition SDL3pp_gpu.h:5137
constexpr auto D3D12_AGILITY_SDK_VERSION_NUMBER
Number for d3d12 agility sdk version.
Definition SDL3pp_gpu.h:5175
constexpr auto SHADERS_MSL_BOOLEAN
Enable shaders msl.
Definition SDL3pp_gpu.h:5150
constexpr auto METAL_ALLOW_MACFAMILY1_BOOLEAN
Enable metal allow macfamily1.
Definition SDL3pp_gpu.h:5201
constexpr auto VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN
Enable vulkan require hardware acceleration.
Definition SDL3pp_gpu.h:5190
constexpr auto D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN
Enable d3d12 allow fewer resource slots.
Definition SDL3pp_gpu.h:5159
constexpr auto SHADERS_DXIL_BOOLEAN
Enable shaders dxil.
Definition SDL3pp_gpu.h:5147
constexpr auto SHADERS_DXBC_BOOLEAN
Enable shaders dxbc.
Definition SDL3pp_gpu.h:5144
constexpr auto SHADERS_SPIRV_BOOLEAN
Enable shaders spirv.
Definition SDL3pp_gpu.h:5141
constexpr auto PREFERLOWPOWER_BOOLEAN
Enable preferlowpower.
Definition SDL3pp_gpu.h:5104
constexpr auto FEATURE_ANISOTROPY_BOOLEAN
Enable feature anisotropy.
Definition SDL3pp_gpu.h:5131
constexpr auto FEATURE_CLIP_DISTANCE_BOOLEAN
Enable feature clip distance.
Definition SDL3pp_gpu.h:5119
constexpr auto VULKAN_OPTIONS_POINTER
Pointer to vulkan options.
Definition SDL3pp_gpu.h:5193
constexpr auto SHADERS_METALLIB_BOOLEAN
Enable shaders metallib.
Definition SDL3pp_gpu.h:5153
constexpr auto VERBOSE_BOOLEAN
Enable verbose.
Definition SDL3pp_gpu.h:5109
constexpr auto D3D12_SEMANTIC_NAME_STRING
String for d3d12 semantic name.
Definition SDL3pp_gpu.h:5169
Properties for GPUDevice creation and information.
Definition SDL3pp_gpu.h:5099
constexpr auto NAME_STRING
String for name.
Definition SDL3pp_gpu.h:5442
constexpr auto DRIVER_VERSION_STRING
String for driver version.
Definition SDL3pp_gpu.h:5448
constexpr auto DRIVER_NAME_STRING
String for driver name.
Definition SDL3pp_gpu.h:5445
constexpr auto DRIVER_INFO_STRING
String for driver info.
Definition SDL3pp_gpu.h:5451
Properties for GPUGraphicsPipeline creation.
Definition SDL3pp_gpu.h:5583
constexpr auto NAME_STRING
String for name.
Definition SDL3pp_gpu.h:5585
Properties for GPUSampler creation.
Definition SDL3pp_gpu.h:5634
constexpr auto NAME_STRING
String for name.
Definition SDL3pp_gpu.h:5636
Properties for GPUShader creation.
Definition SDL3pp_gpu.h:5735
constexpr auto NAME_STRING
String for name.
Definition SDL3pp_gpu.h:5737
Properties for GPUTexture creation.
Definition SDL3pp_gpu.h:5823
constexpr auto D3D12_CLEAR_G_FLOAT
Float for d3d12 clear g.
Definition SDL3pp_gpu.h:5828
constexpr auto D3D12_CLEAR_DEPTH_FLOAT
Float for d3d12 clear depth.
Definition SDL3pp_gpu.h:5837
constexpr auto NAME_STRING
String for name.
Definition SDL3pp_gpu.h:5849
constexpr auto D3D12_CLEAR_A_FLOAT
Float for d3d12 clear a.
Definition SDL3pp_gpu.h:5834
constexpr auto D3D12_CLEAR_STENCIL_NUMBER
Number for d3d12 clear stencil.
Definition SDL3pp_gpu.h:5843
constexpr auto D3D12_CLEAR_B_FLOAT
Float for d3d12 clear b.
Definition SDL3pp_gpu.h:5831
constexpr auto D3D12_CLEAR_R_FLOAT
Float for d3d12 clear r.
Definition SDL3pp_gpu.h:5825
Properties for GPUTransferBuffer creation.
Definition SDL3pp_gpu.h:5980
constexpr auto NAME_STRING
String for name.
Definition SDL3pp_gpu.h:5982
Main include header for the SDL3pp library.
Uint32 narrowU32(T value)
Narrows to Uint32.
Definition SDL3pp_stdinc.h:6275
Base class to GPUDevice.
Definition SDL3pp_gpu.h:3075
constexpr ResourceBaseT()=default
Default constructor, creates null/invalid resource.
An opaque handle representing the SDL_GPU context.
Definition SDL3pp_gpu.h:3941
constexpr GPUDevice & operator=(GPUDevice &&other) noexcept
Assignment operator.
Definition SDL3pp_gpu.h:4107
~GPUDevice()
Destructor.
Definition SDL3pp_gpu.h:4104
constexpr GPUDevice(GPUDeviceRaw resource) noexcept
Constructs from raw GPUDevice.
Definition SDL3pp_gpu.h:3951
constexpr GPUDevice(GPUDevice &&other) noexcept
Move constructor.
Definition SDL3pp_gpu.h:3957
A non-owning reference wrapper for a given resource.
Definition SDL3pp_resource.h:93