gpu: make ConstantEntry & ColorTargetState C ABI compatible

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 19:36:21 -07:00 committed by Stephen Gutekanst
parent 36afd39945
commit f5e6976937
2 changed files with 12 additions and 10 deletions

View file

@ -69,7 +69,8 @@ pub const DepthStencilState = struct {
};
// TODO: how does this map to browser API?
pub const ConstantEntry = struct {
pub const ConstantEntry = extern struct {
reserved: ?*anyopaque = null,
key: [*:0]const u8,
value: f64,
};
@ -129,7 +130,8 @@ pub const FragmentState = struct {
targets: []const ColorTargetState,
};
pub const ColorTargetState = struct {
pub const ColorTargetState = extern struct {
reserved: ?*anyopaque = null,
format: Texture.Format,
blend: *const BlendState,
write_mask: ColorWriteMask,