Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove emscripten-only extension; slightly reorder SType #320

Merged
merged 2 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
19 changes: 6 additions & 13 deletions webgpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ struct WGPUSurfaceCapabilities;
struct WGPUSurfaceConfiguration;
struct WGPUSurfaceDescriptor;
struct WGPUSurfaceSourceAndroidNativeWindow;
struct WGPUSurfaceSourceCanvasHTMLSelector_Emscripten;
struct WGPUSurfaceSourceMetalLayer;
struct WGPUSurfaceSourceWaylandSurface;
struct WGPUSurfaceSourceWindowsHWND;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
28 changes: 7 additions & 21 deletions webgpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading