diff --git a/include/SDL3/SDL_gpu.h b/include/SDL3/SDL_gpu.h index 74bcd2a2d9..5943b5c513 100644 --- a/include/SDL3/SDL_gpu.h +++ b/include/SDL3/SDL_gpu.h @@ -2892,7 +2892,7 @@ extern SDL_DECLSPEC SDL_GPUSampler * SDLCALL SDL_CreateGPUSampler( * * --- * - * **SPIR-V** + * **SPIR-V (GLSL)** * * For vertex shaders, use: - Set 0 for samplers, storage textures, and * storage buffers - Set 1 for uniform data @@ -2920,17 +2920,17 @@ extern SDL_DECLSPEC SDL_GPUSampler * SDLCALL SDL_CreateGPUSampler( * * ```glsl * // Any samplers come first in the set, in SDL bind slot order - * layout(set = 0, binding = 0) sampler2d samplerBoundToSlot0; - * layout(set = 0, binding = 1) sampler2d samplerBoundToSlot1; + * layout(set = 0, binding = 0) uniform sampler2D samplerBoundToSlot0; + * layout(set = 0, binding = 1) uniform sampler2D samplerBoundToSlot1; * // Any storage textures come next in the set, in SDL bind slot order - * layout(set = 0, binding = 2) texture2d storageTextureBoundToSlot0; - * layout(set = 0, binding = 3) texture2d storageTextureBoundToSlot1; + * layout(set = 0, binding = 2) uniform image2D storageTextureBoundToSlot0; + * layout(set = 0, binding = 3) uniform image2D storageTextureBoundToSlot1; * // Any storage buffers come next in the set, in SDL bind slot order - * layout(set = 0, binding = 4) buffer storageBufferBoundToSlot0; - * layout(set = 0, binding = 5) buffer storageBufferBoundToSlot1; + * layout(set = 0, binding = 4) buffer storageBufferBoundToSlot0 { ... }; + * layout(set = 0, binding = 5) buffer storageBufferBoundToSlot1 { ... }; * // Any uniform buffers are in their own set, in SDL slot order - * layout(set = 1, binding = 0) uniform UniformDataBoundToSlot0 {}; - * layout(set = 1, binding = 1) uniform UniformDataBoundToSlot1 {}; + * layout(set = 1, binding = 0) uniform UniformDataBoundToSlot0 { ... }; + * layout(set = 1, binding = 1) uniform UniformDataBoundToSlot1 { ... }; * ``` * * --- @@ -2980,8 +2980,8 @@ extern SDL_DECLSPEC SDL_GPUSampler * SDLCALL SDL_CreateGPUSampler( * ByteAddressBuffer StorageBufferBoundToSlot0 : register( t4, space2 ); * ByteAddressBuffer StorageBufferBoundToSlot1 : register( t5, space2 ); * // Any uniform buffers are in the `b` register set *and* in their own space, in SDL slot order - * cbuffer UniformDataBoundToSlot0 : register( b0, space4 ) { ... }; - * cbuffer UniformDataBoundToSlot1 : register( b1, space4 ) { ... }; + * cbuffer UniformDataBoundToSlot0 : register( b0, space3 ) { ... }; + * cbuffer UniformDataBoundToSlot1 : register( b1, space3 ) { ... }; * ``` * * ---