gpu: move Texture.ViewDimension -> TextureView.Dimension
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
1c0f5c0b03
commit
bbd058f23e
7 changed files with 24 additions and 19 deletions
|
|
@ -1,4 +1,5 @@
|
|||
const Texture = @import("Texture.zig");
|
||||
const TextureView = @import("TextureView.zig");
|
||||
const PredefinedColorSpace = @import("enums.zig").PredefinedColorSpace;
|
||||
|
||||
const ExternalTexture = @This();
|
||||
|
|
@ -33,8 +34,8 @@ pub inline fn destroy(texture: ExternalTexture) void {
|
|||
|
||||
pub const Descriptor = struct {
|
||||
label: ?[*:0]const u8 = null,
|
||||
plane0: Texture.View,
|
||||
plane1: Texture.View,
|
||||
plane0: TextureView,
|
||||
plane1: TextureView,
|
||||
color_space: PredefinedColorSpace,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
const BindGroupLayout = @import("BindGroupLayout.zig");
|
||||
|
||||
const BindGroup = @import("BindGroup.zig");
|
||||
|
||||
const PipelineLayout = @This();
|
||||
|
|
@ -27,7 +29,7 @@ pub inline fn setLabel(qset: PipelineLayout, label: [:0]const u8) void {
|
|||
|
||||
pub const Descriptor = struct {
|
||||
label: ?[*:0]const u8 = null,
|
||||
bind_group_layouts: []const BindGroup.Layout,
|
||||
bind_group_layouts: []const BindGroupLayout,
|
||||
};
|
||||
|
||||
test "syntax" {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
const AddressMode = @import("enums.zig").AddressMode;
|
||||
const FilterMode = @import("enums.zig").FilterMode;
|
||||
const CompareFunction = @import("data.zig").CompareFunction;
|
||||
const CompareFunction = @import("enums.zig").CompareFunction;
|
||||
|
||||
const Sampler = @This();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
const TextureView = @import("TextureView.zig");
|
||||
|
||||
const Texture = @This();
|
||||
|
||||
/// The type erased pointer to the Texture implementation
|
||||
|
|
@ -170,19 +172,9 @@ pub const SampleType = enum(u32) {
|
|||
uint = 0x00000005,
|
||||
};
|
||||
|
||||
pub const ViewDimension = enum(u32) {
|
||||
dimension_none = 0x00000000,
|
||||
dimension_1d = 0x00000001,
|
||||
dimension_2d = 0x00000002,
|
||||
dimension_2d_array = 0x00000003,
|
||||
dimension_cube = 0x00000004,
|
||||
dimension_cube_array = 0x00000005,
|
||||
dimension_3d = 0x00000006,
|
||||
};
|
||||
|
||||
pub const BindingLayout = struct {
|
||||
sample_type: SampleType,
|
||||
view_dimension: ViewDimension,
|
||||
view_dimension: TextureView.Dimension,
|
||||
multisampled: bool,
|
||||
};
|
||||
|
||||
|
|
@ -203,7 +195,6 @@ test "syntax" {
|
|||
_ = ComponentType;
|
||||
_ = Dimension;
|
||||
_ = SampleType;
|
||||
_ = ViewDimension;
|
||||
_ = BindingLayout;
|
||||
_ = DataLayout;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ pub inline fn setLabel(texture_view: TextureView, label: [:0]const u8) void {
|
|||
pub const Descriptor = struct {
|
||||
label: ?[*:0]const u8 = null,
|
||||
format: Texture.Format,
|
||||
dimension: Texture.ViewDimension,
|
||||
dimension: TextureView.Dimension,
|
||||
base_mip_level: u32,
|
||||
mip_level_count: u32,
|
||||
base_array_layer: u32,
|
||||
|
|
@ -36,9 +36,20 @@ pub const Descriptor = struct {
|
|||
aspect: Texture.Aspect,
|
||||
};
|
||||
|
||||
pub const Dimension = enum(u32) {
|
||||
dimension_none = 0x00000000,
|
||||
dimension_1d = 0x00000001,
|
||||
dimension_2d = 0x00000002,
|
||||
dimension_2d_array = 0x00000003,
|
||||
dimension_cube = 0x00000004,
|
||||
dimension_cube_array = 0x00000005,
|
||||
dimension_3d = 0x00000006,
|
||||
};
|
||||
|
||||
test "syntax" {
|
||||
_ = VTable;
|
||||
_ = reference;
|
||||
_ = release;
|
||||
_ = Descriptor;
|
||||
_ = Dimension;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ pub const Feature = enum(u32) {
|
|||
dawn_native = 0x000003ec,
|
||||
};
|
||||
|
||||
const AddressMode = enum(u32) {
|
||||
pub const AddressMode = enum(u32) {
|
||||
repeat = 0x00000000,
|
||||
mirror_repeat = 0x00000001,
|
||||
clamp_to_edge = 0x00000002,
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ pub const PrimitiveState = struct {
|
|||
pub const StorageTextureBindingLayout = struct {
|
||||
access: StorageTextureAccess,
|
||||
format: Texture.Format,
|
||||
view_dimension: Texture.ViewDimension,
|
||||
view_dimension: TextureView.Dimension,
|
||||
};
|
||||
|
||||
pub const DepthStencilState = struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue