gpu: add ProgrammableStageDescriptor
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
74b7e66793
commit
8683fa8aa9
2 changed files with 9 additions and 8 deletions
|
|
@ -1,11 +1,3 @@
|
||||||
pub const WGPUProgrammableStageDescriptor = extern struct {
|
|
||||||
next_in_chain: *const ChainedStruct,
|
|
||||||
module: ShaderModule,
|
|
||||||
entry_point: [*:0]const u8,
|
|
||||||
constant_count: u32,
|
|
||||||
constants: [*]const ConstantEntry,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub const WGPURenderPassColorAttachment = extern struct {
|
pub const WGPURenderPassColorAttachment = extern struct {
|
||||||
view: TextureView = TextureView.none, // nullable
|
view: TextureView = TextureView.none, // nullable
|
||||||
resolve_target: TextureView = TextureView.none, // nullable
|
resolve_target: TextureView = TextureView.none, // nullable
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ const testing = std.testing;
|
||||||
const Texture = @import("texture.zig").Texture;
|
const Texture = @import("texture.zig").Texture;
|
||||||
const TextureView = @import("texture_view.zig").TextureView;
|
const TextureView = @import("texture_view.zig").TextureView;
|
||||||
const Buffer = @import("buffer.zig").Buffer;
|
const Buffer = @import("buffer.zig").Buffer;
|
||||||
|
const ShaderModule = @import("shader_module.zig").ShaderModule;
|
||||||
|
|
||||||
pub const AlphaMode = enum(u32) {
|
pub const AlphaMode = enum(u32) {
|
||||||
premultiplied = 0x00000000,
|
premultiplied = 0x00000000,
|
||||||
|
|
@ -549,6 +550,14 @@ pub const ImageCopyTexture = extern struct {
|
||||||
aspect: Texture.Aspect,
|
aspect: Texture.Aspect,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub const ProgrammableStageDescriptor = extern struct {
|
||||||
|
next_in_chain: *const ChainedStruct,
|
||||||
|
module: ShaderModule,
|
||||||
|
entry_point: [*:0]const u8,
|
||||||
|
constant_count: u32,
|
||||||
|
constants: [*]const ConstantEntry,
|
||||||
|
};
|
||||||
|
|
||||||
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