gpu: add ImageCopyBuffer; ImageCopyTexture
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
d1bad15add
commit
85041d6f93
3 changed files with 17 additions and 33 deletions
33
gpu/src/TODO
33
gpu/src/TODO
|
|
@ -73,39 +73,6 @@ typedef struct WGPUCopyTextureForBrowserOptions {
|
||||||
WGPUAlphaMode dstAlphaMode;
|
WGPUAlphaMode dstAlphaMode;
|
||||||
} WGPUCopyTextureForBrowserOptions;
|
} 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;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,8 @@ pub const RenderPassColorAttachment = @import("structs.zig").RenderPassColorAtta
|
||||||
pub const VertexState = @import("structs.zig").VertexState;
|
pub const VertexState = @import("structs.zig").VertexState;
|
||||||
pub const FragmentState = @import("structs.zig").FragmentState;
|
pub const FragmentState = @import("structs.zig").FragmentState;
|
||||||
pub const ColorTargetState = @import("structs.zig").ColorTargetState;
|
pub const ColorTargetState = @import("structs.zig").ColorTargetState;
|
||||||
|
pub const ImageCopyBuffer = @import("structs.zig").ImageCopyBuffer;
|
||||||
|
pub const ImageCopyTexture = @import("structs.zig").ImageCopyTexture;
|
||||||
|
|
||||||
// Enumerations
|
// Enumerations
|
||||||
pub const Feature = @import("enums.zig").Feature;
|
pub const Feature = @import("enums.zig").Feature;
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ const StencilFaceState = @import("data.zig").StencilFaceState;
|
||||||
const Color = @import("data.zig").Color;
|
const Color = @import("data.zig").Color;
|
||||||
const VertexBufferLayout = @import("data.zig").VertexBufferLayout;
|
const VertexBufferLayout = @import("data.zig").VertexBufferLayout;
|
||||||
const BlendState = @import("data.zig").BlendState;
|
const BlendState = @import("data.zig").BlendState;
|
||||||
|
const Origin3D = @import("data.zig").Origin3D;
|
||||||
const CompilationMessageType = @import("enums.zig").CompilationMessageType;
|
const CompilationMessageType = @import("enums.zig").CompilationMessageType;
|
||||||
const PrimitiveTopology = @import("enums.zig").PrimitiveTopology;
|
const PrimitiveTopology = @import("enums.zig").PrimitiveTopology;
|
||||||
const IndexFormat = @import("enums.zig").IndexFormat;
|
const IndexFormat = @import("enums.zig").IndexFormat;
|
||||||
|
|
@ -134,6 +135,18 @@ pub const ColorTargetState = struct {
|
||||||
write_mask: ColorWriteMask,
|
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" {
|
test "syntax" {
|
||||||
_ = CompilationMessage;
|
_ = CompilationMessage;
|
||||||
_ = CompilationInfo;
|
_ = CompilationInfo;
|
||||||
|
|
@ -149,4 +162,6 @@ test "syntax" {
|
||||||
_ = RenderPassColorAttachment;
|
_ = RenderPassColorAttachment;
|
||||||
_ = VertexState;
|
_ = VertexState;
|
||||||
_ = FragmentState;
|
_ = FragmentState;
|
||||||
|
_ = ImageCopyBuffer;
|
||||||
|
_ = ImageCopyTexture;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue