From 3b8c13d04e5c3b5166ccfb4c799bb968c02d4edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Date: Tue, 9 Jul 2024 06:31:11 +0000 Subject: [PATCH 1/2] Define depthWriteEnabled as WGPUOptionalBool --- webgpu.h | 9 ++++++++- webgpu.yml | 15 ++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/webgpu.h b/webgpu.h index cb423fc0..6d6f4850 100644 --- a/webgpu.h +++ b/webgpu.h @@ -407,6 +407,13 @@ typedef enum WGPUMipmapFilterMode { WGPUMipmapFilterMode_Force32 = 0x7FFFFFFF } WGPUMipmapFilterMode WGPU_ENUM_ATTRIBUTE; +typedef enum WGPUOptionalBool { + WGPUOptionalBool_Undefined = 0x00000000, + WGPUOptionalBool_False = 0x00000001, + WGPUOptionalBool_True = 0x00000002, + WGPUOptionalBool_Force32 = 0x7FFFFFFF +} WGPUOptionalBool WGPU_ENUM_ATTRIBUTE; + typedef enum WGPUPowerPreference { WGPUPowerPreference_Undefined = 0x00000000, WGPUPowerPreference_LowPower = 0x00000001, @@ -1244,7 +1251,7 @@ typedef struct WGPUComputePassDescriptor { typedef struct WGPUDepthStencilState { WGPUChainedStruct const * nextInChain; WGPUTextureFormat format; - WGPUBool depthWriteEnabled; + WGPUOptionalBool depthWriteEnabled; WGPUCompareFunction depthCompare; WGPUStencilFaceState stencilFront; WGPUStencilFaceState stencilBack; diff --git a/webgpu.yml b/webgpu.yml index 4fd3b088..aa38e0d4 100644 --- a/webgpu.yml +++ b/webgpu.yml @@ -482,6 +482,19 @@ enums: - name: linear doc: | TODO + - name: optional_bool + doc: | + TODO + entries: + - name: undefined + doc: | + TODO + - name: "false" + doc: | + TODO + - name: "true" + doc: | + TODO - name: power_preference doc: | TODO @@ -1759,7 +1772,7 @@ structs: - name: depth_write_enabled doc: | TODO - type: bool + type: enum.optional_bool - name: depth_compare doc: | TODO From d543f3fdd81eeff01f0f19457c5b55e42d5c7953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Date: Mon, 22 Jul 2024 11:05:46 +0000 Subject: [PATCH 2/2] False=0, True=1, Undefined=2 --- webgpu.h | 6 +++--- webgpu.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/webgpu.h b/webgpu.h index 4477cc97..5743e484 100644 --- a/webgpu.h +++ b/webgpu.h @@ -439,9 +439,9 @@ typedef enum WGPUMipmapFilterMode { } WGPUMipmapFilterMode WGPU_ENUM_ATTRIBUTE; typedef enum WGPUOptionalBool { - WGPUOptionalBool_Undefined = 0x00000000, - WGPUOptionalBool_False = 0x00000001, - WGPUOptionalBool_True = 0x00000002, + WGPUOptionalBool_False = 0x00000000, + WGPUOptionalBool_True = 0x00000001, + WGPUOptionalBool_Undefined = 0x00000002, WGPUOptionalBool_Force32 = 0x7FFFFFFF } WGPUOptionalBool WGPU_ENUM_ATTRIBUTE; diff --git a/webgpu.yml b/webgpu.yml index 81f90251..ae847041 100644 --- a/webgpu.yml +++ b/webgpu.yml @@ -552,15 +552,15 @@ enums: doc: | TODO entries: - - name: undefined - doc: | - TODO - name: "false" doc: | TODO - name: "true" doc: | TODO + - name: undefined + doc: | + TODO - name: pop_error_scope_status doc: | TODO