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 aba280f..9e62c84 100644 --- a/webgpu.h +++ b/webgpu.h @@ -160,7 +160,6 @@ struct WGPUSurfaceCapabilities; struct WGPUSurfaceConfiguration; struct WGPUSurfaceDescriptor; struct WGPUSurfaceSourceAndroidNativeWindow; -struct WGPUSurfaceSourceCanvasHTMLSelector_Emscripten; struct WGPUSurfaceSourceMetalLayer; struct WGPUSurfaceSourceWaylandSurface; struct WGPUSurfaceSourceWindowsHWND; @@ -588,16 +587,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; @@ -1467,18 +1465,6 @@ typedef struct WGPUSurfaceSourceAndroidNativeWindow { void * window; } WGPUSurfaceSourceAndroidNativeWindow WGPU_STRUCTURE_ATTRIBUTE; -/** - * Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping an [HTML `` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas). - */ -typedef struct WGPUSurfaceSourceCanvasHTMLSelector_Emscripten { - WGPUChainedStruct chain; - /** - * The [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) for the `` element that will be wrapped by the @ref WGPUSurface. - * Most commonly `"#id_of_the_canvas"`. - */ - char const * selector; -} WGPUSurfaceSourceCanvasHTMLSelector_Emscripten WGPU_STRUCTURE_ATTRIBUTE; - /** * Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping a [`CAMetalLayer`](https://developer.apple.com/documentation/quartzcore/cametallayer?language=objc). */ diff --git a/webgpu.yml b/webgpu.yml index e67f358..a845d9b 100644 --- a/webgpu.yml +++ b/webgpu.yml @@ -717,22 +717,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 @@ -744,10 +745,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 @@ -2765,17 +2762,6 @@ structs: doc: The pointer to the [`ANativeWindow`](https://developer.android.com/ndk/reference/group/a-native-window) that will be wrapped by the @ref WGPUSurface. type: c_void pointer: mutable - - name: surface_source_canvas_HTML_selector__Emscripten - doc: Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping an [HTML `` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas). - type: extension_in - extends: - - surface_descriptor - members: - - name: selector - doc: | - The [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) for the `` element that will be wrapped by the @ref WGPUSurface. - Most commonly `"#id_of_the_canvas"`. - type: string - name: surface_source_metal_layer doc: Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping a [`CAMetalLayer`](https://developer.apple.com/documentation/quartzcore/cametallayer?language=objc). type: extension_in