{gpu,gpu-dawn}: add X11 linkage back; update to latest WebGPU API
This commit is contained in:
parent
8a15fcd694
commit
9f6020e545
5 changed files with 20 additions and 5 deletions
|
|
@ -277,6 +277,9 @@ pub fn Sdk(comptime deps: anytype) type {
|
||||||
step.addIncludePath(include_dir);
|
step.addIncludePath(include_dir);
|
||||||
step.addIncludePath(sdkPath("/src/dawn"));
|
step.addIncludePath(sdkPath("/src/dawn"));
|
||||||
|
|
||||||
|
if (isLinuxDesktopLike(step.target_info.target.os.tag)) {
|
||||||
|
step.linkSystemLibraryName("X11");
|
||||||
|
}
|
||||||
if (options.metal.?) {
|
if (options.metal.?) {
|
||||||
step.linkFramework("Metal");
|
step.linkFramework("Metal");
|
||||||
step.linkFramework("CoreGraphics");
|
step.linkFramework("CoreGraphics");
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const testing = std.testing;
|
const testing = std.testing;
|
||||||
|
const dawn = @import("dawn.zig");
|
||||||
const ChainedStructOut = @import("types.zig").ChainedStructOut;
|
const ChainedStructOut = @import("types.zig").ChainedStructOut;
|
||||||
const Device = @import("device.zig").Device;
|
const Device = @import("device.zig").Device;
|
||||||
const FeatureName = @import("types.zig").FeatureName;
|
const FeatureName = @import("types.zig").FeatureName;
|
||||||
|
|
@ -27,7 +28,12 @@ pub const Adapter = opaque {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Properties = extern struct {
|
pub const Properties = extern struct {
|
||||||
next_in_chain: ?*ChainedStructOut = null,
|
pub const NextInChain = extern union {
|
||||||
|
generic: ?*const ChainedStructOut,
|
||||||
|
dawn_adapter_properties_power_preference: *const dawn.AdapterPropertiesPowerPreference,
|
||||||
|
};
|
||||||
|
|
||||||
|
next_in_chain: NextInChain = .{ .generic = null },
|
||||||
vendor_id: u32,
|
vendor_id: u32,
|
||||||
vendor_name: [*:0]const u8,
|
vendor_name: [*:0]const u8,
|
||||||
architecture: [*:0]const u8,
|
architecture: [*:0]const u8,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const ChainedStruct = @import("types.zig").ChainedStruct;
|
const ChainedStruct = @import("types.zig").ChainedStruct;
|
||||||
|
const dawn = @import("dawn.zig");
|
||||||
const MapModeFlags = @import("types.zig").MapModeFlags;
|
const MapModeFlags = @import("types.zig").MapModeFlags;
|
||||||
const Impl = @import("interface.zig").Impl;
|
const Impl = @import("interface.zig").Impl;
|
||||||
|
|
||||||
|
|
@ -64,7 +65,12 @@ pub const Buffer = opaque {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Descriptor = extern struct {
|
pub const Descriptor = extern struct {
|
||||||
next_in_chain: ?*const ChainedStruct = null,
|
pub const NextInChain = extern union {
|
||||||
|
generic: ?*const ChainedStruct,
|
||||||
|
dawn_buffer_descriptor_error_info_from_wire_client: *const dawn.BufferDescriptorErrorInfoFromWireClient,
|
||||||
|
};
|
||||||
|
|
||||||
|
next_in_chain: NextInChain = .{ .generic = null },
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
usage: UsageFlags,
|
usage: UsageFlags,
|
||||||
size: u64,
|
size: u64,
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ pub const TogglesDeviceDescriptor = extern struct {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const AdapterPropertiesPowerPreference = extern struct {
|
pub const AdapterPropertiesPowerPreference = extern struct {
|
||||||
chain: ChainedStructOut = .{
|
chain: ChainedStructOut = .{
|
||||||
.next = null,
|
.next = null,
|
||||||
.s_type = .dawn_adapter_properties_power_preference,
|
.s_type = .dawn_adapter_properties_power_preference,
|
||||||
|
|
@ -68,7 +68,7 @@ const AdapterPropertiesPowerPreference = extern struct {
|
||||||
power_preference: PowerPreference = .undefined,
|
power_preference: PowerPreference = .undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
const BufferDescriptorErrorInfoFromWireClient = extern struct {
|
pub const BufferDescriptorErrorInfoFromWireClient = extern struct {
|
||||||
chain: ChainedStruct = .{
|
chain: ChainedStruct = .{
|
||||||
.next = null,
|
.next = null,
|
||||||
.s_type = .dawn_buffer_descriptor_error_info_from_wire_client,
|
.s_type = .dawn_buffer_descriptor_error_info_from_wire_client,
|
||||||
|
|
|
||||||
|
|
@ -533,7 +533,7 @@ pub const Limits = extern struct {
|
||||||
min_uniform_buffer_offset_alignment: u32 = limit_u32_undef,
|
min_uniform_buffer_offset_alignment: u32 = limit_u32_undef,
|
||||||
min_storage_buffer_offset_alignment: u32 = limit_u32_undef,
|
min_storage_buffer_offset_alignment: u32 = limit_u32_undef,
|
||||||
max_vertex_buffers: u32 = limit_u32_undef,
|
max_vertex_buffers: u32 = limit_u32_undef,
|
||||||
max_buffer_size: u32 = limit_u32_undef,
|
max_buffer_size: u64 = limit_u64_undef,
|
||||||
max_vertex_attributes: u32 = limit_u32_undef,
|
max_vertex_attributes: u32 = limit_u32_undef,
|
||||||
max_vertex_buffer_array_stride: u32 = limit_u32_undef,
|
max_vertex_buffer_array_stride: u32 = limit_u32_undef,
|
||||||
max_inter_stage_shader_components: u32 = limit_u32_undef,
|
max_inter_stage_shader_components: u32 = limit_u32_undef,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue