gpu: add RequestAdapterOptions
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
a91186c2c9
commit
b90658aba8
3 changed files with 13 additions and 12 deletions
|
|
@ -1,10 +1,3 @@
|
||||||
pub const RequestAdapterOptions = extern struct {
|
|
||||||
next_in_chain: *const ChainedStruct,
|
|
||||||
compatible_surface: Surface = Surface.none, // nullable
|
|
||||||
power_preference: PowerPreference,
|
|
||||||
force_fallback_adapter: bool,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub const SamplerBindingLayout = extern struct {
|
pub const SamplerBindingLayout = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
type: SamplerBindingType,
|
type: SamplerBindingType,
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ pub const ChainedStruct = @import("types.zig").ChainedStruct;
|
||||||
pub const LoadOp = @import("types.zig").LoadOp;
|
pub const LoadOp = @import("types.zig").LoadOp;
|
||||||
pub const StoreOp = @import("types.zig").StoreOp;
|
pub const StoreOp = @import("types.zig").StoreOp;
|
||||||
pub const RenderPassTimestampLocation = @import("types.zig").RenderPassTimestampLocation;
|
pub const RenderPassTimestampLocation = @import("types.zig").RenderPassTimestampLocation;
|
||||||
|
pub const PowerPreference = @import("types.zig").PowerPreference;
|
||||||
|
|
||||||
pub const ComputePassTimestampWrite = struct {
|
pub const ComputePassTimestampWrite = struct {
|
||||||
query_set: QuerySet,
|
query_set: QuerySet,
|
||||||
|
|
@ -64,17 +65,19 @@ pub const RenderPassDepthStencilAttachment = extern struct {
|
||||||
stencil_read_only: bool,
|
stencil_read_only: bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const RenderPassDescriptorMaxDrawCount = extern struct {
|
|
||||||
chain: ChainedStruct,
|
|
||||||
max_draw_count: u64,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub const RenderPassTimestampWrite = extern struct {
|
pub const RenderPassTimestampWrite = extern struct {
|
||||||
query_set: QuerySet,
|
query_set: QuerySet,
|
||||||
query_index: u32,
|
query_index: u32,
|
||||||
location: RenderPassTimestampLocation,
|
location: RenderPassTimestampLocation,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub const RequestAdapterOptions = extern struct {
|
||||||
|
next_in_chain: *const ChainedStruct,
|
||||||
|
compatible_surface: Surface = Surface.none, // nullable
|
||||||
|
power_preference: PowerPreference,
|
||||||
|
force_fallback_adapter: bool,
|
||||||
|
};
|
||||||
|
|
||||||
test {
|
test {
|
||||||
refAllDecls(@import("adapter.zig"));
|
refAllDecls(@import("adapter.zig"));
|
||||||
refAllDecls(@import("bind_group.zig"));
|
refAllDecls(@import("bind_group.zig"));
|
||||||
|
|
|
||||||
|
|
@ -482,6 +482,11 @@ pub const PrimitiveState = extern struct {
|
||||||
cull_mode: CullMode,
|
cull_mode: CullMode,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub const RenderPassDescriptorMaxDrawCount = extern struct {
|
||||||
|
chain: ChainedStruct,
|
||||||
|
max_draw_count: u64,
|
||||||
|
};
|
||||||
|
|
||||||
test "BackendType name" {
|
test "BackendType name" {
|
||||||
try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name());
|
try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue