Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions webgpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -3586,25 +3586,37 @@ typedef struct WGPUTextureComponentSwizzle {
/**
* The value that replaces the red channel in the shader.
*
* The `INIT` macro sets this to @ref WGPUComponentSwizzle_R.
* If set to @ref WGPUComponentSwizzle_Undefined,
* [defaults](@ref SentinelValues) to @ref WGPUComponentSwizzle_R.
*
* The `INIT` macro sets this to @ref WGPUComponentSwizzle_Undefined.
*/
WGPUComponentSwizzle r;
/**
* The value that replaces the green channel in the shader.
*
* The `INIT` macro sets this to @ref WGPUComponentSwizzle_G.
* If set to @ref WGPUComponentSwizzle_Undefined,
* [defaults](@ref SentinelValues) to @ref WGPUComponentSwizzle_G.
*
* The `INIT` macro sets this to @ref WGPUComponentSwizzle_Undefined.
*/
WGPUComponentSwizzle g;
/**
* The value that replaces the blue channel in the shader.
*
* The `INIT` macro sets this to @ref WGPUComponentSwizzle_B.
* If set to @ref WGPUComponentSwizzle_Undefined,
* [defaults](@ref SentinelValues) to @ref WGPUComponentSwizzle_B.
*
* The `INIT` macro sets this to @ref WGPUComponentSwizzle_Undefined.
*/
WGPUComponentSwizzle b;
/**
* The value that replaces the alpha channel in the shader.
*
* The `INIT` macro sets this to @ref WGPUComponentSwizzle_A.
* If set to @ref WGPUComponentSwizzle_Undefined,
* [defaults](@ref SentinelValues) to @ref WGPUComponentSwizzle_A.
*
* The `INIT` macro sets this to @ref WGPUComponentSwizzle_Undefined.
*/
WGPUComponentSwizzle a;
} WGPUTextureComponentSwizzle WGPU_STRUCTURE_ATTRIBUTE;
Expand All @@ -3613,10 +3625,10 @@ typedef struct WGPUTextureComponentSwizzle {
* Initializer for @ref WGPUTextureComponentSwizzle.
*/
#define WGPU_TEXTURE_COMPONENT_SWIZZLE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTextureComponentSwizzle, { \
/*.r=*/WGPUComponentSwizzle_R _wgpu_COMMA \
/*.g=*/WGPUComponentSwizzle_G _wgpu_COMMA \
/*.b=*/WGPUComponentSwizzle_B _wgpu_COMMA \
/*.a=*/WGPUComponentSwizzle_A _wgpu_COMMA \
/*.r=*/WGPUComponentSwizzle_Undefined _wgpu_COMMA \
/*.g=*/WGPUComponentSwizzle_Undefined _wgpu_COMMA \
/*.b=*/WGPUComponentSwizzle_Undefined _wgpu_COMMA \
/*.a=*/WGPUComponentSwizzle_Undefined _wgpu_COMMA \
})

/**
Expand Down
12 changes: 4 additions & 8 deletions webgpu.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions webgpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3200,23 +3200,31 @@ structs:
- name: r
doc: |
The value that replaces the red channel in the shader.

If set to @ref WGPUComponentSwizzle_Undefined,
[defaults](@ref SentinelValues) to @ref WGPUComponentSwizzle_R.
type: enum.component_swizzle
default: r
- name: g
doc: |
The value that replaces the green channel in the shader.

If set to @ref WGPUComponentSwizzle_Undefined,
[defaults](@ref SentinelValues) to @ref WGPUComponentSwizzle_G.
type: enum.component_swizzle
default: g
- name: b
doc: |
The value that replaces the blue channel in the shader.

If set to @ref WGPUComponentSwizzle_Undefined,
[defaults](@ref SentinelValues) to @ref WGPUComponentSwizzle_B.
type: enum.component_swizzle
default: b
- name: a
doc: |
The value that replaces the alpha channel in the shader.

If set to @ref WGPUComponentSwizzle_Undefined,
[defaults](@ref SentinelValues) to @ref WGPUComponentSwizzle_A.
type: enum.component_swizzle
default: a
- name: texture_component_swizzle_descriptor
doc: |
TODO
Expand Down