gpu: add Texture.BindingLayout

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 16:10:41 -07:00 committed by Stephen Gutekanst
parent da4edf6e1d
commit 9b5fb77d7f
2 changed files with 7 additions and 7 deletions

View file

@ -204,13 +204,6 @@ typedef struct WGPUCopyTextureForBrowserOptions {
WGPUAlphaMode dstAlphaMode; WGPUAlphaMode dstAlphaMode;
} WGPUCopyTextureForBrowserOptions; } WGPUCopyTextureForBrowserOptions;
typedef struct WGPUTextureBindingLayout {
WGPUChainedStruct const * nextInChain;
WGPUTextureSampleType sampleType;
WGPUTextureViewDimension viewDimension;
bool multisampled;
} WGPUTextureBindingLayout;
typedef struct WGPUTextureDataLayout { typedef struct WGPUTextureDataLayout {
WGPUChainedStruct const * nextInChain; WGPUChainedStruct const * nextInChain;
uint64_t offset; uint64_t offset;

View file

@ -180,6 +180,12 @@ pub const ViewDimension = enum(u32) {
dimension_3d = 0x00000006, dimension_3d = 0x00000006,
}; };
pub const BindingLayout = struct {
sample_type: SampleType,
view_dimension: ViewDimension,
multisampled: bool,
};
test "syntax" { test "syntax" {
_ = VTable; _ = VTable;
_ = reference; _ = reference;
@ -192,4 +198,5 @@ test "syntax" {
_ = Dimension; _ = Dimension;
_ = SampleType; _ = SampleType;
_ = ViewDimension; _ = ViewDimension;
_ = BindingLayout;
} }