Browse Source

Sync SDL3 wiki -> header

[ci skip]
SDL Wiki Bot 8 tháng trước cách đây
mục cha
commit
d6a95ae198
1 tập tin đã thay đổi với 8 bổ sung0 xóa
  1. 8 0
      include/SDL3/SDL_gpu.h

+ 8 - 0
include/SDL3/SDL_gpu.h

@@ -2197,6 +2197,14 @@ extern SDL_DECLSPEC SDL_GPUSampler *SDLCALL SDL_CreateGPUSampler(
  *   [[stage_in]] attribute which will automatically use the vertex input
  *   information from the SDL_GPUGraphicsPipeline.
  *
+ * Shader semantics do not matter in D3D12 and for ease of use the SDL
+ * implementation assumes that they will all be TEXCOORD. If you are using
+ * HLSL as the shader source language, your vertex semantics should start at
+ * TEXCOORD0 and increment like so: TEXCOORD1, TEXCOORD2, etc. If you wish to
+ * change the semantic prefix to something other than TEXCOORD you can use
+ * SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING with
+ * SDL_CreateGPUDeviceWithProperties().
+ *
  * \param device a GPU Context.
  * \param createinfo a struct describing the state of the shader to create.
  * \returns a shader object on success, or NULL on failure; call