gpu: unify data structs in single structs.zig
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
29a76f75c4
commit
a463a0c7cd
6 changed files with 33 additions and 31 deletions
|
|
@ -20,7 +20,7 @@
|
|||
const std = @import("std");
|
||||
|
||||
const Feature = @import("enums.zig").Feature;
|
||||
const Limits = @import("Limits.zig");
|
||||
const Limits = @import("structs.zig").Limits;
|
||||
const Device = @import("Device.zig");
|
||||
|
||||
const Adapter = @This();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
//! https://gpuweb.github.io/gpuweb/#devices
|
||||
//! https://gpuweb.github.io/gpuweb/#gpuadapter
|
||||
const Feature = @import("enums.zig").Feature;
|
||||
const Limits = @import("Limits.zig");
|
||||
const Limits = @import("structs.zig").Limits;
|
||||
const Queue = @import("Queue.zig");
|
||||
const ShaderModule = @import("ShaderModule.zig");
|
||||
const Surface = @import("Surface.zig");
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
// TODO: docs
|
||||
max_texture_dimension_1d: u32,
|
||||
max_texture_dimension_2d: u32,
|
||||
max_texture_dimension_3d: u32,
|
||||
max_texture_array_layers: u32,
|
||||
max_bind_groups: u32,
|
||||
max_dynamic_uniform_buffers_per_pipeline_layout: u32,
|
||||
max_dynamic_storage_buffers_per_pipeline_layout: u32,
|
||||
max_sampled_textures_per_shader_stage: u32,
|
||||
max_samplers_per_shader_stage: u32,
|
||||
max_storage_buffers_per_shader_stage: u32,
|
||||
max_storage_textures_per_shader_stage: u32,
|
||||
max_uniform_buffers_per_shader_stage: u32,
|
||||
max_uniform_buffer_binding_size: u64,
|
||||
max_storage_buffer_binding_size: u64,
|
||||
min_uniform_buffer_offset_alignment: u32,
|
||||
min_storage_buffer_offset_alignment: u32,
|
||||
max_vertex_buffers: u32,
|
||||
max_vertex_attributes: u32,
|
||||
max_vertex_buffer_array_stride: u32,
|
||||
max_inter_stage_shader_components: u32,
|
||||
max_compute_workgroup_storage_size: u32,
|
||||
max_compute_invocations_per_workgroup: u32,
|
||||
max_compute_workgroup_size_x: u32,
|
||||
max_compute_workgroup_size_y: u32,
|
||||
max_compute_workgroup_size_z: u32,
|
||||
max_compute_workgroups_per_dimension: u32,
|
||||
|
|
@ -15,7 +15,7 @@ const RequestDeviceResponse = Adapter.RequestDeviceResponse;
|
|||
|
||||
const Device = @import("Device.zig");
|
||||
const Surface = @import("Surface.zig");
|
||||
const Limits = @import("Limits.zig");
|
||||
const Limits = @import("structs.zig").Limits;
|
||||
const Queue = @import("Queue.zig");
|
||||
const CommandBuffer = @import("CommandBuffer.zig");
|
||||
const ShaderModule = @import("ShaderModule.zig");
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ pub const NativeInstance = @import("NativeInstance.zig");
|
|||
pub const Adapter = @import("Adapter.zig");
|
||||
pub const Device = @import("Device.zig");
|
||||
pub const Surface = @import("Surface.zig");
|
||||
pub const Limits = @import("Limits.zig");
|
||||
pub const Limits = @import("structs.zig").Limits;
|
||||
pub const Queue = @import("Queue.zig");
|
||||
pub const CommandBuffer = @import("CommandBuffer.zig");
|
||||
pub const ShaderModule = @import("ShaderModule.zig");
|
||||
|
|
|
|||
29
gpu/src/structs.zig
Normal file
29
gpu/src/structs.zig
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// TODO: docs
|
||||
pub const Limits = struct {
|
||||
max_texture_dimension_1d: u32,
|
||||
max_texture_dimension_2d: u32,
|
||||
max_texture_dimension_3d: u32,
|
||||
max_texture_array_layers: u32,
|
||||
max_bind_groups: u32,
|
||||
max_dynamic_uniform_buffers_per_pipeline_layout: u32,
|
||||
max_dynamic_storage_buffers_per_pipeline_layout: u32,
|
||||
max_sampled_textures_per_shader_stage: u32,
|
||||
max_samplers_per_shader_stage: u32,
|
||||
max_storage_buffers_per_shader_stage: u32,
|
||||
max_storage_textures_per_shader_stage: u32,
|
||||
max_uniform_buffers_per_shader_stage: u32,
|
||||
max_uniform_buffer_binding_size: u64,
|
||||
max_storage_buffer_binding_size: u64,
|
||||
min_uniform_buffer_offset_alignment: u32,
|
||||
min_storage_buffer_offset_alignment: u32,
|
||||
max_vertex_buffers: u32,
|
||||
max_vertex_attributes: u32,
|
||||
max_vertex_buffer_array_stride: u32,
|
||||
max_inter_stage_shader_components: u32,
|
||||
max_compute_workgroup_storage_size: u32,
|
||||
max_compute_invocations_per_workgroup: u32,
|
||||
max_compute_workgroup_size_x: u32,
|
||||
max_compute_workgroup_size_y: u32,
|
||||
max_compute_workgroup_size_z: u32,
|
||||
max_compute_workgroups_per_dimension: u32,
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue