gpu: correct flagsets
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
81301ea2c1
commit
176ff4c72b
2 changed files with 8 additions and 9 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
const std = @import("std");
|
||||||
|
|
||||||
ptr: *anyopaque,
|
ptr: *anyopaque,
|
||||||
|
|
||||||
pub const BindingType = enum(u32) {
|
pub const BindingType = enum(u32) {
|
||||||
|
|
@ -28,9 +30,7 @@ pub const Usage = packed struct {
|
||||||
indirect: bool = false,
|
indirect: bool = false,
|
||||||
query_resolve: bool = false,
|
query_resolve: bool = false,
|
||||||
|
|
||||||
_pad0: u2 = 0,
|
_padding: u22 = 0,
|
||||||
_pad1: u8 = 0,
|
|
||||||
_pad2: u16 = 0,
|
|
||||||
|
|
||||||
comptime {
|
comptime {
|
||||||
std.debug.assert(
|
std.debug.assert(
|
||||||
|
|
@ -40,6 +40,6 @@ pub const Usage = packed struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn equal(a: Usage, b: Usage) bool {
|
pub fn equal(a: Usage, b: Usage) bool {
|
||||||
return @bitCast(a, u32) == @bitCast(b, u32);
|
return @truncate(u10, @bitCast(u32, a)) == @truncate(u10, @bitCast(u32, b)) ;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
const testing = @import("std").testing;
|
const std = @import("std");
|
||||||
|
const testing = std.testing;
|
||||||
|
|
||||||
pub const AlphaMode = enum(u32) {
|
pub const AlphaMode = enum(u32) {
|
||||||
premultiplied = 0x00000000,
|
premultiplied = 0x00000000,
|
||||||
|
|
@ -301,9 +302,7 @@ pub const ColorWriteMask = packed struct {
|
||||||
blue: bool = false,
|
blue: bool = false,
|
||||||
alpha: bool = false,
|
alpha: bool = false,
|
||||||
|
|
||||||
_pad0: u4 = 0,
|
_padding: u28 = 0,
|
||||||
_pad1: u8 = 0,
|
|
||||||
_pad2: u16 = 0,
|
|
||||||
|
|
||||||
comptime {
|
comptime {
|
||||||
std.debug.assert(
|
std.debug.assert(
|
||||||
|
|
@ -320,7 +319,7 @@ pub const ColorWriteMask = packed struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn equal(a: ColorWriteMask, b: ColorWriteMask) bool {
|
pub fn equal(a: ColorWriteMask, b: ColorWriteMask) bool {
|
||||||
return @bitCast(a, u32) == @bitCast(b, u32);
|
return @truncate(u4, @bitCast(u32, a)) == @truncate(u4, @bitCast(u32, b)) ;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue