gpu: remove docs TODOs (everything needs docs)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
8cb1c9ba4f
commit
e9c6dcde21
5 changed files with 0 additions and 16 deletions
|
|
@ -42,7 +42,6 @@ limits: Limits,
|
||||||
/// Always false on native implementations of WebGPU (TODO: why is this not queryable in Dawn?)
|
/// Always false on native implementations of WebGPU (TODO: why is this not queryable in Dawn?)
|
||||||
fallback: bool,
|
fallback: bool,
|
||||||
|
|
||||||
// TODO: docs
|
|
||||||
properties: Properties,
|
properties: Properties,
|
||||||
|
|
||||||
/// The type erased pointer to the Adapter implementation
|
/// The type erased pointer to the Adapter implementation
|
||||||
|
|
@ -75,7 +74,6 @@ pub fn hasFeature(adapter: Adapter, feature: Feature) bool {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: docs
|
|
||||||
pub const Properties = struct {
|
pub const Properties = struct {
|
||||||
vendor_id: u32,
|
vendor_id: u32,
|
||||||
device_id: u32,
|
device_id: u32,
|
||||||
|
|
@ -85,7 +83,6 @@ pub const Properties = struct {
|
||||||
backend_type: BackendType,
|
backend_type: BackendType,
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: docs
|
|
||||||
pub const Type = enum(u32) {
|
pub const Type = enum(u32) {
|
||||||
discrete_gpu,
|
discrete_gpu,
|
||||||
integrated_gpu,
|
integrated_gpu,
|
||||||
|
|
@ -93,7 +90,6 @@ pub const Type = enum(u32) {
|
||||||
unknown,
|
unknown,
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: docs
|
|
||||||
pub fn typeName(t: Type) []const u8 {
|
pub fn typeName(t: Type) []const u8 {
|
||||||
return switch (t) {
|
return switch (t) {
|
||||||
.discrete_gpu => "Discrete GPU",
|
.discrete_gpu => "Discrete GPU",
|
||||||
|
|
@ -103,7 +99,6 @@ pub fn typeName(t: Type) []const u8 {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: docs
|
|
||||||
pub const BackendType = enum(u32) {
|
pub const BackendType = enum(u32) {
|
||||||
nul,
|
nul,
|
||||||
webgpu,
|
webgpu,
|
||||||
|
|
@ -115,7 +110,6 @@ pub const BackendType = enum(u32) {
|
||||||
opengles,
|
opengles,
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: docs
|
|
||||||
pub fn backendTypeName(t: BackendType) []const u8 {
|
pub fn backendTypeName(t: BackendType) []const u8 {
|
||||||
return switch (t) {
|
return switch (t) {
|
||||||
.nul => "Null",
|
.nul => "Null",
|
||||||
|
|
@ -134,7 +128,6 @@ pub const RequestDeviceErrorCode = error{
|
||||||
Unknown,
|
Unknown,
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: docs
|
|
||||||
pub const RequestDeviceError = struct {
|
pub const RequestDeviceError = struct {
|
||||||
message: []const u8,
|
message: []const u8,
|
||||||
code: RequestDeviceErrorCode,
|
code: RequestDeviceErrorCode,
|
||||||
|
|
@ -146,12 +139,10 @@ pub const RequestDeviceResponseTag = enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const RequestDeviceResponse = union(RequestDeviceResponseTag) {
|
pub const RequestDeviceResponse = union(RequestDeviceResponseTag) {
|
||||||
// TODO: docs
|
|
||||||
device: Device,
|
device: Device,
|
||||||
err: RequestDeviceError,
|
err: RequestDeviceError,
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: docs
|
|
||||||
pub fn requestDevice(adapter: Adapter, descriptor: *const Device.Descriptor) callconv(.Async) RequestDeviceResponse {
|
pub fn requestDevice(adapter: Adapter, descriptor: *const Device.Descriptor) callconv(.Async) RequestDeviceResponse {
|
||||||
var frame_buffer = std.heap.page_allocator.allocAdvanced(
|
var frame_buffer = std.heap.page_allocator.allocAdvanced(
|
||||||
u8,
|
u8,
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,6 @@ pub inline fn destroy(device: Device) void {
|
||||||
device.vtable.destroy(device.ptr);
|
device.vtable.destroy(device.ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: docs
|
|
||||||
pub const Descriptor = struct {
|
pub const Descriptor = struct {
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
required_features: ?[]Feature = null,
|
required_features: ?[]Feature = null,
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ pub inline fn release(interface: Interface) void {
|
||||||
interface.vtable.release(interface.ptr);
|
interface.vtable.release(interface.ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: docs
|
|
||||||
pub const RequestAdapterOptions = struct {
|
pub const RequestAdapterOptions = struct {
|
||||||
// TODO:
|
// TODO:
|
||||||
//power_preference: PowerPreference,
|
//power_preference: PowerPreference,
|
||||||
|
|
@ -45,7 +44,6 @@ pub const RequestAdapterErrorCode = error{
|
||||||
Unknown,
|
Unknown,
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: docs
|
|
||||||
pub const RequestAdapterError = struct {
|
pub const RequestAdapterError = struct {
|
||||||
message: []const u8,
|
message: []const u8,
|
||||||
code: RequestAdapterErrorCode,
|
code: RequestAdapterErrorCode,
|
||||||
|
|
@ -57,12 +55,10 @@ pub const RequestAdapterResponseTag = enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const RequestAdapterResponse = union(RequestAdapterResponseTag) {
|
pub const RequestAdapterResponse = union(RequestAdapterResponseTag) {
|
||||||
// TODO: docs
|
|
||||||
adapter: Adapter,
|
adapter: Adapter,
|
||||||
err: RequestAdapterError,
|
err: RequestAdapterError,
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: docs
|
|
||||||
pub fn requestAdapter(interface: Interface, options: *const RequestAdapterOptions) callconv(.Async) RequestAdapterResponse {
|
pub fn requestAdapter(interface: Interface, options: *const RequestAdapterOptions) callconv(.Async) RequestAdapterResponse {
|
||||||
var frame_buffer = std.heap.page_allocator.allocAdvanced(
|
var frame_buffer = std.heap.page_allocator.allocAdvanced(
|
||||||
u8,
|
u8,
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ pub const DescriptorTag = enum {
|
||||||
canvas_html_selector,
|
canvas_html_selector,
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: docs
|
|
||||||
pub const Descriptor = union(DescriptorTag) {
|
pub const Descriptor = union(DescriptorTag) {
|
||||||
metal_layer: struct {
|
metal_layer: struct {
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ const StencilOperation = @import("enums.zig").StencilOperation;
|
||||||
const VertexFormat = @import("enums.zig").VertexFormat;
|
const VertexFormat = @import("enums.zig").VertexFormat;
|
||||||
const VertexStepMode = @import("enums.zig").VertexStepMode;
|
const VertexStepMode = @import("enums.zig").VertexStepMode;
|
||||||
|
|
||||||
// TODO: docs
|
|
||||||
pub const Limits = extern struct {
|
pub const Limits = extern struct {
|
||||||
max_texture_dimension_1d: u32,
|
max_texture_dimension_1d: u32,
|
||||||
max_texture_dimension_2d: u32,
|
max_texture_dimension_2d: u32,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue