Skip to content

Commit 5c47103

Browse files
thatcosmonautflibitijibibo
authored andcommitted
include: Command buffer and swapchain usage clarification (thatcosmonaut#41)
1 parent 6704d71 commit 5c47103

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/SDL3/SDL_gpu.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -1935,7 +1935,8 @@ extern SDL_DECLSPEC SDL_GpuTextureFormat SDLCALL SDL_GpuGetSwapchainTextureForma
19351935
/**
19361936
* Acquire a command buffer.
19371937
* This command buffer is managed by the implementation and should not be freed by the user.
1938-
* A command buffer may only be used on the thread it was acquired on.
1938+
* The command buffer may only be used on the thread it was acquired on.
1939+
* The command buffer should be submitted on the thread it was acquired on.
19391940
*
19401941
* \param device a GPU context
19411942
* \returns a command buffer
@@ -1952,6 +1953,7 @@ extern SDL_DECLSPEC SDL_GpuCommandBuffer *SDLCALL SDL_GpuAcquireCommandBuffer(
19521953
* Acquire a texture to use in presentation.
19531954
* When a swapchain texture is acquired on a command buffer,
19541955
* it will automatically be submitted for presentation when the command buffer is submitted.
1956+
* The swapchain texture should only be referenced by the command buffer used to acquire it.
19551957
* May return NULL under certain conditions. This is not necessarily an error.
19561958
* This texture is managed by the implementation and must not be freed by the user.
19571959
* You MUST NOT call this function from any thread other than the one that created the window.

0 commit comments

Comments
 (0)