diff --git a/gpu/src/TODO b/gpu/src/TODO index 08d9350b..ef135ac6 100644 --- a/gpu/src/TODO +++ b/gpu/src/TODO @@ -73,39 +73,6 @@ typedef struct WGPUCopyTextureForBrowserOptions { WGPUAlphaMode dstAlphaMode; } WGPUCopyTextureForBrowserOptions; -typedef struct WGPUImageCopyBuffer { - WGPUChainedStruct const * nextInChain; - WGPUTextureDataLayout layout; - WGPUBuffer buffer; -} WGPUImageCopyBuffer; - -typedef struct WGPUImageCopyTexture { - WGPUChainedStruct const * nextInChain; - WGPUTexture texture; - uint32_t mipLevel; - WGPUOrigin3D origin; - WGPUTextureAspect aspect; -} WGPUImageCopyTexture; - -typedef struct WGPUSupportedLimits { - WGPUChainedStructOut * nextInChain; - WGPULimits limits; -} WGPUSupportedLimits; - -typedef struct WGPUExternalTextureBindingEntry { - WGPUChainedStruct chain; - WGPUExternalTexture externalTexture; -} WGPUExternalTextureBindingEntry; - -typedef struct WGPUExternalTextureBindingLayout { - WGPUChainedStruct chain; -} WGPUExternalTextureBindingLayout; - -typedef struct WGPUPrimitiveDepthClampingState { - WGPUChainedStruct chain; - bool clampDepth; -} WGPUPrimitiveDepthClampingState; - diff --git a/gpu/src/main.zig b/gpu/src/main.zig index 486df44e..8d82ccd0 100644 --- a/gpu/src/main.zig +++ b/gpu/src/main.zig @@ -103,6 +103,8 @@ pub const RenderPassColorAttachment = @import("structs.zig").RenderPassColorAtta pub const VertexState = @import("structs.zig").VertexState; pub const FragmentState = @import("structs.zig").FragmentState; pub const ColorTargetState = @import("structs.zig").ColorTargetState; +pub const ImageCopyBuffer = @import("structs.zig").ImageCopyBuffer; +pub const ImageCopyTexture = @import("structs.zig").ImageCopyTexture; // Enumerations pub const Feature = @import("enums.zig").Feature; diff --git a/gpu/src/structs.zig b/gpu/src/structs.zig index 7d356aff..b87dc625 100644 --- a/gpu/src/structs.zig +++ b/gpu/src/structs.zig @@ -9,6 +9,7 @@ const StencilFaceState = @import("data.zig").StencilFaceState; const Color = @import("data.zig").Color; const VertexBufferLayout = @import("data.zig").VertexBufferLayout; const BlendState = @import("data.zig").BlendState; +const Origin3D = @import("data.zig").Origin3D; const CompilationMessageType = @import("enums.zig").CompilationMessageType; const PrimitiveTopology = @import("enums.zig").PrimitiveTopology; const IndexFormat = @import("enums.zig").IndexFormat; @@ -134,6 +135,18 @@ pub const ColorTargetState = struct { write_mask: ColorWriteMask, }; +pub const ImageCopyBuffer = struct { + layout: Texture.DataLayout, + buffer: Buffer, +}; + +pub const ImageCopyTexture = struct { + texture: Texture, + mip_level: u32, + origin: Origin3D, + aspect: Texture.Aspect, +}; + test "syntax" { _ = CompilationMessage; _ = CompilationInfo; @@ -149,4 +162,6 @@ test "syntax" { _ = RenderPassColorAttachment; _ = VertexState; _ = FragmentState; + _ = ImageCopyBuffer; + _ = ImageCopyTexture; }