gpu: fix string handling / pointer casting

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 08:36:06 -07:00 committed by Stephen Gutekanst
parent ce46b2a652
commit bd1d91faa3
5 changed files with 22 additions and 22 deletions

View file

@ -32,30 +32,30 @@ pub const DescriptorTag = enum {
// TODO: docs
pub const Descriptor = union(DescriptorTag) {
metal_layer: struct {
label: ?[]const u8,
label: ?[*:0]const u8 = null,
layer: *anyopaque,
},
windows_hwnd: struct {
label: ?[]const u8,
label: ?[*:0]const u8 = null,
hinstance: *anyopaque,
hwnd: *anyopaque,
},
windows_core_window: struct {
label: ?[]const u8,
label: ?[*:0]const u8 = null,
core_window: *anyopaque,
},
windows_swap_chain_panel: struct {
label: ?[]const u8,
label: ?[*:0]const u8 = null,
swap_chain_panel: *anyopaque,
},
xlib: struct {
label: ?[]const u8,
label: ?[*:0]const u8 = null,
display: *anyopaque,
window: u32,
},
canvas_html_selector: struct {
label: ?[]const u8,
selector: []const u8,
label: ?[*:0]const u8 = null,
selector: ?[*:0]const u8,
},
};