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"
327 constexpr explicit operator bool()
const {
return !!
value; }
415 : m_gPUBuffer(gPUBuffer)
463 : m_gPUBuffer(
CheckError(SDL_CreateGPUBuffer(device, &createinfo)))
511 : m_gPUTransferBuffer(gPUTransferBuffer)
544 : m_gPUTransferBuffer(
545 CheckError(SDL_CreateGPUTransferBuffer(device, &createinfo)))
556 return m_gPUTransferBuffer;
606 : m_gPUTexture(gPUTexture)
666 : m_gPUTexture(
CheckError(SDL_CreateGPUTexture(device, &createinfo)))
715 : m_gPUSampler(gPUSampler)
741 : m_gPUSampler(
CheckError(SDL_CreateGPUSampler(device, &createinfo)))
782 : m_gPUShader(gPUShader)
860 : m_gPUShader(
CheckError(SDL_CreateGPUShader(device, &createinfo)))
904 : m_gPUComputePipeline(gPUComputePipeline)
955 : m_gPUComputePipeline(
956 CheckError(SDL_CreateGPUComputePipeline(device, &createinfo)))
967 return m_gPUComputePipeline;
1009 : m_gPUGraphicsPipeline(gPUGraphicsPipeline)
1036 : m_gPUGraphicsPipeline(
1037 CheckError(SDL_CreateGPUGraphicsPipeline(device, &createinfo)))
1048 return m_gPUGraphicsPipeline;
1081 SDL_GPU_INDEXELEMENTSIZE_16BIT;
1084 SDL_GPU_INDEXELEMENTSIZE_32BIT;
1118 : m_gPURenderPass(gPURenderPass)
1190 std::span<const GPUBufferBinding> bindings);
1223 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings);
1281 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings);
1446 : m_gPUComputePass(gPUComputePass)
1484 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings);
1668 : m_gPUCopyPass(gPUCopyPass)
1954 : m_gPUCommandBuffer(gPUCommandBuffer)
2079 std::span<const GPUColorTargetInfo> color_target_infos,
2115 std::span<const GPUStorageTextureReadWriteBinding> storage_texture_bindings,
2116 std::span<const GPUStorageBufferReadWriteBinding> storage_buffer_bindings);
2198 Uint32* swapchain_texture_width =
nullptr,
2199 Uint32* swapchain_texture_height =
nullptr);
2242 Uint32* swapchain_texture_width =
nullptr,
2243 Uint32* swapchain_texture_height =
nullptr);
2326 SDL_GPU_SHADERFORMAT_INVALID;
2329 SDL_GPU_SHADERFORMAT_PRIVATE;
2332 SDL_GPU_SHADERFORMAT_SPIRV;
2335 SDL_GPU_SHADERFORMAT_DXBC;
2338 SDL_GPU_SHADERFORMAT_DXIL;
2341 SDL_GPU_SHADERFORMAT_MSL;
2344 SDL_GPU_SHADERFORMAT_METALLIB;
2375 SDL_GPU_SWAPCHAINCOMPOSITION_SDR;
2378 SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR;
2381 SDL_GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR;
2384 SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084;
2414 SDL_GPU_PRESENTMODE_VSYNC;
2417 SDL_GPU_PRESENTMODE_IMMEDIATE;
2420 SDL_GPU_PRESENTMODE_MAILBOX;
2510 SDL_GPU_TEXTUREFORMAT_INVALID;
2513 SDL_GPU_TEXTUREFORMAT_A8_UNORM;
2516 SDL_GPU_TEXTUREFORMAT_R8_UNORM;
2519 SDL_GPU_TEXTUREFORMAT_R8G8_UNORM;
2522 SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM;
2525 SDL_GPU_TEXTUREFORMAT_R16_UNORM;
2528 SDL_GPU_TEXTUREFORMAT_R16G16_UNORM;
2531 SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UNORM;
2534 SDL_GPU_TEXTUREFORMAT_R10G10B10A2_UNORM;
2537 SDL_GPU_TEXTUREFORMAT_B5G6R5_UNORM;
2540 SDL_GPU_TEXTUREFORMAT_B5G5R5A1_UNORM;
2543 SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM;
2546 SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM;
2549 SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM;
2552 SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM;
2555 SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM;
2558 SDL_GPU_TEXTUREFORMAT_BC4_R_UNORM;
2561 SDL_GPU_TEXTUREFORMAT_BC5_RG_UNORM;
2564 SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM;
2567 SDL_GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT;
2570 SDL_GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT;
2573 SDL_GPU_TEXTUREFORMAT_R8_SNORM;
2576 SDL_GPU_TEXTUREFORMAT_R8G8_SNORM;
2579 SDL_GPU_TEXTUREFORMAT_R8G8B8A8_SNORM;
2582 SDL_GPU_TEXTUREFORMAT_R16_SNORM;
2585 SDL_GPU_TEXTUREFORMAT_R16G16_SNORM;
2588 SDL_GPU_TEXTUREFORMAT_R16G16B16A16_SNORM;
2591 SDL_GPU_TEXTUREFORMAT_R16_FLOAT;
2594 SDL_GPU_TEXTUREFORMAT_R16G16_FLOAT;
2597 SDL_GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT;
2600 SDL_GPU_TEXTUREFORMAT_R32_FLOAT;
2603 SDL_GPU_TEXTUREFORMAT_R32G32_FLOAT;
2606 SDL_GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT;
2609 SDL_GPU_TEXTUREFORMAT_R11G11B10_UFLOAT;
2612 SDL_GPU_TEXTUREFORMAT_R8_UINT;
2615 SDL_GPU_TEXTUREFORMAT_R8G8_UINT;
2618 SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UINT;
2621 SDL_GPU_TEXTUREFORMAT_R16_UINT;
2624 SDL_GPU_TEXTUREFORMAT_R16G16_UINT;
2627 SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UINT;
2630 SDL_GPU_TEXTUREFORMAT_R32_UINT;
2633 SDL_GPU_TEXTUREFORMAT_R32G32_UINT;
2636 SDL_GPU_TEXTUREFORMAT_R32G32B32A32_UINT;
2639 SDL_GPU_TEXTUREFORMAT_R8_INT;
2642 SDL_GPU_TEXTUREFORMAT_R8G8_INT;
2645 SDL_GPU_TEXTUREFORMAT_R8G8B8A8_INT;
2648 SDL_GPU_TEXTUREFORMAT_R16_INT;
2651 SDL_GPU_TEXTUREFORMAT_R16G16_INT;
2654 SDL_GPU_TEXTUREFORMAT_R16G16B16A16_INT;
2657 SDL_GPU_TEXTUREFORMAT_R32_INT;
2660 SDL_GPU_TEXTUREFORMAT_R32G32_INT;
2663 SDL_GPU_TEXTUREFORMAT_R32G32B32A32_INT;
2666 SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB;
2669 SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB;
2672 SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB;
2675 SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB;
2678 SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB;
2681 SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB;
2684 SDL_GPU_TEXTUREFORMAT_D16_UNORM;
2687 SDL_GPU_TEXTUREFORMAT_D24_UNORM;
2690 SDL_GPU_TEXTUREFORMAT_D32_FLOAT;
2693 SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT;
2696 SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT;
2699 SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM;
2702 SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM;
2705 SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM;
2708 SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM;
2711 SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM;
2714 SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM;
2717 SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM;
2720 SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM;
2723 SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM;
2726 SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM;
2729 SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM;
2732 SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM;
2735 SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM;
2738 SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM;
2741 SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB;
2744 SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB;
2747 SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB;
2750 SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB;
2753 SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB;
2756 SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB;
2759 SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB;
2762 SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB;
2765 SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB;
2768 SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB;
2771 SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB;
2774 SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB;
2777 SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB;
2780 SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB;
2783 SDL_GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT;
2786 SDL_GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT;
2789 SDL_GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT;
2792 SDL_GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT;
2795 SDL_GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT;
2798 SDL_GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT;
2801 SDL_GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT;
2804 SDL_GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT;
2807 SDL_GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT;
2810 SDL_GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT;
2813 SDL_GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT;
2816 SDL_GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT;
2819 SDL_GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT;
2822 SDL_GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT;
2834 SDL_GPU_TEXTURETYPE_2D;
2837 SDL_GPU_TEXTURETYPE_2D_ARRAY;
2840 SDL_GPU_TEXTURETYPE_3D;
2843 SDL_GPU_TEXTURETYPE_CUBE;
2846 SDL_GPU_TEXTURETYPE_CUBE_ARRAY;
2871 SDL_GPU_TEXTUREUSAGE_SAMPLER;
2874 SDL_GPU_TEXTUREUSAGE_COLOR_TARGET;
2877 SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET;
2881 SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ;
2886 SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ;
2890 SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE;
2898 SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE;
2914 SDL_GPU_SAMPLECOUNT_1;
2917 SDL_GPU_SAMPLECOUNT_2;
2920 SDL_GPU_SAMPLECOUNT_4;
2923 SDL_GPU_SAMPLECOUNT_8;
2948 : m_resource(resource)
2985 CheckError(SDL_CreateGPUDevice(format_flags, debug_mode, name)))
3033 : m_resource(
CheckError(SDL_CreateGPUDeviceWithProperties(props)))
3043 std::swap(m_resource, other.m_resource);
3053 auto r = m_resource;
3054 m_resource =
nullptr;
3062 constexpr bool operator==(std::nullptr_t _)
const {
return !m_resource; }
3065 constexpr explicit operator bool()
const {
return !!m_resource; }
3735 void WaitForFences(
bool wait_all, std::span<GPUFence* const> fences);
3839 SDL_GPU_PRIMITIVETYPE_TRIANGLELIST;
3842 SDL_GPU_PRIMITIVETYPE_TRIANGLESTRIP;
3845 SDL_GPU_PRIMITIVETYPE_LINELIST;
3848 SDL_GPU_PRIMITIVETYPE_LINESTRIP;
3851 SDL_GPU_PRIMITIVETYPE_POINTLIST;
3907 SDL_GPU_STOREOP_RESOLVE_AND_STORE;
3919 SDL_GPU_CUBEMAPFACE_POSITIVEX;
3922 SDL_GPU_CUBEMAPFACE_NEGATIVEX;
3925 SDL_GPU_CUBEMAPFACE_POSITIVEY;
3928 SDL_GPU_CUBEMAPFACE_NEGATIVEY;
3931 SDL_GPU_CUBEMAPFACE_POSITIVEZ;
3934 SDL_GPU_CUBEMAPFACE_NEGATIVEZ;
3956 SDL_GPU_BUFFERUSAGE_VERTEX;
3959 SDL_GPU_BUFFERUSAGE_INDEX;
3962 SDL_GPU_BUFFERUSAGE_INDIRECT;
3965 SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ;
3970 SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ;
3974 SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE;
3989 SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD;
3992 SDL_GPU_TRANSFERBUFFERUSAGE_DOWNLOAD;
4004 SDL_GPU_SHADERSTAGE_VERTEX;
4007 SDL_GPU_SHADERSTAGE_FRAGMENT;
4019 SDL_GPU_VERTEXELEMENTFORMAT_INVALID;
4022 SDL_GPU_VERTEXELEMENTFORMAT_INT;
4025 SDL_GPU_VERTEXELEMENTFORMAT_INT2;
4028 SDL_GPU_VERTEXELEMENTFORMAT_INT3;
4031 SDL_GPU_VERTEXELEMENTFORMAT_INT4;
4034 SDL_GPU_VERTEXELEMENTFORMAT_UINT;
4037 SDL_GPU_VERTEXELEMENTFORMAT_UINT2;
4040 SDL_GPU_VERTEXELEMENTFORMAT_UINT3;
4043 SDL_GPU_VERTEXELEMENTFORMAT_UINT4;
4046 SDL_GPU_VERTEXELEMENTFORMAT_FLOAT;
4049 SDL_GPU_VERTEXELEMENTFORMAT_FLOAT2;
4052 SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3;
4055 SDL_GPU_VERTEXELEMENTFORMAT_FLOAT4;
4058 SDL_GPU_VERTEXELEMENTFORMAT_BYTE2;
4061 SDL_GPU_VERTEXELEMENTFORMAT_BYTE4;
4064 SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2;
4067 SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4;
4070 SDL_GPU_VERTEXELEMENTFORMAT_BYTE2_NORM;
4073 SDL_GPU_VERTEXELEMENTFORMAT_BYTE4_NORM;
4076 SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM;
4079 SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM;
4082 SDL_GPU_VERTEXELEMENTFORMAT_SHORT2;
4085 SDL_GPU_VERTEXELEMENTFORMAT_SHORT4;
4088 SDL_GPU_VERTEXELEMENTFORMAT_USHORT2;
4091 SDL_GPU_VERTEXELEMENTFORMAT_USHORT4;
4094 SDL_GPU_VERTEXELEMENTFORMAT_SHORT2_NORM;
4097 SDL_GPU_VERTEXELEMENTFORMAT_SHORT4_NORM;
4100 SDL_GPU_VERTEXELEMENTFORMAT_USHORT2_NORM;
4103 SDL_GPU_VERTEXELEMENTFORMAT_USHORT4_NORM;
4106 SDL_GPU_VERTEXELEMENTFORMAT_HALF2;
4109 SDL_GPU_VERTEXELEMENTFORMAT_HALF4;
4122 SDL_GPU_VERTEXINPUTRATE_VERTEX;
4126 SDL_GPU_VERTEXINPUTRATE_INSTANCE;
4138 SDL_GPU_FILLMODE_FILL;
4141 SDL_GPU_FILLMODE_LINE;
4153 SDL_GPU_CULLMODE_NONE;
4156 SDL_GPU_CULLMODE_FRONT;
4159 SDL_GPU_CULLMODE_BACK;
4176 SDL_GPU_FRONTFACE_COUNTER_CLOCKWISE;
4191 SDL_GPU_COMPAREOP_INVALID;
4194 SDL_GPU_COMPAREOP_NEVER;
4197 SDL_GPU_COMPAREOP_LESS;
4200 SDL_GPU_COMPAREOP_EQUAL;
4203 SDL_GPU_COMPAREOP_LESS_OR_EQUAL;
4207 SDL_GPU_COMPAREOP_GREATER;
4210 SDL_GPU_COMPAREOP_NOT_EQUAL;
4213 SDL_GPU_COMPAREOP_GREATER_OR_EQUAL;
4217 SDL_GPU_COMPAREOP_ALWAYS;
4230 SDL_GPU_STENCILOP_INVALID;
4233 SDL_GPU_STENCILOP_KEEP;
4236 SDL_GPU_STENCILOP_ZERO;
4239 SDL_GPU_STENCILOP_REPLACE;
4243 SDL_GPU_STENCILOP_INCREMENT_AND_CLAMP;
4246 SDL_GPU_STENCILOP_DECREMENT_AND_CLAMP;
4250 SDL_GPU_STENCILOP_INVERT;
4253 SDL_GPU_STENCILOP_INCREMENT_AND_WRAP;
4258 SDL_GPU_STENCILOP_DECREMENT_AND_WRAP;
4274 SDL_GPU_BLENDOP_INVALID;
4284 SDL_GPU_BLENDOP_REVERSE_SUBTRACT;
4287 SDL_GPU_BLENDOP_MIN;
4290 SDL_GPU_BLENDOP_MAX;
4306 SDL_GPU_BLENDFACTOR_INVALID;
4313 SDL_GPU_BLENDFACTOR_SRC_COLOR;
4316 SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_COLOR;
4319 SDL_GPU_BLENDFACTOR_DST_COLOR;
4322 SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_COLOR;
4325 SDL_GPU_BLENDFACTOR_SRC_ALPHA;
4328 SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA;
4331 SDL_GPU_BLENDFACTOR_DST_ALPHA;
4334 SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_ALPHA;
4337 SDL_GPU_BLENDFACTOR_CONSTANT_COLOR;
4340 SDL_GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR;
4343 SDL_GPU_BLENDFACTOR_SRC_ALPHA_SATURATE;
4356 SDL_GPU_COLORCOMPONENT_R;
4359 SDL_GPU_COLORCOMPONENT_G;
4362 SDL_GPU_COLORCOMPONENT_B;
4365 SDL_GPU_COLORCOMPONENT_A;
4377 SDL_GPU_FILTER_NEAREST;
4380 SDL_GPU_FILTER_LINEAR;
4392 SDL_GPU_SAMPLERMIPMAPMODE_NEAREST;
4395 SDL_GPU_SAMPLERMIPMAPMODE_LINEAR;
4408 SDL_GPU_SAMPLERADDRESSMODE_REPEAT;
4413 SDL_GPU_SAMPLERADDRESSMODE_MIRRORED_REPEAT;
4417 SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE;
4609 return SDL_GPUSupportsShaderFormats(format_flags, name);
4624 return SDL_GPUSupportsProperties(props);
4649 return GPUDevice(format_flags, debug_mode, std::move(name));
4700namespace prop::GpuDevice {
4702constexpr auto CREATE_DEBUGMODE_BOOLEAN =
4703 SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN;
4705constexpr auto CREATE_PREFERLOWPOWER_BOOLEAN =
4706 SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOLEAN;
4708constexpr auto CREATE_NAME_STRING = SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING;
4710constexpr auto CREATE_SHADERS_PRIVATE_BOOLEAN =
4711 SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN;
4713constexpr auto CREATE_SHADERS_SPIRV_BOOLEAN =
4714 SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOLEAN;
4716constexpr auto CREATE_SHADERS_DXBC_BOOLEAN =
4717 SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN;
4719constexpr auto CREATE_SHADERS_DXIL_BOOLEAN =
4720 SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN;
4722constexpr auto CREATE_SHADERS_MSL_BOOLEAN =
4723 SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN;
4725constexpr auto CREATE_SHADERS_METALLIB_BOOLEAN =
4726 SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN;
4728constexpr auto CREATE_D3D12_SEMANTIC_NAME_STRING =
4729 SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING;
4744 SDL_DestroyGPUDevice(device);
4777inline const char*
GetGPUDriver(
int index) {
return SDL_GetGPUDriver(index); }
4789 return SDL_GetGPUDeviceDriver(device);
4808 return SDL_GetGPUShaderFormats(device);
4874namespace prop::GPUComputePipeline {
4876constexpr auto CREATE_NAME_STRING =
4877 SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING;
4915namespace prop::GPUGraphicsPipeline {
4917constexpr auto CREATE_NAME_STRING =
4918 SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING;
4955namespace prop::GPUSampler {
4957constexpr auto CREATE_NAME_STRING = SDL_PROP_GPU_SAMPLER_CREATE_NAME_STRING;
5042 return GPUShader(m_resource, createinfo);
5045namespace prop::GPUShader {
5047constexpr auto CREATE_NAME_STRING = SDL_PROP_GPU_SHADER_CREATE_NAME_STRING;
5118namespace prop::GPUTexture {
5120constexpr auto CREATE_D3D12_CLEAR_R_FLOAT =
5121 SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_R_FLOAT;
5123constexpr auto CREATE_D3D12_CLEAR_G_FLOAT =
5124 SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_G_FLOAT;
5126constexpr auto CREATE_D3D12_CLEAR_B_FLOAT =
5127 SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_B_FLOAT;
5129constexpr auto CREATE_D3D12_CLEAR_A_FLOAT =
5130 SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_A_FLOAT;
5132constexpr auto CREATE_D3D12_CLEAR_DEPTH_FLOAT =
5133 SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_DEPTH_FLOAT;
5135constexpr auto CREATE_D3D12_CLEAR_STENCIL_NUMBER =
5136 SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_NUMBER;
5138constexpr auto CREATE_NAME_STRING = SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING;
5193 return GPUBuffer(m_resource, createinfo);
5196namespace prop::GPUBuffer {
5198constexpr auto CREATE_NAME_STRING = SDL_PROP_GPU_BUFFER_CREATE_NAME_STRING;
5242namespace prop::GPUTransferBuffer {
5244constexpr auto CREATE_NAME_STRING =
5245 SDL_PROP_GPU_TRANSFERBUFFER_CREATE_NAME_STRING;
5270 SDL_SetGPUBufferName(device, buffer, text);
5300 SDL_SetGPUTextureName(device, texture, text);
5321 SDL_InsertGPUDebugLabel(command_buffer, text);
5352 SDL_PushGPUDebugGroup(command_buffer, name);
5371 SDL_PopGPUDebugGroup(command_buffer);
5391 SDL_ReleaseGPUTexture(device, texture);
5411 SDL_ReleaseGPUSampler(device, sampler);
5431 SDL_ReleaseGPUBuffer(device, buffer);
5452 SDL_ReleaseGPUTransferBuffer(device, transfer_buffer);
5473 SDL_ReleaseGPUComputePipeline(device, compute_pipeline);
5494 SDL_ReleaseGPUShader(device, shader);
5515 SDL_ReleaseGPUGraphicsPipeline(device, graphics_pipeline);
5550 return SDL_AcquireGPUCommandBuffer(device);
5577 SDL_PushGPUVertexUniformData(
5585 m_gPUCommandBuffer, slot_index, std::move(data));
5607 SDL_PushGPUFragmentUniformData(
5615 m_gPUCommandBuffer, slot_index, std::move(data));
5637 SDL_PushGPUComputeUniformData(
5645 m_gPUCommandBuffer, slot_index, std::move(data));
5673 std::span<const GPUColorTargetInfo> color_target_infos,
5676 return SDL_BeginGPURenderPass(command_buffer,
5677 color_target_infos.data(),
5678 color_target_infos.size(),
5679 depth_stencil_target_info);
5683 std::span<const GPUColorTargetInfo> color_target_infos,
5687 m_gPUCommandBuffer, color_target_infos, depth_stencil_target_info);
5703 SDL_BindGPUGraphicsPipeline(render_pass, graphics_pipeline);
5722 SDL_SetGPUViewport(render_pass, &viewport);
5740 SDL_SetGPUScissor(render_pass, &scissor);
5762 SDL_SetGPUBlendConstants(render_pass, blend_constants);
5780 SDL_SetGPUStencilReference(render_pass, reference);
5801 std::span<const GPUBufferBinding> bindings)
5803 SDL_BindGPUVertexBuffers(
5804 render_pass, first_slot, bindings.data(), bindings.size());
5809 std::span<const GPUBufferBinding> bindings)
5829 SDL_BindGPUIndexBuffer(render_pass, &binding, index_element_size);
5859 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings)
5861 SDL_BindGPUVertexSamplers(render_pass,
5863 texture_sampler_bindings.data(),
5864 texture_sampler_bindings.size());
5869 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings)
5872 m_gPURenderPass, first_slot, texture_sampler_bindings);
5897 SDL_BindGPUVertexStorageTextures(
5898 render_pass, first_slot, storage_textures.
data(), storage_textures.
size());
5906 m_gPURenderPass, first_slot, storage_textures);
5931 SDL_BindGPUVertexStorageBuffers(
5932 render_pass, first_slot, storage_buffers.
data(), storage_buffers.
size());
5940 m_gPURenderPass, first_slot, storage_buffers);
5963 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings)
5965 SDL_BindGPUFragmentSamplers(render_pass,
5967 texture_sampler_bindings.data(),
5968 texture_sampler_bindings.size());
5973 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings)
5976 m_gPURenderPass, first_slot, texture_sampler_bindings);
6001 SDL_BindGPUFragmentStorageTextures(
6002 render_pass, first_slot, storage_textures.
data(), storage_textures.
size());
6010 m_gPURenderPass, first_slot, storage_textures);
6035 SDL_BindGPUFragmentStorageBuffers(
6036 render_pass, first_slot, storage_buffers.
data(), storage_buffers.
size());
6044 m_gPURenderPass, first_slot, storage_buffers);
6077 SDL_DrawGPUIndexedPrimitives(render_pass,
6125 SDL_DrawGPUPrimitives(
6126 render_pass, num_vertices, num_instances, first_vertex, first_instance);
6135 m_gPURenderPass, num_vertices, num_instances, first_vertex, first_instance);
6159 SDL_DrawGPUPrimitivesIndirect(render_pass, buffer, offset, draw_count);
6190 SDL_DrawGPUIndexedPrimitivesIndirect(render_pass, buffer, offset, draw_count);
6198 m_gPURenderPass, buffer, offset, draw_count);
6213 SDL_EndGPURenderPass(render_pass);
6253 std::span<const GPUStorageTextureReadWriteBinding> storage_texture_bindings,
6254 std::span<const GPUStorageBufferReadWriteBinding> storage_buffer_bindings)
6256 return SDL_BeginGPUComputePass(command_buffer,
6257 storage_texture_bindings.data(),
6258 storage_texture_bindings.size(),
6259 storage_buffer_bindings.data(),
6260 storage_buffer_bindings.size());
6264 std::span<const GPUStorageTextureReadWriteBinding> storage_texture_bindings,
6265 std::span<const GPUStorageBufferReadWriteBinding> storage_buffer_bindings)
6268 m_gPUCommandBuffer, storage_texture_bindings, storage_buffer_bindings);
6282 SDL_BindGPUComputePipeline(compute_pass, compute_pipeline);
6310 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings)
6312 SDL_BindGPUComputeSamplers(compute_pass,
6314 texture_sampler_bindings.data(),
6315 texture_sampler_bindings.size());
6320 std::span<const GPUTextureSamplerBinding> texture_sampler_bindings)
6323 m_gPUComputePass, first_slot, texture_sampler_bindings);
6348 SDL_BindGPUComputeStorageTextures(
6349 compute_pass, first_slot, storage_textures.
data(), storage_textures.
size());
6357 m_gPUComputePass, first_slot, storage_textures);
6382 SDL_BindGPUComputeStorageBuffers(
6383 compute_pass, first_slot, storage_buffers.
data(), storage_buffers.
size());
6391 m_gPUComputePass, first_slot, storage_buffers);
6419 SDL_DispatchGPUCompute(
6420 compute_pass, groupcount_x, groupcount_y, groupcount_z);
6428 m_gPUComputePass, groupcount_x, groupcount_y, groupcount_z);
6453 SDL_DispatchGPUComputeIndirect(compute_pass, buffer, offset);
6473 SDL_EndGPUComputePass(compute_pass);
6497 return SDL_MapGPUTransferBuffer(device, transfer_buffer, cycle);
6517 SDL_UnmapGPUTransferBuffer(device, transfer_buffer);
6539 return SDL_BeginGPUCopyPass(command_buffer);
6569 SDL_UploadToGPUTexture(copy_pass, &source, &destination, cycle);
6598 SDL_UploadToGPUBuffer(copy_pass, &source, &destination, cycle);
6633 SDL_CopyGPUTextureToTexture(copy_pass, &source, &destination, w, h, d, cycle);
6645 m_gPUCopyPass, source, destination, w, h, d, cycle);
6669 SDL_CopyGPUBufferToBuffer(copy_pass, &source, &destination, size, cycle);
6698 SDL_DownloadFromGPUTexture(copy_pass, &source, &destination);
6724 SDL_DownloadFromGPUBuffer(copy_pass, &source, &destination);
6743 SDL_EndGPUCopyPass(copy_pass);
6761 SDL_GenerateMipmapsForGPUTexture(command_buffer, texture);
6782 SDL_BlitGPUTexture(command_buffer, &info);
6809 return SDL_WindowSupportsGPUSwapchainComposition(
6810 device, window, swapchain_composition);
6818 m_resource, window, swapchain_composition);
6839 return SDL_WindowSupportsGPUPresentMode(device, window, present_mode);
6876 CheckError(SDL_ClaimWindowForGPUDevice(device, window));
6897 SDL_ReleaseWindowFromGPUDevice(device, window);
6934 return SDL_SetGPUSwapchainParameters(
6935 device, window, swapchain_composition, present_mode);
6944 m_resource, window, swapchain_composition, present_mode);
6973 Uint32 allowed_frames_in_flight)
6975 return SDL_SetGPUAllowedFramesInFlight(device, allowed_frames_in_flight);
6997 return SDL_GetGPUSwapchainTextureFormat(device, window);
7052 Uint32* swapchain_texture_width =
nullptr,
7053 Uint32* swapchain_texture_height =
nullptr)
7056 CheckError(SDL_AcquireGPUSwapchainTexture(command_buffer,
7059 swapchain_texture_width,
7060 swapchain_texture_height));
7066 Uint32* swapchain_texture_width,
7067 Uint32* swapchain_texture_height)
7071 swapchain_texture_width,
7072 swapchain_texture_height);
7093 CheckError(SDL_WaitForGPUSwapchain(device, window));
7144 Uint32* swapchain_texture_width =
nullptr,
7145 Uint32* swapchain_texture_height =
nullptr)
7148 CheckError(SDL_WaitAndAcquireGPUSwapchainTexture(command_buffer,
7151 swapchain_texture_width,
7152 swapchain_texture_height));
7158 Uint32* swapchain_texture_width,
7159 Uint32* swapchain_texture_height)
7163 swapchain_texture_width,
7164 swapchain_texture_height);
7189 CheckError(SDL_SubmitGPUCommandBuffer(command_buffer));
7224 return SDL_SubmitGPUCommandBufferAndAcquireFence(command_buffer);
7255 CheckError(SDL_CancelGPUCommandBuffer(command_buffer));
7296 std::span<GPUFence* const> fences)
7299 SDL_WaitForGPUFences(device, wait_all, fences.data(), fences.size()));
7303 std::span<GPUFence* const> fences)
7321 return SDL_QueryGPUFence(device, fence);
7343 SDL_ReleaseGPUFence(device, fence);
7363 return SDL_GPUTextureFormatTexelBlockSize(format);
7383 return SDL_GPUTextureSupportsFormat(device, format, type, usage);
7407 return SDL_GPUTextureSupportsSampleCount(device, format, sample_count);
7430 Uint32 depth_or_layer_count)
7432 return SDL_CalculateGPUTextureFormatSize(
7433 format, width, height, depth_or_layer_count);
An opaque handle representing a buffer.
Definition: SDL3pp_gpu.h:405
GPUBuffer(GPUDeviceParam device, const GPUBufferCreateInfo &createinfo)
Creates a buffer object to be used in graphics or compute workflows.
Definition: SDL3pp_gpu.h:462
constexpr GPUBuffer(GPUBufferRaw gPUBuffer={})
Wraps GPUBuffer.
Definition: SDL3pp_gpu.h:414
An opaque handle representing a command buffer.
Definition: SDL3pp_gpu.h:1944
constexpr GPUCommandBuffer(GPUCommandBufferRaw gPUCommandBuffer={})
Wraps GPUCommandBuffer.
Definition: SDL3pp_gpu.h:1953
An opaque handle representing a compute pass.
Definition: SDL3pp_gpu.h:1436
constexpr GPUComputePass(GPUComputePassRaw gPUComputePass={})
Wraps GPUComputePass.
Definition: SDL3pp_gpu.h:1445
An opaque handle representing a compute pipeline.
Definition: SDL3pp_gpu.h:894
constexpr GPUComputePipeline(GPUComputePipelineRaw gPUComputePipeline={})
Wraps GPUComputePipeline.
Definition: SDL3pp_gpu.h:903
GPUComputePipeline(GPUDeviceParam device, const GPUComputePipelineCreateInfo &createinfo)
Creates a pipeline object to be used in a compute workflow.
Definition: SDL3pp_gpu.h:953
An opaque handle representing a copy pass.
Definition: SDL3pp_gpu.h:1658
constexpr GPUCopyPass(GPUCopyPassRaw gPUCopyPass={})
Wraps GPUCopyPass.
Definition: SDL3pp_gpu.h:1667
An opaque handle representing the SDL_GPU context.
Definition: SDL3pp_gpu.h:2933
GPUDevice(PropertiesParam props)
Creates a GPU context.
Definition: SDL3pp_gpu.h:3032
constexpr auto operator<=>(const GPUDevice &other) const =default
Comparison.
GPUDevice & operator=(GPUDevice other)
Assignment operator.
Definition: SDL3pp_gpu.h:3041
~GPUDevice()
Destructor.
Definition: SDL3pp_gpu.h:3038
constexpr GPUDevice(const GPUDevice &other)=delete
Copy constructor.
constexpr GPUDevice(const GPUDeviceRaw resource)
Constructs from GPUDeviceParam.
Definition: SDL3pp_gpu.h:2947
constexpr bool operator==(std::nullptr_t _) const
Comparison.
Definition: SDL3pp_gpu.h:3062
GPUDevice(GPUShaderFormat format_flags, bool debug_mode, StringParam name)
Creates a GPU context.
Definition: SDL3pp_gpu.h:2983
constexpr GPUDeviceRaw release()
Retrieves underlying GPUDeviceRaw and clear this.
Definition: SDL3pp_gpu.h:3051
constexpr GPUDevice()=default
Default ctor.
constexpr GPUDeviceRaw get() const
Retrieves underlying GPUDeviceRaw.
Definition: SDL3pp_gpu.h:3048
constexpr GPUDevice(GPUDevice &&other)
Move constructor.
Definition: SDL3pp_gpu.h:2956
An opaque handle representing a graphics pipeline.
Definition: SDL3pp_gpu.h:999
constexpr GPUGraphicsPipeline(GPUGraphicsPipelineRaw gPUGraphicsPipeline={})
Wraps GPUGraphicsPipeline.
Definition: SDL3pp_gpu.h:1008
GPUGraphicsPipeline(GPUDeviceParam device, const GPUGraphicsPipelineCreateInfo &createinfo)
Creates a pipeline object to be used in a graphics workflow.
Definition: SDL3pp_gpu.h:1034
An opaque handle representing a render pass.
Definition: SDL3pp_gpu.h:1108
constexpr GPURenderPass(GPURenderPassRaw gPURenderPass={})
Wraps GPURenderPass.
Definition: SDL3pp_gpu.h:1117
An opaque handle representing a sampler.
Definition: SDL3pp_gpu.h:705
constexpr GPUSampler(GPUSamplerRaw gPUSampler={})
Wraps GPUSampler.
Definition: SDL3pp_gpu.h:714
GPUSampler(GPUDeviceParam device, const GPUSamplerCreateInfo &createinfo)
Creates a sampler object to be used when binding textures in a graphics workflow.
Definition: SDL3pp_gpu.h:740
An opaque handle representing a compiled shader object.
Definition: SDL3pp_gpu.h:772
GPUShader(GPUDeviceParam device, const GPUShaderCreateInfo &createinfo)
Creates a shader to be used when creating a graphics pipeline.
Definition: SDL3pp_gpu.h:859
constexpr GPUShader(GPUShaderRaw gPUShader={})
Wraps GPUShader.
Definition: SDL3pp_gpu.h:781
An opaque handle representing a texture.
Definition: SDL3pp_gpu.h:596
GPUTexture(GPUDeviceParam device, const GPUTextureCreateInfo &createinfo)
Creates a texture object to be used in graphics or compute workflows.
Definition: SDL3pp_gpu.h:665
constexpr GPUTexture(GPUTextureRaw gPUTexture={})
Wraps GPUTexture.
Definition: SDL3pp_gpu.h:605
An opaque handle representing a transfer buffer.
Definition: SDL3pp_gpu.h:501
constexpr GPUTransferBuffer(GPUTransferBufferRaw gPUTransferBuffer={})
Wraps GPUTransferBuffer.
Definition: SDL3pp_gpu.h:510
GPUTransferBuffer(GPUDeviceParam device, const GPUTransferBufferCreateInfo &createinfo)
Creates a transfer buffer to be used when uploading to or downloading from graphics resources.
Definition: SDL3pp_gpu.h:542
Optional-like shim for references.
Definition: SDL3pp_optionalRef.h:20
Source byte stream.
Definition: SDL3pp_strings.h:239
constexpr size_t size_bytes() const
Retrieves contained size in bytes.
Definition: SDL3pp_strings.h:303
constexpr const char * data() const
Retrieves contained data.
Definition: SDL3pp_strings.h:306
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:43
constexpr void CheckError(bool result)
Check and throw if returned value from SDL is an error.
Definition: SDL3pp_error.h:198
void Destroy()
Destroys a GPU context previously returned by GPUDevice.GPUDevice.
Definition: SDL3pp_gpu.h:4747
SDL_GPUDepthStencilState GPUDepthStencilState
A structure specifying the parameters of the graphics pipeline depth stencil state.
Definition: SDL3pp_gpu.h:4569
GPUShaderFormat GetGPUShaderFormats(GPUDeviceParam device)
Returns the supported shader formats for this GPU context.
Definition: SDL3pp_gpu.h:4806
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_UINT
GPU_VERTEXELEMENTFORMAT_UINT.
Definition: SDL3pp_gpu.h:4033
constexpr GPUShaderFormat GPU_SHADERFORMAT_DXIL
DXIL SM6_0 shaders for D3D12.
Definition: SDL3pp_gpu.h:2337
GPUTransferBuffer CreateGPUTransferBuffer(GPUDeviceParam device, const GPUTransferBufferCreateInfo &createinfo)
Creates a transfer buffer to be used when uploading to or downloading from graphics resources.
Definition: SDL3pp_gpu.h:5229
void Dispatch(Uint32 groupcount_x, Uint32 groupcount_y, Uint32 groupcount_z)
Dispatches compute work.
Definition: SDL3pp_gpu.h:6423
void PushComputeUniformData(Uint32 slot_index, SourceBytes data)
Pushes data to a uniform slot on the command buffer.
Definition: SDL3pp_gpu.h:5641
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2779
constexpr GPUFillMode GPU_FILLMODE_FILL
Polygons will be rendered via rasterization.
Definition: SDL3pp_gpu.h:4137
constexpr GPUShaderFormat GPU_SHADERFORMAT_PRIVATE
Shaders for NDA'd platforms.
Definition: SDL3pp_gpu.h:2328
SDL_GPUTexture * GPUTextureRaw
Alias to raw representation for GPUTexture.
Definition: SDL3pp_gpu.h:343
constexpr GPUCompareOp GPU_COMPAREOP_LESS_OR_EQUAL
The comparison evaluates reference <= test.
Definition: SDL3pp_gpu.h:4202
constexpr GPUSwapchainComposition GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084
GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084.
Definition: SDL3pp_gpu.h:2383
const char * GetDriver()
Returns the name of the backend used to create this GPU context.
Definition: SDL3pp_gpu.h:4792
int GetNumGPUDrivers()
Get the number of GPU drivers compiled into SDL.
Definition: SDL3pp_gpu.h:4758
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:5603
GPUTexture WaitAndAcquireGPUSwapchainTexture(GPUCommandBuffer command_buffer, WindowParam 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:7141
constexpr GPUIndexElementSize GPU_INDEXELEMENTSIZE_32BIT
The index elements are 32-bit.
Definition: SDL3pp_gpu.h:1083
SDL_GPUTextureRegion GPUTextureRegion
A structure specifying a region of a texture.
Definition: SDL3pp_gpu.h:1621
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:5996
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT
GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT.
Definition: SDL3pp_gpu.h:2794
constexpr GPUStencilOp GPU_STENCILOP_ZERO
Sets the value to 0.
Definition: SDL3pp_gpu.h:4235
constexpr GPUCompareOp GPU_COMPAREOP_ALWAYS
The comparison always evaluates true.
Definition: SDL3pp_gpu.h:4216
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8_UNORM
GPU_TEXTUREFORMAT_R8_UNORM.
Definition: SDL3pp_gpu.h:2515
constexpr GPUBlendOp GPU_BLENDOP_MIN
min(source, destination)
Definition: SDL3pp_gpu.h:4286
SDL_GPUVertexAttribute GPUVertexAttribute
A structure specifying a vertex attribute.
Definition: SDL3pp_gpu.h:4501
GPUTexture AcquireGPUSwapchainTexture(GPUCommandBuffer command_buffer, WindowParam window, Uint32 *swapchain_texture_width=nullptr, Uint32 *swapchain_texture_height=nullptr)
Acquire a texture to use in presentation.
Definition: SDL3pp_gpu.h:7049
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:6185
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_FLOAT2
GPU_VERTEXELEMENTFORMAT_FLOAT2.
Definition: SDL3pp_gpu.h:4048
void WaitForFences(bool wait_all, std::span< GPUFence *const > fences)
Blocks the thread until the given fences are signaled.
Definition: SDL3pp_gpu.h:7302
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:6625
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32G32_FLOAT
GPU_TEXTUREFORMAT_R32G32_FLOAT.
Definition: SDL3pp_gpu.h:2602
constexpr GPUTextureUsageFlags GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE
Texture supports reads and writes in the same compute shader.
Definition: SDL3pp_gpu.h:2897
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_USHORT2_NORM
GPU_VERTEXELEMENTFORMAT_USHORT2_NORM.
Definition: SDL3pp_gpu.h:4099
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8_INT
GPU_TEXTUREFORMAT_R8G8_INT.
Definition: SDL3pp_gpu.h:2641
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_6x6_UNORM
GPU_TEXTUREFORMAT_ASTC_6x6_UNORM.
Definition: SDL3pp_gpu.h:2710
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16B16A16_INT
GPU_TEXTUREFORMAT_R16G16B16A16_INT.
Definition: SDL3pp_gpu.h:2653
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_12x12_UNORM
GPU_TEXTUREFORMAT_ASTC_12x12_UNORM.
Definition: SDL3pp_gpu.h:2737
void BlitGPUTexture(GPUCommandBuffer command_buffer, const GPUBlitInfo &info)
Blits from a source texture region to a destination texture region.
Definition: SDL3pp_gpu.h:6779
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:7221
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT
GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT.
Definition: SDL3pp_gpu.h:2782
constexpr GPUStencilOp GPU_STENCILOP_INVERT
Bitwise-inverts the current value.
Definition: SDL3pp_gpu.h:4249
constexpr GPUFrontFace GPU_FRONTFACE_CLOCKWISE
A triangle with clockwise vertex winding will be considered front-facing.
Definition: SDL3pp_gpu.h:4179
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_D32_FLOAT
GPU_TEXTUREFORMAT_D32_FLOAT.
Definition: SDL3pp_gpu.h:2689
bool SetAllowedFramesInFlight(Uint32 allowed_frames_in_flight)
Configures the maximum allowed number of frames in flight.
Definition: SDL3pp_gpu.h:6978
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_FLOAT3
GPU_VERTEXELEMENTFORMAT_FLOAT3.
Definition: SDL3pp_gpu.h:4051
constexpr GPUCompareOp GPU_COMPAREOP_GREATER_OR_EQUAL
The comparison evaluates reference >= test.
Definition: SDL3pp_gpu.h:4212
void ReleaseShader(GPUShader shader)
Frees the given shader as soon as it is safe to do so.
Definition: SDL3pp_gpu.h:5497
void ReleaseTransferBuffer(GPUTransferBuffer transfer_buffer)
Frees the given transfer buffer as soon as it is safe to do so.
Definition: SDL3pp_gpu.h:5455
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT
GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT.
Definition: SDL3pp_gpu.h:2800
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:6085
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_UBYTE2
GPU_VERTEXELEMENTFORMAT_UBYTE2.
Definition: SDL3pp_gpu.h:4063
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:5892
constexpr GPUPrimitiveType GPU_PRIMITIVETYPE_LINELIST
A series of separate lines.
Definition: SDL3pp_gpu.h:3844
GPUSampler CreateSampler(const GPUSamplerCreateInfo &createinfo)
Creates a sampler object to be used when binding textures in a graphics workflow.
Definition: SDL3pp_gpu.h:4949
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_USHORT4_NORM
GPU_VERTEXELEMENTFORMAT_USHORT4_NORM.
Definition: SDL3pp_gpu.h:4102
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32_UINT
GPU_TEXTUREFORMAT_R32_UINT.
Definition: SDL3pp_gpu.h:2629
void PushGPUDebugGroup(GPUCommandBuffer command_buffer, StringParam name)
Begins a debug group with an arbitrary name.
Definition: SDL3pp_gpu.h:5350
void ReleaseGPUSampler(GPUDeviceParam device, GPUSampler sampler)
Frees the given sampler as soon as it is safe to do so.
Definition: SDL3pp_gpu.h:5409
bool GPUTextureSupportsSampleCount(GPUDeviceParam device, GPUTextureFormat format, GPUSampleCount sample_count)
Determines if a sample count for a texture format is supported.
Definition: SDL3pp_gpu.h:7403
void * MapTransferBuffer(GPUTransferBuffer transfer_buffer, bool cycle)
Maps a transfer buffer into application address space.
Definition: SDL3pp_gpu.h:6500
void SetGPUBufferName(GPUDeviceParam device, GPUBuffer buffer, StringParam text)
Sets an arbitrary string constant to label a buffer.
Definition: SDL3pp_gpu.h:5266
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x6_UNORM
GPU_TEXTUREFORMAT_ASTC_8x6_UNORM.
Definition: SDL3pp_gpu.h:2716
void SetGPUViewport(GPURenderPass render_pass, const GPUViewport &viewport)
Sets the current viewport state on a command buffer.
Definition: SDL3pp_gpu.h:5719
constexpr GPUBlendFactor GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR
1 - blend constant
Definition: SDL3pp_gpu.h:4339
GPUComputePipeline CreateComputePipeline(const GPUComputePipelineCreateInfo &createinfo)
Creates a pipeline object to be used in a compute workflow.
Definition: SDL3pp_gpu.h:4868
void SetScissor(const RectRaw &scissor)
Sets the current scissor state on a command buffer.
Definition: SDL3pp_gpu.h:5743
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:7386
constexpr GPUCompareOp GPU_COMPAREOP_NOT_EQUAL
The comparison evaluates reference != test.
Definition: SDL3pp_gpu.h:4209
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_USHORT2
GPU_VERTEXELEMENTFORMAT_USHORT2.
Definition: SDL3pp_gpu.h:4087
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16B16A16_UNORM
GPU_TEXTUREFORMAT_R16G16B16A16_UNORM.
Definition: SDL3pp_gpu.h:2530
SDL_GPUColorTargetInfo GPUColorTargetInfo
A structure specifying the parameters of a color target used by a render pass.
Definition: SDL3pp_gpu.h:1831
SDL_GPUCommandBuffer * GPUCommandBufferRaw
Alias to raw representation for GPUCommandBuffer.
Definition: SDL3pp_gpu.h:358
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16_UINT
GPU_TEXTUREFORMAT_R16G16_UINT.
Definition: SDL3pp_gpu.h:2623
SDL_GPUCompareOp GPUCompareOp
Specifies a comparison operator for depth, stencil and sampler operations.
Definition: SDL3pp_gpu.h:4188
void CancelGPUCommandBuffer(GPUCommandBuffer command_buffer)
Cancels a command buffer.
Definition: SDL3pp_gpu.h:7253
SDL_GPUDepthStencilTargetInfo GPUDepthStencilTargetInfo
A structure specifying the parameters of a depth-stencil target used by a render pass.
Definition: SDL3pp_gpu.h:1877
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:4271
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x8_UNORM
GPU_TEXTUREFORMAT_ASTC_10x8_UNORM.
Definition: SDL3pp_gpu.h:2728
constexpr GPUPrimitiveType GPU_PRIMITIVETYPE_TRIANGLELIST
A series of separate triangles.
Definition: SDL3pp_gpu.h:3838
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_A8_UNORM
GPU_TEXTUREFORMAT_A8_UNORM.
Definition: SDL3pp_gpu.h:2512
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_INT4
GPU_VERTEXELEMENTFORMAT_INT4.
Definition: SDL3pp_gpu.h:4030
SDL_GPUGraphicsPipelineTargetInfo GPUGraphicsPipelineTargetInfo
A structure specifying the descriptions of render targets used in a graphics pipeline.
Definition: SDL3pp_gpu.h:4591
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT
GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT.
Definition: SDL3pp_gpu.h:2788
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32_FLOAT
GPU_TEXTUREFORMAT_R32_FLOAT.
Definition: SDL3pp_gpu.h:2599
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:3899
constexpr GPUSamplerAddressMode GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE
Specifies that the coordinates will clamp to the 0-1 range.
Definition: SDL3pp_gpu.h:4416
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16_UNORM
GPU_TEXTUREFORMAT_R16G16_UNORM.
Definition: SDL3pp_gpu.h:2527
SDL_GPUGraphicsPipeline * GPUGraphicsPipelineRaw
Alias to raw representation for GPUGraphicsPipeline.
Definition: SDL3pp_gpu.h:355
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:6119
Uint32 GPUBufferUsageFlags
Specifies how a buffer is intended to be used by the client.
Definition: SDL3pp_gpu.h:3953
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2758
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:6318
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT
GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT.
Definition: SDL3pp_gpu.h:2791
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC1_RGBA_UNORM
GPU_TEXTUREFORMAT_BC1_RGBA_UNORM.
Definition: SDL3pp_gpu.h:2548
void BlitTexture(const GPUBlitInfo &info)
Blits from a source texture region to a destination texture region.
Definition: SDL3pp_gpu.h:6785
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:6701
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:5971
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32G32_UINT
GPU_TEXTUREFORMAT_R32G32_UINT.
Definition: SDL3pp_gpu.h:2632
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:5825
SDL_GPUSampler * GPUSamplerRaw
Alias to raw representation for GPUSampler.
Definition: SDL3pp_gpu.h:346
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC3_RGBA_UNORM
GPU_TEXTUREFORMAT_BC3_RGBA_UNORM.
Definition: SDL3pp_gpu.h:2554
void SetGPUTextureName(GPUDeviceParam device, GPUTexture texture, StringParam text)
Sets an arbitrary string constant to label a texture.
Definition: SDL3pp_gpu.h:5296
bool GPUTextureSupportsFormat(GPUDeviceParam device, GPUTextureFormat format, GPUTextureType type, GPUTextureUsageFlags usage)
Determines whether a texture format is supported for a given type and usage.
Definition: SDL3pp_gpu.h:7378
Uint32 GPUTextureFormatTexelBlockSize(GPUTextureFormat format)
Obtains the texel block size for a texture format.
Definition: SDL3pp_gpu.h:7361
SDL_GPUColorTargetDescription GPUColorTargetDescription
A structure specifying the parameters of color targets used in a graphics pipeline.
Definition: SDL3pp_gpu.h:4579
constexpr GPUTextureUsageFlags GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ
Texture supports storage reads in graphics stages.
Definition: SDL3pp_gpu.h:2880
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:6386
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_SHORT2
GPU_VERTEXELEMENTFORMAT_SHORT2.
Definition: SDL3pp_gpu.h:4081
void ReleaseGPUFence(GPUDeviceParam device, GPUFence *fence)
Releases a fence obtained from GPUCommandBuffer.SubmitAndAcquireFence.
Definition: SDL3pp_gpu.h:7341
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8_SNORM
GPU_TEXTUREFORMAT_R8_SNORM.
Definition: SDL3pp_gpu.h:2572
constexpr GPUTextureUsageFlags GPU_TEXTUREUSAGE_SAMPLER
Texture supports sampling.
Definition: SDL3pp_gpu.h:2870
GPUCommandBuffer AcquireCommandBuffer()
Acquire a command buffer.
Definition: SDL3pp_gpu.h:5553
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2770
void Cancel()
Cancels a command buffer.
Definition: SDL3pp_gpu.h:7258
void ClaimWindowForGPUDevice(GPUDeviceParam device, WindowParam window)
Claims a window, creating a swapchain structure for it.
Definition: SDL3pp_gpu.h:6874
SDL_GPUIndirectDispatchCommand GPUIndirectDispatchCommand
A structure specifying the parameters of an indexed dispatch command.
Definition: SDL3pp_gpu.h:4467
constexpr GPUColorComponentFlags GPU_COLORCOMPONENT_A
the alpha component
Definition: SDL3pp_gpu.h:4364
constexpr GPUBufferUsageFlags GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE
Buffer supports storage writes in the compute stage.
Definition: SDL3pp_gpu.h:3973
constexpr GPUSamplerMipmapMode GPU_SAMPLERMIPMAPMODE_LINEAR
Linear filtering.
Definition: SDL3pp_gpu.h:4394
constexpr GPUShaderFormat GPU_SHADERFORMAT_DXBC
DXBC SM5_1 shaders for D3D12.
Definition: SDL3pp_gpu.h:2334
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT
GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT.
Definition: SDL3pp_gpu.h:2809
void SetStencilReference(Uint8 reference)
Sets the current stencil reference value on a command buffer.
Definition: SDL3pp_gpu.h:5783
void ReleaseGPUComputePipeline(GPUDeviceParam device, GPUComputePipeline compute_pipeline)
Frees the given compute pipeline as soon as it is safe to do so.
Definition: SDL3pp_gpu.h:5470
SDL_GPUVertexBufferDescription GPUVertexBufferDescription
A structure specifying the parameters of vertex buffers used in a graphics pipeline.
Definition: SDL3pp_gpu.h:4487
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R11G11B10_UFLOAT
GPU_TEXTUREFORMAT_R11G11B10_UFLOAT.
Definition: SDL3pp_gpu.h:2608
constexpr GPUTextureUsageFlags GPU_TEXTUREUSAGE_COLOR_TARGET
Texture is a color render target.
Definition: SDL3pp_gpu.h:2873
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_INT
GPU_VERTEXELEMENTFORMAT_INT.
Definition: SDL3pp_gpu.h:4021
constexpr GPUStencilOp GPU_STENCILOP_REPLACE
Sets the value to reference.
Definition: SDL3pp_gpu.h:4238
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16_INT
GPU_TEXTUREFORMAT_R16_INT.
Definition: SDL3pp_gpu.h:2647
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT
GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT.
Definition: SDL3pp_gpu.h:2692
void BindFragmentStorageTextures(Uint32 first_slot, SpanRef< const GPUTextureRaw > storage_textures)
Binds storage textures for use on the fragment shader.
Definition: SDL3pp_gpu.h:6005
SDL_GPUMultisampleState GPUMultisampleState
A structure specifying the parameters of the graphics pipeline multisample state.
Definition: SDL3pp_gpu.h:4559
bool QueryFence(GPUFence *fence)
Checks the status of a fence.
Definition: SDL3pp_gpu.h:7324
void UploadToBuffer(const GPUTransferBufferLocation &source, const GPUBufferRegion &destination, bool cycle)
Uploads data from a transfer buffer to a buffer.
Definition: SDL3pp_gpu.h:6601
SDL_GPUIndexedIndirectDrawCommand GPUIndexedIndirectDrawCommand
A structure specifying the parameters of an indexed indirect draw command.
Definition: SDL3pp_gpu.h:4458
constexpr GPUBlendFactor GPU_BLENDFACTOR_DST_COLOR
destination color
Definition: SDL3pp_gpu.h:4318
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT
GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT.
Definition: SDL3pp_gpu.h:2596
void ReleaseComputePipeline(GPUComputePipeline compute_pipeline)
Frees the given compute pipeline as soon as it is safe to do so.
Definition: SDL3pp_gpu.h:5476
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:5867
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:6162
void ReleaseWindowFromGPUDevice(GPUDeviceParam device, WindowParam window)
Unclaims a window, destroying its swapchain structure.
Definition: SDL3pp_gpu.h:6894
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_FLOAT4
GPU_VERTEXELEMENTFORMAT_FLOAT4.
Definition: SDL3pp_gpu.h:4054
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT
GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT.
Definition: SDL3pp_gpu.h:2815
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:4303
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2749
GPUBuffer CreateBuffer(const GPUBufferCreateInfo &createinfo)
Creates a buffer object to be used in graphics or compute workflows.
Definition: SDL3pp_gpu.h:5191
bool QueryGPUFence(GPUDeviceParam device, GPUFence *fence)
Checks the status of a fence.
Definition: SDL3pp_gpu.h:7319
GPUCopyPass BeginCopyPass()
Begins a copy pass on a command buffer.
Definition: SDL3pp_gpu.h:6542
SDL_GPUSampleCount GPUSampleCount
Specifies the sample count of a texture.
Definition: SDL3pp_gpu.h:2911
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT
GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT.
Definition: SDL3pp_gpu.h:2812
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32G32_INT
GPU_TEXTUREFORMAT_R32G32_INT.
Definition: SDL3pp_gpu.h:2659
constexpr GPUBlendOp GPU_BLENDOP_INVALID
GPU_BLENDOP_INVALID.
Definition: SDL3pp_gpu.h:4273
constexpr GPUSwapchainComposition GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR
GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR.
Definition: SDL3pp_gpu.h:2380
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:5671
SDL_GPUFillMode GPUFillMode
Specifies the fill mode of the graphics pipeline.
Definition: SDL3pp_gpu.h:4135
SDL_GPUColorTargetBlendState GPUColorTargetBlendState
A structure specifying the blend state of a color target.
Definition: SDL3pp_gpu.h:4531
void BindVertexStorageTextures(Uint32 first_slot, SpanRef< const GPUTextureRaw > storage_textures)
Binds storage textures for use on the vertex shader.
Definition: SDL3pp_gpu.h:5901
GPUDevice CreateGPUDeviceWithProperties(PropertiesParam props)
Creates a GPU context.
Definition: SDL3pp_gpu.h:4695
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:6070
constexpr GPUPresentMode GPU_PRESENTMODE_IMMEDIATE
GPU_PRESENTMODE_IMMEDIATE.
Definition: SDL3pp_gpu.h:2416
constexpr GPUBufferUsageFlags GPU_BUFFERUSAGE_VERTEX
Buffer is a vertex buffer.
Definition: SDL3pp_gpu.h:3955
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8B8A8_UINT
GPU_TEXTUREFORMAT_R8G8B8A8_UINT.
Definition: SDL3pp_gpu.h:2617
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC4_R_UNORM
GPU_TEXTUREFORMAT_BC4_R_UNORM.
Definition: SDL3pp_gpu.h:2557
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:5856
Uint32 GPUTextureUsageFlags
Specifies how a texture is intended to be used by the client.
Definition: SDL3pp_gpu.h:2868
constexpr GPUBufferUsageFlags GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ
Buffer supports storage reads in graphics stages.
Definition: SDL3pp_gpu.h:3964
constexpr GPUCubeMapFace GPU_CUBEMAPFACE_POSITIVEZ
GPU_CUBEMAPFACE_POSITIVEZ.
Definition: SDL3pp_gpu.h:3930
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2740
void DispatchIndirect(GPUBuffer buffer, Uint32 offset)
Dispatches compute work with parameters set from a buffer.
Definition: SDL3pp_gpu.h:6456
constexpr GPUCompareOp GPU_COMPAREOP_EQUAL
The comparison evaluates reference == test.
Definition: SDL3pp_gpu.h:4199
SDL_GPUTextureLocation GPUTextureLocation
A structure specifying a location in a texture.
Definition: SDL3pp_gpu.h:1597
SDL_GPUShaderStage GPUShaderStage
Specifies which stage a shader program corresponds to.
Definition: SDL3pp_gpu.h:4001
void SetViewport(const GPUViewport &viewport)
Sets the current viewport state on a command buffer.
Definition: SDL3pp_gpu.h:5725
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_SHORT2_NORM
GPU_VERTEXELEMENTFORMAT_SHORT2_NORM.
Definition: SDL3pp_gpu.h:4093
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_BYTE4
GPU_VERTEXELEMENTFORMAT_BYTE4.
Definition: SDL3pp_gpu.h:4060
SDL_GPUSamplerMipmapMode GPUSamplerMipmapMode
Specifies a mipmap mode used by a sampler.
Definition: SDL3pp_gpu.h:4389
constexpr GPUSwapchainComposition GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR
GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR.
Definition: SDL3pp_gpu.h:2377
SDL_GPUGraphicsPipelineCreateInfo GPUGraphicsPipelineCreateInfo
A structure specifying the parameters of a graphics pipeline state.
Definition: SDL3pp_gpu.h:985
GPUTextureFormat GetSwapchainTextureFormat(WindowParam window)
Obtains the texture format of the swapchain for the given window.
Definition: SDL3pp_gpu.h:7000
constexpr GPUBlendFactor GPU_BLENDFACTOR_ONE_MINUS_SRC_COLOR
1 - source color
Definition: SDL3pp_gpu.h:4315
SDL_GPUTextureType GPUTextureType
Specifies the type of a texture.
Definition: SDL3pp_gpu.h:2831
Uint32 GPUShaderFormat
Specifies the format of shader code.
Definition: SDL3pp_gpu.h:2323
Uint8 GPUColorComponentFlags
Specifies which color components are written in a graphics pipeline.
Definition: SDL3pp_gpu.h:4353
SDL_GPUTextureTransferInfo GPUTextureTransferInfo
A structure specifying parameters related to transferring data to or from a texture.
Definition: SDL3pp_gpu.h:1632
void ReleaseFence(GPUFence *fence)
Releases a fence obtained from GPUCommandBuffer.SubmitAndAcquireFence.
Definition: SDL3pp_gpu.h:7346
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_B5G5R5A1_UNORM
GPU_TEXTUREFORMAT_B5G5R5A1_UNORM.
Definition: SDL3pp_gpu.h:2539
GPUGraphicsPipeline CreateGraphicsPipeline(const GPUGraphicsPipelineCreateInfo &createinfo)
Creates a pipeline object to be used in a graphics workflow.
Definition: SDL3pp_gpu.h:4909
void Submit()
Submits a command buffer so its commands can be processed on the GPU.
Definition: SDL3pp_gpu.h:7192
bool SetGPUSwapchainParameters(GPUDeviceParam device, WindowParam window, GPUSwapchainComposition swapchain_composition, GPUPresentMode present_mode)
Changes the swapchain parameters for the given claimed window.
Definition: SDL3pp_gpu.h:6928
constexpr GPUFilter GPU_FILTER_LINEAR
Linear filtering.
Definition: SDL3pp_gpu.h:4379
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:6279
void BindFragmentStorageBuffers(Uint32 first_slot, SpanRef< const GPUBufferRaw > storage_buffers)
Binds storage buffers for use on the fragment shader.
Definition: SDL3pp_gpu.h:6039
constexpr GPUBlendFactor GPU_BLENDFACTOR_CONSTANT_COLOR
blend constant
Definition: SDL3pp_gpu.h:4336
constexpr GPUVertexInputRate GPU_VERTEXINPUTRATE_VERTEX
Attribute addressing is a function of the vertex index.
Definition: SDL3pp_gpu.h:4121
SDL_GPUPresentMode GPUPresentMode
Specifies the timing that will be used to present swapchain textures to the OS.
Definition: SDL3pp_gpu.h:2411
SDL_GPUBufferBinding GPUBufferBinding
A structure specifying parameters in a buffer binding call.
Definition: SDL3pp_gpu.h:1069
void UnmapTransferBuffer(GPUTransferBuffer transfer_buffer)
Unmaps a previously mapped transfer buffer.
Definition: SDL3pp_gpu.h:6520
void ReleaseSampler(GPUSampler sampler)
Frees the given sampler as soon as it is safe to do so.
Definition: SDL3pp_gpu.h:5414
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8B8A8_UNORM
GPU_TEXTUREFORMAT_R8G8B8A8_UNORM.
Definition: SDL3pp_gpu.h:2521
SDL_GPUBufferLocation GPUBufferLocation
A structure specifying a location in a buffer.
Definition: SDL3pp_gpu.h:1608
GPUCommandBuffer AcquireGPUCommandBuffer(GPUDeviceParam device)
Acquire a command buffer.
Definition: SDL3pp_gpu.h:5548
SDL_GPUCopyPass * GPUCopyPassRaw
Alias to raw representation for GPUCopyPass.
Definition: SDL3pp_gpu.h:367
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8B8A8_INT
GPU_TEXTUREFORMAT_R8G8B8A8_INT.
Definition: SDL3pp_gpu.h:2644
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:6636
constexpr GPUTransferBufferUsage GPU_TRANSFERBUFFERUSAGE_UPLOAD
GPU_TRANSFERBUFFERUSAGE_UPLOAD.
Definition: SDL3pp_gpu.h:3988
SDL_GPUBufferCreateInfo GPUBufferCreateInfo
A structure specifying the parameters of a buffer.
Definition: SDL3pp_gpu.h:380
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT
GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT.
Definition: SDL3pp_gpu.h:2605
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:3906
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16_SNORM
GPU_TEXTUREFORMAT_R16_SNORM.
Definition: SDL3pp_gpu.h:2581
constexpr GPUPresentMode GPU_PRESENTMODE_VSYNC
GPU_PRESENTMODE_VSYNC.
Definition: SDL3pp_gpu.h:2413
SDL_GPUShader * GPUShaderRaw
Alias to raw representation for GPUShader.
Definition: SDL3pp_gpu.h:349
constexpr GPUSamplerAddressMode GPU_SAMPLERADDRESSMODE_REPEAT
Specifies that the coordinates will wrap around.
Definition: SDL3pp_gpu.h:4407
SDL_GPUBuffer * GPUBufferRaw
Alias to raw representation for GPUBuffer.
Definition: SDL3pp_gpu.h:337
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_HALF4
GPU_VERTEXELEMENTFORMAT_HALF4.
Definition: SDL3pp_gpu.h:4108
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_UINT3
GPU_VERTEXELEMENTFORMAT_UINT3.
Definition: SDL3pp_gpu.h:4039
constexpr GPUCubeMapFace GPU_CUBEMAPFACE_NEGATIVEX
GPU_CUBEMAPFACE_NEGATIVEX.
Definition: SDL3pp_gpu.h:3921
void End()
Ends the current compute pass.
Definition: SDL3pp_gpu.h:6476
constexpr GPUShaderStage GPU_SHADERSTAGE_VERTEX
GPU_SHADERSTAGE_VERTEX.
Definition: SDL3pp_gpu.h:4003
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_D24_UNORM
GPU_TEXTUREFORMAT_D24_UNORM.
Definition: SDL3pp_gpu.h:2686
SDL_GPUCullMode GPUCullMode
Specifies the facing direction in which triangle faces will be culled.
Definition: SDL3pp_gpu.h:4150
void SetGPUStencilReference(GPURenderPass render_pass, Uint8 reference)
Sets the current stencil reference value on a command buffer.
Definition: SDL3pp_gpu.h:5778
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:6030
void WaitForSwapchain(WindowParam window)
Blocks the thread until a swapchain texture is available to be acquired.
Definition: SDL3pp_gpu.h:7096
constexpr GPUCompareOp GPU_COMPAREOP_LESS
The comparison evaluates reference < test.
Definition: SDL3pp_gpu.h:4196
constexpr GPUTextureUsageFlags GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET
Texture is a depth stencil target.
Definition: SDL3pp_gpu.h:2876
void DispatchGPUCompute(GPUComputePass compute_pass, Uint32 groupcount_x, Uint32 groupcount_y, Uint32 groupcount_z)
Dispatches compute work.
Definition: SDL3pp_gpu.h:6414
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_INT2
GPU_VERTEXELEMENTFORMAT_INT2.
Definition: SDL3pp_gpu.h:4024
constexpr GPUPrimitiveType GPU_PRIMITIVETYPE_POINTLIST
A series of separate points.
Definition: SDL3pp_gpu.h:3850
constexpr GPUBlendFactor GPU_BLENDFACTOR_ONE_MINUS_DST_COLOR
1 - destination color
Definition: SDL3pp_gpu.h:4321
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC7_RGBA_UNORM
GPU_TEXTUREFORMAT_BC7_RGBA_UNORM.
Definition: SDL3pp_gpu.h:2563
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:6251
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:5960
GPUGraphicsPipeline CreateGPUGraphicsPipeline(GPUDeviceParam device, const GPUGraphicsPipelineCreateInfo &createinfo)
Creates a pipeline object to be used in a graphics workflow.
Definition: SDL3pp_gpu.h:4902
constexpr GPUVertexInputRate GPU_VERTEXINPUTRATE_INSTANCE
Attribute addressing is a function of the instance index.
Definition: SDL3pp_gpu.h:4125
SDL_GPUStencilOpState GPUStencilOpState
A structure specifying the stencil operation state of a graphics pipeline.
Definition: SDL3pp_gpu.h:4522
SDL_GPUVertexElementFormat GPUVertexElementFormat
Specifies the format of a vertex attribute.
Definition: SDL3pp_gpu.h:4016
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT
GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT.
Definition: SDL3pp_gpu.h:2566
constexpr GPUShaderStage GPU_SHADERSTAGE_FRAGMENT
GPU_SHADERSTAGE_FRAGMENT.
Definition: SDL3pp_gpu.h:4006
constexpr GPUCompareOp GPU_COMPAREOP_INVALID
GPU_COMPAREOP_INVALID.
Definition: SDL3pp_gpu.h:4190
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC5_RG_UNORM
GPU_TEXTUREFORMAT_BC5_RG_UNORM.
Definition: SDL3pp_gpu.h:2560
bool WindowSupportsSwapchainComposition(WindowParam window, GPUSwapchainComposition swapchain_composition)
Determines whether a swapchain composition is supported by the window.
Definition: SDL3pp_gpu.h:6813
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:5832
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:5926
void UnmapGPUTransferBuffer(GPUDeviceParam device, GPUTransferBuffer transfer_buffer)
Unmaps a previously mapped transfer buffer.
Definition: SDL3pp_gpu.h:6514
constexpr GPUCubeMapFace GPU_CUBEMAPFACE_NEGATIVEZ
GPU_CUBEMAPFACE_NEGATIVEZ.
Definition: SDL3pp_gpu.h:3933
constexpr GPUPrimitiveType GPU_PRIMITIVETYPE_LINESTRIP
A series of connected lines.
Definition: SDL3pp_gpu.h:3847
GPUBuffer CreateGPUBuffer(GPUDeviceParam device, const GPUBufferCreateInfo &createinfo)
Creates a buffer object to be used in graphics or compute workflows.
Definition: SDL3pp_gpu.h:5185
constexpr GPUStencilOp GPU_STENCILOP_DECREMENT_AND_WRAP
Decrements the current value and wraps to the maximum value.
Definition: SDL3pp_gpu.h:4257
void ReleaseWindow(WindowParam window)
Unclaims a window, destroying its swapchain structure.
Definition: SDL3pp_gpu.h:6900
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8_UINT
GPU_TEXTUREFORMAT_R8_UINT.
Definition: SDL3pp_gpu.h:2611
SDL_GPUTransferBuffer * GPUTransferBufferRaw
Alias to raw representation for GPUTransferBuffer.
Definition: SDL3pp_gpu.h:340
constexpr GPUSampleCount GPU_SAMPLECOUNT_4
MSAA 4x.
Definition: SDL3pp_gpu.h:2919
SDL_GPUTextureSamplerBinding GPUTextureSamplerBinding
A structure specifying parameters in a sampler binding call.
Definition: SDL3pp_gpu.h:1094
constexpr GPUTransferBufferUsage GPU_TRANSFERBUFFERUSAGE_DOWNLOAD
GPU_TRANSFERBUFFERUSAGE_DOWNLOAD.
Definition: SDL3pp_gpu.h:3991
void ReleaseGPUGraphicsPipeline(GPUDeviceParam device, GPUGraphicsPipeline graphics_pipeline)
Frees the given graphics pipeline as soon as it is safe to do so.
Definition: SDL3pp_gpu.h:5512
constexpr GPUStencilOp GPU_STENCILOP_INVALID
GPU_STENCILOP_INVALID.
Definition: SDL3pp_gpu.h:4229
constexpr GPUTextureType GPU_TEXTURETYPE_CUBE_ARRAY
The texture is a cube array image.
Definition: SDL3pp_gpu.h:2845
SDL_GPUTextureCreateInfo GPUTextureCreateInfo
A structure specifying the parameters of a texture.
Definition: SDL3pp_gpu.h:575
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32_INT
GPU_TEXTUREFORMAT_R32_INT.
Definition: SDL3pp_gpu.h:2656
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:6564
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:6720
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT
GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT.
Definition: SDL3pp_gpu.h:2785
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB
GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2671
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT
GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT.
Definition: SDL3pp_gpu.h:2818
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB
GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2668
constexpr GPUColorComponentFlags GPU_COLORCOMPONENT_B
the blue component
Definition: SDL3pp_gpu.h:4361
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2761
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16B16A16_SNORM
GPU_TEXTUREFORMAT_R16G16B16A16_SNORM.
Definition: SDL3pp_gpu.h:2587
constexpr GPUSampleCount GPU_SAMPLECOUNT_8
MSAA 8x.
Definition: SDL3pp_gpu.h:2922
constexpr GPUTextureType GPU_TEXTURETYPE_3D
The texture is a 3-dimensional image.
Definition: SDL3pp_gpu.h:2839
bool SetSwapchainParameters(WindowParam window, GPUSwapchainComposition swapchain_composition, GPUPresentMode present_mode)
Changes the swapchain parameters for the given claimed window.
Definition: SDL3pp_gpu.h:6938
constexpr GPUBufferUsageFlags GPU_BUFFERUSAGE_INDEX
Buffer is an index buffer.
Definition: SDL3pp_gpu.h:3958
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT
GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT.
Definition: SDL3pp_gpu.h:2569
constexpr GPUIndexElementSize GPU_INDEXELEMENTSIZE_16BIT
The index elements are 16-bit.
Definition: SDL3pp_gpu.h:1080
constexpr GPUStencilOp GPU_STENCILOP_DECREMENT_AND_CLAMP
Decrements the current value and clamps to 0.
Definition: SDL3pp_gpu.h:4245
bool WindowSupportsGPUSwapchainComposition(GPUDeviceParam device, WindowParam window, GPUSwapchainComposition swapchain_composition)
Determines whether a swapchain composition is supported by the window.
Definition: SDL3pp_gpu.h:6804
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_UINT4
GPU_VERTEXELEMENTFORMAT_UINT4.
Definition: SDL3pp_gpu.h:4042
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16_UINT
GPU_TEXTUREFORMAT_R16_UINT.
Definition: SDL3pp_gpu.h:2620
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16_FLOAT
GPU_TEXTUREFORMAT_R16G16_FLOAT.
Definition: SDL3pp_gpu.h:2593
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:5807
constexpr GPUSampleCount GPU_SAMPLECOUNT_2
MSAA 2x.
Definition: SDL3pp_gpu.h:2916
constexpr GPUTextureUsageFlags GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE
Texture supports storage writes in the compute stage.
Definition: SDL3pp_gpu.h:2889
void End()
Ends the given render pass.
Definition: SDL3pp_gpu.h:6216
void BindVertexStorageBuffers(Uint32 first_slot, SpanRef< const GPUBufferRaw > storage_buffers)
Binds storage buffers for use on the vertex shader.
Definition: SDL3pp_gpu.h:5935
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:6263
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x5_UNORM
GPU_TEXTUREFORMAT_ASTC_8x5_UNORM.
Definition: SDL3pp_gpu.h:2713
void ReleaseTexture(GPUTexture texture)
Frees the given texture as soon as it is safe to do so.
Definition: SDL3pp_gpu.h:5394
constexpr GPUCullMode GPU_CULLMODE_FRONT
Front-facing triangles are culled.
Definition: SDL3pp_gpu.h:4155
constexpr GPUCubeMapFace GPU_CUBEMAPFACE_POSITIVEY
GPU_CUBEMAPFACE_POSITIVEY.
Definition: SDL3pp_gpu.h:3924
constexpr GPUCompareOp GPU_COMPAREOP_GREATER
The comparison evaluates reference > test.
Definition: SDL3pp_gpu.h:4206
SDL_GPUCubeMapFace GPUCubeMapFace
Specifies the face of a cube map.
Definition: SDL3pp_gpu.h:3916
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16_FLOAT
GPU_TEXTUREFORMAT_R16_FLOAT.
Definition: SDL3pp_gpu.h:2590
SDL_GPUSamplerCreateInfo GPUSamplerCreateInfo
A structure specifying the parameters of a sampler.
Definition: SDL3pp_gpu.h:692
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT
GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT.
Definition: SDL3pp_gpu.h:2821
void GenerateMipmapsForTexture(GPUTexture texture)
Generates mipmaps for the given texture.
Definition: SDL3pp_gpu.h:6764
constexpr GPUFrontFace GPU_FRONTFACE_COUNTER_CLOCKWISE
A triangle with counter-clockwise vertex winding will be considered front-facing.
Definition: SDL3pp_gpu.h:4175
SDL_GPUComputePipelineCreateInfo GPUComputePipelineCreateInfo
A structure specifying the parameters of a compute pipeline state.
Definition: SDL3pp_gpu.h:880
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:5573
GPUTexture CreateGPUTexture(GPUDeviceParam device, const GPUTextureCreateInfo &createinfo)
Creates a texture object to be used in graphics or compute workflows.
Definition: SDL3pp_gpu.h:5106
constexpr GPUColorComponentFlags GPU_COLORCOMPONENT_R
the red component
Definition: SDL3pp_gpu.h:4355
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT
GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT.
Definition: SDL3pp_gpu.h:2806
constexpr GPUSamplerMipmapMode GPU_SAMPLERMIPMAPMODE_NEAREST
Point filtering.
Definition: SDL3pp_gpu.h:4391
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_BYTE2_NORM
GPU_VERTEXELEMENTFORMAT_BYTE2_NORM.
Definition: SDL3pp_gpu.h:4069
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_HALF2
GPU_VERTEXELEMENTFORMAT_HALF2.
Definition: SDL3pp_gpu.h:4105
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_6x5_UNORM
GPU_TEXTUREFORMAT_ASTC_6x5_UNORM.
Definition: SDL3pp_gpu.h:2707
constexpr GPUCullMode GPU_CULLMODE_BACK
Back-facing triangles are culled.
Definition: SDL3pp_gpu.h:4158
GPUTransferBuffer CreateTransferBuffer(const GPUTransferBufferCreateInfo &createinfo)
Creates a transfer buffer to be used when uploading to or downloading from graphics resources.
Definition: SDL3pp_gpu.h:5236
void SetBufferName(GPUBuffer buffer, StringParam text)
Sets an arbitrary string constant to label a buffer.
Definition: SDL3pp_gpu.h:5273
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_UINT2
GPU_VERTEXELEMENTFORMAT_UINT2.
Definition: SDL3pp_gpu.h:4036
SDL_GPUTransferBufferLocation GPUTransferBufferLocation
A structure specifying a location in a transfer buffer.
Definition: SDL3pp_gpu.h:1644
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x6_UNORM
GPU_TEXTUREFORMAT_ASTC_10x6_UNORM.
Definition: SDL3pp_gpu.h:2725
void ReleaseGPUTexture(GPUDeviceParam device, GPUTexture texture)
Frees the given texture as soon as it is safe to do so.
Definition: SDL3pp_gpu.h:5389
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8B8A8_SNORM
GPU_TEXTUREFORMAT_R8G8B8A8_SNORM.
Definition: SDL3pp_gpu.h:2578
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_UBYTE4
GPU_VERTEXELEMENTFORMAT_UBYTE4.
Definition: SDL3pp_gpu.h:4066
GPUShader CreateGPUShader(GPUDeviceParam device, const GPUShaderCreateInfo &createinfo)
Creates a shader to be used when creating a graphics pipeline.
Definition: SDL3pp_gpu.h:5034
void PushFragmentUniformData(Uint32 slot_index, SourceBytes data)
Pushes data to a fragment uniform slot on the command buffer.
Definition: SDL3pp_gpu.h:5611
GPUComputePipeline CreateGPUComputePipeline(GPUDeviceParam device, const GPUComputePipelineCreateInfo &createinfo)
Creates a pipeline object to be used in a compute workflow.
Definition: SDL3pp_gpu.h:4861
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:6593
void PushGPUComputeUniformData(GPUCommandBuffer command_buffer, Uint32 slot_index, SourceBytes data)
Pushes data to a uniform slot on the command buffer.
Definition: SDL3pp_gpu.h:5633
constexpr GPUBlendFactor GPU_BLENDFACTOR_INVALID
GPU_BLENDFACTOR_INVALID.
Definition: SDL3pp_gpu.h:4305
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:7427
SDL_GPUStorageTextureReadWriteBinding GPUStorageTextureReadWriteBinding
A structure specifying parameters related to binding textures in a compute pass.
Definition: SDL3pp_gpu.h:1887
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_INVALID
GPU_VERTEXELEMENTFORMAT_INVALID.
Definition: SDL3pp_gpu.h:4018
SDL_GPUSwapchainComposition GPUSwapchainComposition
Specifies the texture format and colorspace of the swapchain textures.
Definition: SDL3pp_gpu.h:2372
SDL_GPUPrimitiveType GPUPrimitiveType
Specifies the primitive topology of a graphics pipeline.
Definition: SDL3pp_gpu.h:3836
void PushVertexUniformData(Uint32 slot_index, SourceBytes data)
Pushes data to a vertex uniform slot on the command buffer.
Definition: SDL3pp_gpu.h:5581
constexpr GPUStencilOp GPU_STENCILOP_INCREMENT_AND_CLAMP
Increments the current value and clamps to the maximum value.
Definition: SDL3pp_gpu.h:4242
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_SHORT4_NORM
GPU_VERTEXELEMENTFORMAT_SHORT4_NORM.
Definition: SDL3pp_gpu.h:4096
SDL_GPUTransferBufferUsage GPUTransferBufferUsage
Specifies how a transfer buffer is intended to be used by the client.
Definition: SDL3pp_gpu.h:3986
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT
GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT.
Definition: SDL3pp_gpu.h:2695
void GenerateMipmapsForGPUTexture(GPUCommandBuffer command_buffer, GPUTexture texture)
Generates mipmaps for the given texture.
Definition: SDL3pp_gpu.h:6758
constexpr GPUTextureType GPU_TEXTURETYPE_2D
The texture is a 2-dimensional image.
Definition: SDL3pp_gpu.h:2833
GPUTexture AcquireSwapchainTexture(WindowParam window, Uint32 *swapchain_texture_width=nullptr, Uint32 *swapchain_texture_height=nullptr)
Acquire a texture to use in presentation.
Definition: SDL3pp_gpu.h:7064
void CopyBufferToBuffer(const GPUBufferLocation &source, const GPUBufferLocation &destination, Uint32 size, bool cycle)
Performs a buffer-to-buffer copy.
Definition: SDL3pp_gpu.h:6672
constexpr GPUBlendFactor GPU_BLENDFACTOR_SRC_COLOR
source color
Definition: SDL3pp_gpu.h:4312
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC2_RGBA_UNORM
GPU_TEXTUREFORMAT_BC2_RGBA_UNORM.
Definition: SDL3pp_gpu.h:2551
void ReleaseGPUBuffer(GPUDeviceParam device, GPUBuffer buffer)
Frees the given buffer as soon as it is safe to do so.
Definition: SDL3pp_gpu.h:5429
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB
GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2665
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_B4G4R4A4_UNORM
GPU_TEXTUREFORMAT_B4G4R4A4_UNORM.
Definition: SDL3pp_gpu.h:2542
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2776
void DestroyGPUDevice(GPUDeviceRaw device)
Destroys a GPU context previously returned by GPUDevice.GPUDevice.
Definition: SDL3pp_gpu.h:4742
SDL_GPUBlitInfo GPUBlitInfo
A structure containing parameters for a blit command.
Definition: SDL3pp_gpu.h:1906
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x10_UNORM
GPU_TEXTUREFORMAT_ASTC_10x10_UNORM.
Definition: SDL3pp_gpu.h:2731
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2743
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:3883
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_12x10_UNORM
GPU_TEXTUREFORMAT_ASTC_12x10_UNORM.
Definition: SDL3pp_gpu.h:2734
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:5700
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2746
constexpr GPUShaderFormat GPU_SHADERFORMAT_METALLIB
Precompiled metallib shaders for Metal.
Definition: SDL3pp_gpu.h:2343
constexpr GPUFillMode GPU_FILLMODE_LINE
Polygon edges will be drawn as line segments.
Definition: SDL3pp_gpu.h:4140
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:6663
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_4x4_UNORM
GPU_TEXTUREFORMAT_ASTC_4x4_UNORM.
Definition: SDL3pp_gpu.h:2698
void WaitForGPUSwapchain(GPUDeviceParam device, WindowParam window)
Blocks the thread until a swapchain texture is available to be acquired.
Definition: SDL3pp_gpu.h:7091
constexpr GPUPrimitiveType GPU_PRIMITIVETYPE_TRIANGLESTRIP
A series of connected triangles.
Definition: SDL3pp_gpu.h:3841
constexpr GPUShaderFormat GPU_SHADERFORMAT_MSL
MSL shaders for Metal.
Definition: SDL3pp_gpu.h:2340
void PopDebugGroup()
Ends the most-recently pushed debug group.
Definition: SDL3pp_gpu.h:5374
void UploadToTexture(const GPUTextureTransferInfo &source, const GPUTextureRegion &destination, bool cycle)
Uploads data from a transfer buffer to a texture.
Definition: SDL3pp_gpu.h:6572
void ReleaseBuffer(GPUBuffer buffer)
Frees the given buffer as soon as it is safe to do so.
Definition: SDL3pp_gpu.h:5434
void ReleaseGPUShader(GPUDeviceParam device, GPUShader shader)
Frees the given shader as soon as it is safe to do so.
Definition: SDL3pp_gpu.h:5492
constexpr GPUCompareOp GPU_COMPAREOP_NEVER
The comparison always evaluates false.
Definition: SDL3pp_gpu.h:4193
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16_SNORM
GPU_TEXTUREFORMAT_R16G16_SNORM.
Definition: SDL3pp_gpu.h:2584
void SetBlendConstants(FColorRaw blend_constants)
Sets the current blend constants on a command buffer.
Definition: SDL3pp_gpu.h:5765
constexpr GPUBlendFactor GPU_BLENDFACTOR_SRC_ALPHA
source alpha
Definition: SDL3pp_gpu.h:4324
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2755
void SetTextureName(GPUTexture texture, StringParam text)
Sets an arbitrary string constant to label a texture.
Definition: SDL3pp_gpu.h:5303
GPUDevice CreateGPUDevice(GPUShaderFormat format_flags, bool debug_mode, StringParam name)
Creates a GPU context.
Definition: SDL3pp_gpu.h:4645
void * MapGPUTransferBuffer(GPUDeviceParam device, GPUTransferBuffer transfer_buffer, bool cycle)
Maps a transfer buffer into application address space.
Definition: SDL3pp_gpu.h:6493
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2752
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R10G10B10A2_UNORM
GPU_TEXTUREFORMAT_R10G10B10A2_UNORM.
Definition: SDL3pp_gpu.h:2533
void BindPipeline(GPUGraphicsPipeline graphics_pipeline)
Binds a graphics pipeline on a render pass to be used in rendering.
Definition: SDL3pp_gpu.h:5706
void WaitForGPUFences(GPUDeviceParam device, bool wait_all, std::span< GPUFence *const > fences)
Blocks the thread until the given fences are signaled.
Definition: SDL3pp_gpu.h:7294
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_B8G8R8A8_UNORM
GPU_TEXTUREFORMAT_B8G8R8A8_UNORM.
Definition: SDL3pp_gpu.h:2545
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:6154
SDL_GPUTransferBufferCreateInfo GPUTransferBufferCreateInfo
A structure specifying the parameters of a transfer buffer.
Definition: SDL3pp_gpu.h:482
constexpr GPULoadOp GPU_LOADOP_DONT_CARE
The previous contents of the texture need not be preserved.
Definition: SDL3pp_gpu.h:3873
constexpr GPUBlendFactor GPU_BLENDFACTOR_ZERO
0
Definition: SDL3pp_gpu.h:4308
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8_SNORM
GPU_TEXTUREFORMAT_R8G8_SNORM.
Definition: SDL3pp_gpu.h:2575
SDL_GPURenderPass * GPURenderPassRaw
Alias to raw representation for GPURenderPass.
Definition: SDL3pp_gpu.h:361
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32G32B32A32_INT
GPU_TEXTUREFORMAT_R32G32B32A32_INT.
Definition: SDL3pp_gpu.h:2662
constexpr GPUBlendOp GPU_BLENDOP_MAX
max(source, destination)
Definition: SDL3pp_gpu.h:4289
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16_INT
GPU_TEXTUREFORMAT_R16G16_INT.
Definition: SDL3pp_gpu.h:2650
GPUTextureFormat GetGPUSwapchainTextureFormat(GPUDeviceParam device, WindowParam window)
Obtains the texture format of the swapchain for the given window.
Definition: SDL3pp_gpu.h:6994
SDL_GPUBufferRegion GPUBufferRegion
A structure specifying a region of a buffer.
Definition: SDL3pp_gpu.h:1586
GPUShader CreateShader(const GPUShaderCreateInfo &createinfo)
Creates a shader to be used when creating a graphics pipeline.
Definition: SDL3pp_gpu.h:5040
const char * GetGPUDriver(int index)
Get the name of a built in GPU driver.
Definition: SDL3pp_gpu.h:4777
SDL_GPUTextureFormat GPUTextureFormat
Specifies the pixel format of a texture.
Definition: SDL3pp_gpu.h:2507
constexpr GPUStoreOp GPU_STOREOP_STORE
The contents generated during the render pass will be written to memory.
Definition: SDL3pp_gpu.h:3886
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB
GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2674
void InsertDebugLabel(StringParam text)
Inserts an arbitrary string label into the command buffer callstream.
Definition: SDL3pp_gpu.h:5324
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB
GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2680
GPUTexture CreateTexture(const GPUTextureCreateInfo &createinfo)
Creates a texture object to be used in graphics or compute workflows.
Definition: SDL3pp_gpu.h:5112
constexpr GPUBlendFactor GPU_BLENDFACTOR_SRC_ALPHA_SATURATE
min(source alpha, 1 - destination alpha)
Definition: SDL3pp_gpu.h:4342
constexpr GPUBlendFactor GPU_BLENDFACTOR_ONE_MINUS_DST_ALPHA
1 - destination alpha
Definition: SDL3pp_gpu.h:4333
void BindPipeline(GPUComputePipeline compute_pipeline)
Binds a compute pipeline on a command buffer for use in compute dispatch.
Definition: SDL3pp_gpu.h:6285
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_BYTE2
GPU_VERTEXELEMENTFORMAT_BYTE2.
Definition: SDL3pp_gpu.h:4057
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x8_UNORM
GPU_TEXTUREFORMAT_ASTC_8x8_UNORM.
Definition: SDL3pp_gpu.h:2719
bool TextureSupportsSampleCount(GPUTextureFormat format, GPUSampleCount sample_count)
Determines if a sample count for a texture format is supported.
Definition: SDL3pp_gpu.h:7410
constexpr GPUStencilOp GPU_STENCILOP_KEEP
Keeps the current value.
Definition: SDL3pp_gpu.h:4232
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_INT3
GPU_VERTEXELEMENTFORMAT_INT3.
Definition: SDL3pp_gpu.h:4027
SDL_GPUDevice * GPUDeviceRaw
Alias to raw representation for GPUDevice.
Definition: SDL3pp_gpu.h:304
constexpr GPUBufferUsageFlags GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ
Buffer supports storage reads in the compute stage.
Definition: SDL3pp_gpu.h:3969
void ClaimWindow(WindowParam window)
Claims a window, creating a swapchain structure for it.
Definition: SDL3pp_gpu.h:6879
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:6727
const char * GetGPUDeviceDriver(GPUDeviceParam device)
Returns the name of the backend used to create this GPU context.
Definition: SDL3pp_gpu.h:4787
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2764
void SetGPUBlendConstants(GPURenderPass render_pass, FColorRaw blend_constants)
Sets the current blend constants on a command buffer.
Definition: SDL3pp_gpu.h:5759
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16G16B16A16_UINT
GPU_TEXTUREFORMAT_R16G16B16A16_UINT.
Definition: SDL3pp_gpu.h:2626
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT
GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT.
Definition: SDL3pp_gpu.h:2803
SDL_GPUStorageBufferReadWriteBinding GPUStorageBufferReadWriteBinding
A structure specifying parameters related to binding buffers in a compute pass.
Definition: SDL3pp_gpu.h:1897
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_5x4_UNORM
GPU_TEXTUREFORMAT_ASTC_5x4_UNORM.
Definition: SDL3pp_gpu.h:2701
void End()
Ends the current copy pass.
Definition: SDL3pp_gpu.h:6746
void ReleaseGraphicsPipeline(GPUGraphicsPipeline graphics_pipeline)
Frees the given graphics pipeline as soon as it is safe to do so.
Definition: SDL3pp_gpu.h:5518
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_USHORT4
GPU_VERTEXELEMENTFORMAT_USHORT4.
Definition: SDL3pp_gpu.h:4090
GPUFence * SubmitAndAcquireFence()
Submits a command buffer so its commands can be processed on the GPU, and acquires a fence associated...
Definition: SDL3pp_gpu.h:7227
constexpr GPUShaderFormat GPU_SHADERFORMAT_INVALID
INVALID.
Definition: SDL3pp_gpu.h:2325
void WaitForIdle()
Blocks the thread until the GPU is completely idle.
Definition: SDL3pp_gpu.h:7278
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:6377
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_B5G6R5_UNORM
GPU_TEXTUREFORMAT_B5G6R5_UNORM.
Definition: SDL3pp_gpu.h:2536
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:6694
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8_UNORM
GPU_TEXTUREFORMAT_R8G8_UNORM.
Definition: SDL3pp_gpu.h:2518
bool WindowSupportsGPUPresentMode(GPUDeviceParam device, WindowParam window, GPUPresentMode present_mode)
Determines whether a presentation mode is supported by the window.
Definition: SDL3pp_gpu.h:6835
void EndGPURenderPass(GPURenderPass render_pass)
Ends the given render pass.
Definition: SDL3pp_gpu.h:6211
constexpr GPUBlendOp GPU_BLENDOP_REVERSE_SUBTRACT
(destination * destination_factor) - (source * source_factor)
Definition: SDL3pp_gpu.h:4283
constexpr GPUColorComponentFlags GPU_COLORCOMPONENT_G
the green component
Definition: SDL3pp_gpu.h:4358
constexpr GPUSwapchainComposition GPU_SWAPCHAINCOMPOSITION_SDR
GPU_SWAPCHAINCOMPOSITION_SDR.
Definition: SDL3pp_gpu.h:2374
constexpr GPUBufferUsageFlags GPU_BUFFERUSAGE_INDIRECT
Buffer is an indirect buffer.
Definition: SDL3pp_gpu.h:3961
SDL_GPURasterizerState GPURasterizerState
A structure specifying the parameters of the graphics pipeline rasterizer state.
Definition: SDL3pp_gpu.h:4549
void WaitForGPUIdle(GPUDeviceParam device)
Blocks the thread until the GPU is completely idle.
Definition: SDL3pp_gpu.h:7273
bool GPUSupportsProperties(PropertiesParam props)
Checks for GPU runtime support.
Definition: SDL3pp_gpu.h:4622
constexpr GPUTextureUsageFlags GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ
Texture supports storage reads in the compute stage.
Definition: SDL3pp_gpu.h:2885
constexpr GPUBlendOp GPU_BLENDOP_SUBTRACT
(source * source_factor) - (destination * destination_factor)
Definition: SDL3pp_gpu.h:4280
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8_INT
GPU_TEXTUREFORMAT_R8_INT.
Definition: SDL3pp_gpu.h:2638
void InsertGPUDebugLabel(GPUCommandBuffer command_buffer, StringParam text)
Inserts an arbitrary string label into the command buffer callstream.
Definition: SDL3pp_gpu.h:5318
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R16_UNORM
GPU_TEXTUREFORMAT_R16_UNORM.
Definition: SDL3pp_gpu.h:2524
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2773
void EndGPUCopyPass(GPUCopyPass copy_pass)
Ends the current copy pass.
Definition: SDL3pp_gpu.h:6741
SDL_GPUSamplerAddressMode GPUSamplerAddressMode
Specifies behavior of texture sampling when the coordinates exceed the 0-1 range.
Definition: SDL3pp_gpu.h:4405
void DispatchGPUComputeIndirect(GPUComputePass compute_pass, GPUBuffer buffer, Uint32 offset)
Dispatches compute work with parameters set from a buffer.
Definition: SDL3pp_gpu.h:6449
bool SetGPUAllowedFramesInFlight(GPUDeviceParam device, Uint32 allowed_frames_in_flight)
Configures the maximum allowed number of frames in flight.
Definition: SDL3pp_gpu.h:6972
constexpr GPUStoreOp GPU_STOREOP_DONT_CARE
The contents generated during the render pass are not needed and may be discarded.
Definition: SDL3pp_gpu.h:3892
constexpr GPULoadOp GPU_LOADOP_CLEAR
The contents of the texture will be cleared to a color.
Definition: SDL3pp_gpu.h:3867
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM
GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM.
Definition: SDL3pp_gpu.h:4078
GPUTexture WaitAndAcquireSwapchainTexture(WindowParam 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:7156
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R32G32B32A32_UINT
GPU_TEXTUREFORMAT_R32G32B32A32_UINT.
Definition: SDL3pp_gpu.h:2635
constexpr GPUTextureType GPU_TEXTURETYPE_2D_ARRAY
The texture is a 2-dimensional array image.
Definition: SDL3pp_gpu.h:2836
SDL_GPUFrontFace GPUFrontFace
Specifies the vertex winding that will cause a triangle to be determined to be front-facing.
Definition: SDL3pp_gpu.h:4169
constexpr GPUPresentMode GPU_PRESENTMODE_MAILBOX
GPU_PRESENTMODE_MAILBOX.
Definition: SDL3pp_gpu.h:2419
constexpr GPUCubeMapFace GPU_CUBEMAPFACE_NEGATIVEY
GPU_CUBEMAPFACE_NEGATIVEY.
Definition: SDL3pp_gpu.h:3927
void PushDebugGroup(StringParam name)
Begins a debug group with an arbitrary name.
Definition: SDL3pp_gpu.h:5355
bool GPUSupportsShaderFormats(GPUShaderFormat format_flags, StringParam name)
Checks for GPU runtime support.
Definition: SDL3pp_gpu.h:4606
constexpr GPUShaderFormat GPU_SHADERFORMAT_SPIRV
SPIR-V shaders for Vulkan.
Definition: SDL3pp_gpu.h:2331
SDL_GPUStencilOp GPUStencilOp
Specifies what happens to a stored stencil value if stencil tests fail or pass.
Definition: SDL3pp_gpu.h:4227
bool WindowSupportsPresentMode(WindowParam window, GPUPresentMode present_mode)
Determines whether a presentation mode is supported by the window.
Definition: SDL3pp_gpu.h:6842
SDL_GPUFence GPUFence
An opaque handle representing a fence.
Definition: SDL3pp_gpu.h:1918
SDL_GPUComputePass * GPUComputePassRaw
Alias to raw representation for GPUComputePass.
Definition: SDL3pp_gpu.h:364
constexpr GPUSamplerAddressMode GPU_SAMPLERADDRESSMODE_MIRRORED_REPEAT
Specifies that the coordinates will wrap around mirrored.
Definition: SDL3pp_gpu.h:4412
void ReleaseGPUTransferBuffer(GPUDeviceParam device, GPUTransferBuffer transfer_buffer)
Frees the given transfer buffer as soon as it is safe to do so.
Definition: SDL3pp_gpu.h:5449
SDL_GPUIndexElementSize GPUIndexElementSize
Specifies the size of elements in an index buffer.
Definition: SDL3pp_gpu.h:1078
SDL_GPUShaderCreateInfo GPUShaderCreateInfo
A structure specifying code and metadata for creating a shader object.
Definition: SDL3pp_gpu.h:760
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:5799
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:6352
void DrawPrimitives(Uint32 num_vertices, Uint32 num_instances, Uint32 first_vertex, Uint32 first_instance)
Draws data using bound graphics state.
Definition: SDL3pp_gpu.h:6129
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT
GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT.
Definition: SDL3pp_gpu.h:2797
void SetGPUScissor(GPURenderPass render_pass, const RectRaw &scissor)
Sets the current scissor state on a command buffer.
Definition: SDL3pp_gpu.h:5738
SDL_GPUVertexInputState GPUVertexInputState
A structure specifying the parameters of a graphics pipeline vertex input state.
Definition: SDL3pp_gpu.h:4513
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_D16_UNORM
GPU_TEXTUREFORMAT_D16_UNORM.
Definition: SDL3pp_gpu.h:2683
void SubmitGPUCommandBuffer(GPUCommandBuffer command_buffer)
Submits a command buffer so its commands can be processed on the GPU.
Definition: SDL3pp_gpu.h:7187
SDL_GPUVertexInputRate GPUVertexInputRate
Specifies the rate at which vertex attributes are pulled from buffers.
Definition: SDL3pp_gpu.h:4118
constexpr GPUFilter GPU_FILTER_NEAREST
Point filtering.
Definition: SDL3pp_gpu.h:4376
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB
GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2767
constexpr GPUCubeMapFace GPU_CUBEMAPFACE_POSITIVEX
GPU_CUBEMAPFACE_POSITIVEX.
Definition: SDL3pp_gpu.h:3918
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:6307
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:6343
GPUCopyPass BeginGPUCopyPass(GPUCommandBuffer command_buffer)
Begins a copy pass on a command buffer.
Definition: SDL3pp_gpu.h:6537
constexpr GPUBlendOp GPU_BLENDOP_ADD
(source * source_factor) + (destination * destination_factor)
Definition: SDL3pp_gpu.h:4277
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:3861
constexpr GPUTextureType GPU_TEXTURETYPE_CUBE
The texture is a cube image.
Definition: SDL3pp_gpu.h:2842
SDL_GPUFilter GPUFilter
Specifies a filter operation used by a sampler.
Definition: SDL3pp_gpu.h:4374
constexpr GPUStencilOp GPU_STENCILOP_INCREMENT_AND_WRAP
Increments the current value and wraps back to 0.
Definition: SDL3pp_gpu.h:4252
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB
GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB.
Definition: SDL3pp_gpu.h:2677
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_INVALID
GPU_TEXTUREFORMAT_INVALID.
Definition: SDL3pp_gpu.h:2509
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_5x5_UNORM
GPU_TEXTUREFORMAT_ASTC_5x5_UNORM.
Definition: SDL3pp_gpu.h:2704
SDL_GPUBlitRegion GPUBlitRegion
A structure specifying a region of a texture used in the blit operation.
Definition: SDL3pp_gpu.h:4426
SDL_GPUViewport GPUViewport
A structure specifying a viewport.
Definition: SDL3pp_gpu.h:1059
GPUShaderFormat GetShaderFormats()
Returns the supported shader formats for this GPU context.
Definition: SDL3pp_gpu.h:4811
SDL_GPUComputePipeline * GPUComputePipelineRaw
Alias to raw representation for GPUComputePipeline.
Definition: SDL3pp_gpu.h:352
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_BYTE4_NORM
GPU_VERTEXELEMENTFORMAT_BYTE4_NORM.
Definition: SDL3pp_gpu.h:4072
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_FLOAT
GPU_VERTEXELEMENTFORMAT_FLOAT.
Definition: SDL3pp_gpu.h:4045
constexpr GPUSampleCount GPU_SAMPLECOUNT_1
No multisampling.
Definition: SDL3pp_gpu.h:2913
SDL_GPUIndirectDrawCommand GPUIndirectDrawCommand
A structure specifying the parameters of an indirect draw command.
Definition: SDL3pp_gpu.h:4442
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:5682
constexpr GPUBlendFactor GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA
1 - source alpha
Definition: SDL3pp_gpu.h:4327
constexpr GPUBlendFactor GPU_BLENDFACTOR_ONE
1
Definition: SDL3pp_gpu.h:4310
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM
GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM.
Definition: SDL3pp_gpu.h:4075
constexpr GPUVertexElementFormat GPU_VERTEXELEMENTFORMAT_SHORT4
GPU_VERTEXELEMENTFORMAT_SHORT4.
Definition: SDL3pp_gpu.h:4084
void PopGPUDebugGroup(GPUCommandBuffer command_buffer)
Ends the most-recently pushed debug group.
Definition: SDL3pp_gpu.h:5369
constexpr GPULoadOp GPU_LOADOP_LOAD
The previous contents of the texture will be preserved.
Definition: SDL3pp_gpu.h:3864
constexpr GPUCullMode GPU_CULLMODE_NONE
No triangles are culled.
Definition: SDL3pp_gpu.h:4152
constexpr GPUBlendFactor GPU_BLENDFACTOR_DST_ALPHA
destination alpha
Definition: SDL3pp_gpu.h:4330
GPUSampler CreateGPUSampler(GPUDeviceParam device, const GPUSamplerCreateInfo &createinfo)
Creates a sampler object to be used when binding textures in a graphics workflow.
Definition: SDL3pp_gpu.h:4943
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:6193
void EndGPUComputePass(GPUComputePass compute_pass)
Ends the current compute pass.
Definition: SDL3pp_gpu.h:6471
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_ASTC_10x5_UNORM
GPU_TEXTUREFORMAT_ASTC_10x5_UNORM.
Definition: SDL3pp_gpu.h:2722
constexpr GPUTextureFormat GPU_TEXTUREFORMAT_R8G8_UINT
GPU_TEXTUREFORMAT_R8G8_UINT.
Definition: SDL3pp_gpu.h:2614
SDL_FColor FColorRaw
Alias to raw representation for FColor.
Definition: SDL3pp_pixels.h:81
SDL_Rect RectRaw
Alias to raw representation for Rect.
Definition: SDL3pp_rect.h:28
Sint32 Sint32
A signed 32-bit integer type.
Definition: SDL3pp_stdinc.h:308
Uint32 Uint32
An unsigned 32-bit integer type.
Definition: SDL3pp_stdinc.h:325
Uint8 Uint8
An unsigned 8-bit integer type.
Definition: SDL3pp_stdinc.h:257
Main include header for the SDL3pp library.
Safely wrap GPUDevice for non owning parameters.
Definition: SDL3pp_gpu.h:311
GPUDeviceRaw value
parameter's GPUDeviceRaw
Definition: SDL3pp_gpu.h:312
constexpr GPUDeviceParam(std::nullptr_t _=nullptr)
Constructs null/invalid.
Definition: SDL3pp_gpu.h:321
constexpr GPUDeviceParam(GPUDeviceRaw value)
Constructs from GPUDeviceRaw.
Definition: SDL3pp_gpu.h:315
constexpr auto operator<=>(const GPUDeviceParam &other) const =default
Comparison.
Semi-safe reference for GPUDevice.
Definition: SDL3pp_gpu.h:3792
GPUDeviceRef(const GPUDeviceRef &other)
Copy constructor.
Definition: SDL3pp_gpu.h:3806
GPUDeviceRef(GPUDeviceParam resource)
Constructs from GPUDeviceParam.
Definition: SDL3pp_gpu.h:3800
~GPUDeviceRef()
Destructor.
Definition: SDL3pp_gpu.h:3812
Safely wrap Properties for non owning parameters.
Definition: SDL3pp_properties.h:52
Safely wrap Window for non owning parameters.
Definition: SDL3pp_video.h:54