diff --git a/gpu/src/QuerySet.zig b/gpu/src/QuerySet.zig index 51d2cc66..b9b8fac3 100644 --- a/gpu/src/QuerySet.zig +++ b/gpu/src/QuerySet.zig @@ -1,3 +1,5 @@ +const QueryType = @import("enums.zig").QueryType; + const PipelineStatistic = @import("enums.zig").PipelineStatistic; const QuerySet = @This(); diff --git a/gpu/src/Sampler.zig b/gpu/src/Sampler.zig index 9780140c..98ac604d 100644 --- a/gpu/src/Sampler.zig +++ b/gpu/src/Sampler.zig @@ -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("data.zig").CompareFunction; const Sampler = @This(); diff --git a/gpu/src/TODO b/gpu/src/TODO index cfa8ca22..7c278856 100644 --- a/gpu/src/TODO +++ b/gpu/src/TODO @@ -57,18 +57,6 @@ typedef struct WGPUDawnTogglesDeviceDescriptor { -typedef struct WGPUTextureViewDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; - WGPUTextureFormat format; - WGPUTextureViewDimension dimension; - uint32_t baseMipLevel; - uint32_t mipLevelCount; - uint32_t baseArrayLayer; - uint32_t arrayLayerCount; - WGPUTextureAspect aspect; -} WGPUTextureViewDescriptor; - typedef struct WGPUBindGroupDescriptor { WGPUChainedStruct const * nextInChain; char const * label; diff --git a/gpu/src/TextureView.zig b/gpu/src/TextureView.zig index 11a1e617..a339a3bb 100644 --- a/gpu/src/TextureView.zig +++ b/gpu/src/TextureView.zig @@ -1,3 +1,5 @@ +const Texture = @import("Texture.zig"); + const TextureView = @This(); /// The type erased pointer to the TextureView implementation @@ -23,8 +25,20 @@ pub inline fn setLabel(texture_view: TextureView, label: [:0]const u8) void { texture_view.vtable.setLabel(texture_view.ptr, label); } +pub const Descriptor = struct { + label: ?[*:0]const u8 = null, + format: Texture.Format, + dimension: Texture.ViewDimension, + base_mip_level: u32, + mip_level_count: u32, + base_array_layer: u32, + array_layer_count: u32, + aspect: Texture.Aspect, +}; + test "syntax" { _ = VTable; _ = reference; _ = release; + _ = Descriptor; }