gpu: remove docs TODOs (everything needs docs)

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 17:45:51 -07:00 committed by Stephen Gutekanst
parent 8cb1c9ba4f
commit e9c6dcde21
5 changed files with 0 additions and 16 deletions

View file

@ -42,7 +42,6 @@ limits: Limits,
/// Always false on native implementations of WebGPU (TODO: why is this not queryable in Dawn?)
fallback: bool,
// TODO: docs
properties: Properties,
/// The type erased pointer to the Adapter implementation
@ -75,7 +74,6 @@ pub fn hasFeature(adapter: Adapter, feature: Feature) bool {
return false;
}
// TODO: docs
pub const Properties = struct {
vendor_id: u32,
device_id: u32,
@ -85,7 +83,6 @@ pub const Properties = struct {
backend_type: BackendType,
};
// TODO: docs
pub const Type = enum(u32) {
discrete_gpu,
integrated_gpu,
@ -93,7 +90,6 @@ pub const Type = enum(u32) {
unknown,
};
// TODO: docs
pub fn typeName(t: Type) []const u8 {
return switch (t) {
.discrete_gpu => "Discrete GPU",
@ -103,7 +99,6 @@ pub fn typeName(t: Type) []const u8 {
};
}
// TODO: docs
pub const BackendType = enum(u32) {
nul,
webgpu,
@ -115,7 +110,6 @@ pub const BackendType = enum(u32) {
opengles,
};
// TODO: docs
pub fn backendTypeName(t: BackendType) []const u8 {
return switch (t) {
.nul => "Null",
@ -134,7 +128,6 @@ pub const RequestDeviceErrorCode = error{
Unknown,
};
// TODO: docs
pub const RequestDeviceError = struct {
message: []const u8,
code: RequestDeviceErrorCode,
@ -146,12 +139,10 @@ pub const RequestDeviceResponseTag = enum {
};
pub const RequestDeviceResponse = union(RequestDeviceResponseTag) {
// TODO: docs
device: Device,
err: RequestDeviceError,
};
// TODO: docs
pub fn requestDevice(adapter: Adapter, descriptor: *const Device.Descriptor) callconv(.Async) RequestDeviceResponse {
var frame_buffer = std.heap.page_allocator.allocAdvanced(
u8,

View file

@ -81,7 +81,6 @@ pub inline fn destroy(device: Device) void {
device.vtable.destroy(device.ptr);
}
// TODO: docs
pub const Descriptor = struct {
label: ?[*:0]const u8 = null,
required_features: ?[]Feature = null,

View file

@ -29,7 +29,6 @@ pub inline fn release(interface: Interface) void {
interface.vtable.release(interface.ptr);
}
// TODO: docs
pub const RequestAdapterOptions = struct {
// TODO:
//power_preference: PowerPreference,
@ -45,7 +44,6 @@ pub const RequestAdapterErrorCode = error{
Unknown,
};
// TODO: docs
pub const RequestAdapterError = struct {
message: []const u8,
code: RequestAdapterErrorCode,
@ -57,12 +55,10 @@ pub const RequestAdapterResponseTag = enum {
};
pub const RequestAdapterResponse = union(RequestAdapterResponseTag) {
// TODO: docs
adapter: Adapter,
err: RequestAdapterError,
};
// TODO: docs
pub fn requestAdapter(interface: Interface, options: *const RequestAdapterOptions) callconv(.Async) RequestAdapterResponse {
var frame_buffer = std.heap.page_allocator.allocAdvanced(
u8,

View file

@ -29,7 +29,6 @@ pub const DescriptorTag = enum {
canvas_html_selector,
};
// TODO: docs
pub const Descriptor = union(DescriptorTag) {
metal_layer: struct {
label: ?[*:0]const u8 = null,

View file

@ -7,7 +7,6 @@ const StencilOperation = @import("enums.zig").StencilOperation;
const VertexFormat = @import("enums.zig").VertexFormat;
const VertexStepMode = @import("enums.zig").VertexStepMode;
// TODO: docs
pub const Limits = extern struct {
max_texture_dimension_1d: u32,
max_texture_dimension_2d: u32,