gpu: add PipelineLayout.Descriptor
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
3ec84f516a
commit
d19c868fb6
3 changed files with 24 additions and 14 deletions
|
|
@ -1,3 +1,6 @@
|
|||
const Texture = @import("Texture.zig");
|
||||
const PredefinedColorSpace = @import("enums.zig").PredefinedColorSpace;
|
||||
|
||||
const ExternalTexture = @This();
|
||||
|
||||
/// The type erased pointer to the ExternalTexture implementation
|
||||
|
|
@ -28,9 +31,17 @@ pub inline fn destroy(texture: ExternalTexture) void {
|
|||
texture.vtable.destroy(texture.ptr);
|
||||
}
|
||||
|
||||
pub const Descriptor = struct {
|
||||
label: ?[*:0]const u8 = null,
|
||||
plane0: Texture.View,
|
||||
plane1: Texture.View,
|
||||
color_space: PredefinedColorSpace,
|
||||
};
|
||||
|
||||
test "syntax" {
|
||||
_ = VTable;
|
||||
_ = reference;
|
||||
_ = release;
|
||||
_ = destroy;
|
||||
_ = Descriptor;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
const BindGroup = @import("BindGroup.zig");
|
||||
|
||||
const PipelineLayout = @This();
|
||||
|
||||
/// The type erased pointer to the PipelineLayout implementation
|
||||
|
|
@ -23,8 +25,14 @@ pub inline fn setLabel(qset: PipelineLayout, label: [:0]const u8) void {
|
|||
qset.vtable.setLabel(qset.ptr, label);
|
||||
}
|
||||
|
||||
pub const Descriptor = struct {
|
||||
label: ?[*:0]const u8 = null,
|
||||
bind_group_layouts: []const BindGroup.Layout,
|
||||
};
|
||||
|
||||
test "syntax" {
|
||||
_ = VTable;
|
||||
_ = reference;
|
||||
_ = release;
|
||||
_ = Descriptor;
|
||||
}
|
||||
|
|
|
|||
19
gpu/src/TODO
19
gpu/src/TODO
|
|
@ -21,28 +21,32 @@ typedef struct WGPUChainedStructOut {
|
|||
|
||||
|
||||
|
||||
|
||||
// TODO: Dawn specific
|
||||
typedef struct WGPUDawnCacheDeviceDescriptor {
|
||||
WGPUChainedStruct chain;
|
||||
char const * isolationKey;
|
||||
} WGPUDawnCacheDeviceDescriptor;
|
||||
|
||||
// TODO: Dawn specific
|
||||
typedef struct WGPUDawnEncoderInternalUsageDescriptor {
|
||||
WGPUChainedStruct chain;
|
||||
bool useInternalUsages;
|
||||
} WGPUDawnEncoderInternalUsageDescriptor;
|
||||
|
||||
// TODO: Dawn specific
|
||||
typedef struct WGPUDawnInstanceDescriptor {
|
||||
WGPUChainedStruct chain;
|
||||
uint32_t additionalRuntimeSearchPathsCount;
|
||||
const char* const * additionalRuntimeSearchPaths;
|
||||
} WGPUDawnInstanceDescriptor;
|
||||
|
||||
// TODO: Dawn specific
|
||||
typedef struct WGPUDawnTextureInternalUsageDescriptor {
|
||||
WGPUChainedStruct chain;
|
||||
WGPUTextureUsageFlags internalUsage;
|
||||
} WGPUDawnTextureInternalUsageDescriptor;
|
||||
|
||||
// TODO: Dawn specific
|
||||
typedef struct WGPUDawnTogglesDeviceDescriptor {
|
||||
WGPUChainedStruct chain;
|
||||
uint32_t forceEnabledTogglesCount;
|
||||
|
|
@ -51,20 +55,7 @@ typedef struct WGPUDawnTogglesDeviceDescriptor {
|
|||
const char* const * forceDisabledToggles;
|
||||
} WGPUDawnTogglesDeviceDescriptor;
|
||||
|
||||
typedef struct WGPUExternalTextureDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
char const * label;
|
||||
WGPUTextureView plane0;
|
||||
WGPUTextureView plane1;
|
||||
WGPUPredefinedColorSpace colorSpace;
|
||||
} WGPUExternalTextureDescriptor;
|
||||
|
||||
typedef struct WGPUPipelineLayoutDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
char const * label;
|
||||
uint32_t bindGroupLayoutCount;
|
||||
WGPUBindGroupLayout const * bindGroupLayouts;
|
||||
} WGPUPipelineLayoutDescriptor;
|
||||
|
||||
typedef struct WGPUQuerySetDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue