From 9e8230691840804a462249ff8d870d33d1145ddc Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Mon, 26 Aug 2024 08:37:38 -0700 Subject: [PATCH] Remove emscripten-only extension; slightly reorder SType --- Makefile | 6 +++++- webgpu.h | 19 ++++++------------- webgpu.yml | 28 +++++++--------------------- 3 files changed, 18 insertions(+), 35 deletions(-) diff --git a/Makefile b/Makefile index 6a66b5a..73114a6 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,8 @@ -.PHONY: gen gen-check doc +.PHONY: help gen gen-check doc + +# default target if you just type `make` +help: + @echo 'Targets are: help, fix, gen, gen-check, doc' fix: webgpu.yml go run ./fix -yaml webgpu.yml diff --git a/webgpu.h b/webgpu.h index 1ee9a8c..6d89b43 100644 --- a/webgpu.h +++ b/webgpu.h @@ -157,7 +157,6 @@ struct WGPUSurfaceCapabilities; struct WGPUSurfaceConfiguration; struct WGPUSurfaceDescriptor; struct WGPUSurfaceSourceAndroidNativeWindow; -struct WGPUSurfaceSourceCanvasHTMLSelector_Emscripten; struct WGPUSurfaceSourceMetalLayer; struct WGPUSurfaceSourceWaylandSurface; struct WGPUSurfaceSourceWindowsHWND; @@ -537,16 +536,15 @@ typedef enum WGPURequestDeviceStatus { typedef enum WGPUSType { WGPUSType_Invalid = 0x00000000, - WGPUSType_SurfaceSourceMetalLayer = 0x00000001, - WGPUSType_SurfaceSourceWindowsHWND = 0x00000002, - WGPUSType_SurfaceSourceXlibWindow = 0x00000003, - WGPUSType_SurfaceSourceCanvasHTMLSelector_Emscripten = 0x00000004, - WGPUSType_ShaderSourceSPIRV = 0x00000005, - WGPUSType_ShaderSourceWGSL = 0x00000006, + WGPUSType_ShaderSourceSPIRV = 0x00000001, + WGPUSType_ShaderSourceWGSL = 0x00000002, + WGPUSType_RenderPassMaxDrawCount = 0x00000003, + WGPUSType_SurfaceSourceMetalLayer = 0x00000004, + WGPUSType_SurfaceSourceWindowsHWND = 0x00000005, + WGPUSType_SurfaceSourceXlibWindow = 0x00000006, WGPUSType_SurfaceSourceWaylandSurface = 0x00000007, WGPUSType_SurfaceSourceAndroidNativeWindow = 0x00000008, WGPUSType_SurfaceSourceXCBWindow = 0x00000009, - WGPUSType_RenderPassMaxDrawCount = 0x0000000F, WGPUSType_Force32 = 0x7FFFFFFF } WGPUSType WGPU_ENUM_ATTRIBUTE; @@ -1329,11 +1327,6 @@ typedef struct WGPUSurfaceSourceAndroidNativeWindow { void * window; } WGPUSurfaceSourceAndroidNativeWindow WGPU_STRUCTURE_ATTRIBUTE; -typedef struct WGPUSurfaceSourceCanvasHTMLSelector_Emscripten { - WGPUChainedStruct chain; - char const * selector; -} WGPUSurfaceSourceCanvasHTMLSelector_Emscripten WGPU_STRUCTURE_ATTRIBUTE; - typedef struct WGPUSurfaceSourceMetalLayer { WGPUChainedStruct chain; void * layer; diff --git a/webgpu.yml b/webgpu.yml index 61c79ab..7a30897 100644 --- a/webgpu.yml +++ b/webgpu.yml @@ -718,22 +718,23 @@ enums: - name: invalid doc: | TODO - - name: surface_source_metal_layer + - name: shader_source_SPIRV doc: | TODO - - name: surface_source_windows_HWND + - name: shader_source_WGSL doc: | TODO - - name: surface_source_xlib_window + - name: render_pass_max_draw_count doc: | TODO - - name: surface_source_canvas_HTML_selector__Emscripten + # TODO(#214): Move all of the surface sources into block 0x0001 + - name: surface_source_metal_layer doc: | TODO - - name: shader_source_SPIRV + - name: surface_source_windows_HWND doc: | TODO - - name: shader_source_WGSL + - name: surface_source_xlib_window doc: | TODO - name: surface_source_wayland_surface @@ -745,10 +746,6 @@ enums: - name: surface_source_XCB_window doc: | TODO - - name: render_pass_max_draw_count - value: 0x000F - doc: | - TODO - name: sampler_binding_type doc: | TODO @@ -2780,17 +2777,6 @@ structs: TODO type: c_void pointer: mutable - - name: surface_source_canvas_HTML_selector__Emscripten - doc: | - TODO - type: extension_in - extends: - - surface_descriptor - members: - - name: selector - doc: | - TODO - type: string - name: surface_source_metal_layer doc: | TODO