gpu: correct TextureView.Descriptor default values
Helps hexops/mach#182 Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
99de6a5b11
commit
821117fb26
2 changed files with 7 additions and 6 deletions
|
|
@ -25,14 +25,17 @@ pub inline fn setLabel(texture_view: TextureView, label: [:0]const u8) void {
|
||||||
texture_view.vtable.setLabel(texture_view.ptr, label);
|
texture_view.vtable.setLabel(texture_view.ptr, label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const mip_level_count_undefined: u32 = 0xffffffff;
|
||||||
|
const array_layer_count_undefined: u32 = 0xffffffff;
|
||||||
|
|
||||||
pub const Descriptor = struct {
|
pub const Descriptor = struct {
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
format: Texture.Format = .none,
|
format: Texture.Format = .none,
|
||||||
dimension: TextureView.Dimension,
|
dimension: TextureView.Dimension = .dimension_none,
|
||||||
base_mip_level: u32 = 0,
|
base_mip_level: u32 = 0,
|
||||||
mip_level_count: u32,
|
mip_level_count: u32 = mip_level_count_undefined,
|
||||||
base_array_layer: u32 = 0,
|
base_array_layer: u32 = 0,
|
||||||
array_layer_count: u32,
|
array_layer_count: u32 = array_layer_count_undefined,
|
||||||
aspect: Texture.Aspect = .all,
|
aspect: Texture.Aspect = .all,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,11 +147,9 @@ pub const ColorWriteMask = @import("enums.zig").ColorWriteMask;
|
||||||
pub const ShaderStage = @import("enums.zig").ShaderStage;
|
pub const ShaderStage = @import("enums.zig").ShaderStage;
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
const array_layer_count_undefined: u32 = 0xffffffff;
|
|
||||||
const copy_stride_undefined: u32 = 0xffffffff;
|
const copy_stride_undefined: u32 = 0xffffffff;
|
||||||
const limit_u32_undefined: u32 = 0xffffffff;
|
const limit_u32_undefined: u32 = 0xffffffff;
|
||||||
const limit_u64_undefined: u32 = 0xffffffffffffffff;
|
const limit_u64_undefined: u64 = 0xffffffffffffffff;
|
||||||
const mip_level_count_undefined: u32 = 0xffffffff;
|
|
||||||
const stride_undefined: u32 = 0xffffffff;
|
const stride_undefined: u32 = 0xffffffff;
|
||||||
const whole_map_size: u32 = std.math.maxInt(c_int);
|
const whole_map_size: u32 = std.math.maxInt(c_int);
|
||||||
const whole_size: u64 = 0xffffffffffffffff;
|
const whole_size: u64 = 0xffffffffffffffff;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue