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
13 changes: 12 additions & 1 deletion gen/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,18 @@ func (g *Generator) CType(typ any, pointerType PointerType) string {
ctype = "float"
case "float64", "float64_supertype":
ctype = "double"
case "c_void":
case "c_void",
// Semantic aliases for c_void
"c_void_data_ptr",
"c_void_mapped_range_ptr",
"c_void_a_native_window",
"c_void_ca_metal_layer",
"c_void_h_instance",
"c_void_h_wnd",
"c_void_wl_display",
"c_void_wl_surface",
"c_void_x11_display",
"c_void_xcb_connection":
ctype = "void"
default:
// Handle type names prefixed with the type category.
Expand Down
10 changes: 10 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@
"type": "string",
"enum": [
"c_void",
"c_void_data_ptr",
"c_void_mapped_range_ptr",
"c_void_a_native_window",
"c_void_ca_metal_layer",
"c_void_h_instance",
"c_void_h_wnd",
"c_void_wl_display",
"c_void_wl_surface",
"c_void_x11_display",
"c_void_xcb_connection",
"bool",
"nullable_string",
"string_with_default_empty",
Expand Down
34 changes: 17 additions & 17 deletions webgpu.json

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

34 changes: 17 additions & 17 deletions webgpu.yml
Comment thread
kainino0x marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -3117,7 +3117,7 @@ structs:
members:
- name: window
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
type: c_void_a_native_window
pointer: mutable
- 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).
Expand All @@ -3127,7 +3127,7 @@ structs:
members:
- name: layer
doc: The pointer to the [`CAMetalLayer`](https://developer.apple.com/documentation/quartzcore/cametallayer?language=objc) that will be wrapped by the @ref WGPUSurface.
type: c_void
type: c_void_ca_metal_layer
pointer: mutable
- name: surface_source_wayland_surface
doc: Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping a [Wayland](https://wayland.freedesktop.org/) [`wl_surface`](https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_surface).
Expand All @@ -3137,11 +3137,11 @@ structs:
members:
- name: display
doc: A [`wl_display`](https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_display) for this Wayland instance.
type: c_void
type: c_void_wl_display
pointer: mutable
- name: surface
doc: A [`wl_surface`](https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_surface) that will be wrapped by the @ref WGPUSurface
type: c_void
type: c_void_wl_surface
pointer: mutable
- name: surface_source_windows_HWND
doc: Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping a Windows [`HWND`](https://learn.microsoft.com/en-us/windows/apps/develop/ui-input/retrieve-hwnd).
Expand All @@ -3153,11 +3153,11 @@ structs:
doc: |
The [`HINSTANCE`](https://learn.microsoft.com/en-us/windows/win32/learnwin32/winmain--the-application-entry-point) for this application.
Most commonly `GetModuleHandle(nullptr)`.
type: c_void
type: c_void_h_instance
pointer: mutable
- name: hwnd
doc: The [`HWND`](https://learn.microsoft.com/en-us/windows/apps/develop/ui-input/retrieve-hwnd) that will be wrapped by the @ref WGPUSurface.
type: c_void
type: c_void_h_wnd
pointer: mutable
- name: surface_source_XCB_window
doc: Chained in @ref WGPUSurfaceDescriptor to make an @ref WGPUSurface wrapping an [XCB](https://xcb.freedesktop.org/) `xcb_window_t`.
Expand All @@ -3167,7 +3167,7 @@ structs:
members:
- name: connection
doc: The `xcb_connection_t` for the connection to the X server.
type: c_void
type: c_void_xcb_connection
pointer: mutable
- name: window
doc: The `xcb_window_t` for the window that will be wrapped by the @ref WGPUSurface.
Expand All @@ -3180,7 +3180,7 @@ structs:
members:
- name: display
doc: A pointer to the [`Display`](https://www.x.org/releases/current/doc/libX11/libX11/libX11.html#Opening_the_Display) connected to the X server.
type: c_void
type: c_void_x11_display
pointer: mutable
- name: window
doc: The [`Window`](https://www.x.org/releases/current/doc/libX11/libX11/libX11.html#Creating_Windows) that will be wrapped by the @ref WGPUSurface.
Expand Down Expand Up @@ -3846,7 +3846,7 @@ objects:
instead for better performance.
returns:
doc: ""
type: c_void
type: c_void_mapped_range_ptr
pointer: mutable
args:
- name: offset
Expand All @@ -3870,7 +3870,7 @@ objects:
instead for better performance.
returns:
doc: ""
type: c_void
type: c_void_mapped_range_ptr
pointer: immutable
args:
- name: offset
Expand Down Expand Up @@ -3902,7 +3902,7 @@ objects:
- name: data
doc: |
Destination, to read buffer data into.
type: c_void
type: c_void_data_ptr
pointer: mutable
- name: size
doc: |
Expand All @@ -3928,7 +3928,7 @@ objects:
- name: data
doc: |
Source, to write buffer data from.
type: c_void
type: c_void_data_ptr
pointer: immutable
- name: size
doc: |
Expand Down Expand Up @@ -4250,7 +4250,7 @@ objects:
- name: data
doc: |
TODO
type: c_void
type: c_void_data_ptr
pointer: immutable
- name: size
doc: |
Expand Down Expand Up @@ -4768,7 +4768,7 @@ objects:
- name: data
doc: |
TODO
type: c_void
type: c_void_data_ptr
pointer: immutable
- name: size
doc: |
Expand All @@ -4786,7 +4786,7 @@ objects:
- name: data
doc: |
TODO
type: c_void
type: c_void_data_ptr
pointer: immutable
- name: data_size
doc: |
Expand Down Expand Up @@ -4863,7 +4863,7 @@ objects:
- name: data
doc: |
TODO
type: c_void
type: c_void_data_ptr
pointer: immutable
- name: size
doc: |
Expand Down Expand Up @@ -5061,7 +5061,7 @@ objects:
- name: data
doc: |
TODO
type: c_void
type: c_void_data_ptr
pointer: immutable
- name: size
doc: |
Expand Down
Loading