gpu: add ExternalTexture.BindingEntry

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-15 23:56:49 -07:00 committed by Stephen Gutekanst
parent 99cffbf321
commit 2fbd4b06d9
3 changed files with 7 additions and 8 deletions

View file

@ -1,8 +1,3 @@
typedef struct WGPUExternalTextureBindingEntry {
WGPUChainedStruct chain;
WGPUExternalTexture externalTexture;
} WGPUExternalTextureBindingEntry;
typedef struct WGPUExternalTextureBindingLayout { typedef struct WGPUExternalTextureBindingLayout {
WGPUChainedStruct chain; WGPUChainedStruct chain;
} WGPUExternalTextureBindingLayout; } WGPUExternalTextureBindingLayout;

View file

@ -14,20 +14,17 @@ pub const EncoderInternalUsageDescriptor = struct {
}; };
pub const InstanceDescriptor = extern struct { pub const InstanceDescriptor = extern struct {
// TODO: file an issue on Dawn: why not named nextInChain?
chain: ChainedStruct, chain: ChainedStruct,
additional_runtime_search_paths_count: u32, additional_runtime_search_paths_count: u32,
additional_runtime_search_paths: [*]const u8, additional_runtime_search_paths: [*]const u8,
}; };
pub const TextureInternalUsageDescriptor = extern struct { pub const TextureInternalUsageDescriptor = extern struct {
// TODO: file an issue on Dawn: why not named nextInChain?
chain: ChainedStruct, chain: ChainedStruct,
internal_usage: Texture.UsageFlags, internal_usage: Texture.UsageFlags,
}; };
pub const TogglesDeviceDescriptor = extern struct { pub const TogglesDeviceDescriptor = extern struct {
// TODO: file an issue on Dawn: why not named nextInChain?
chain: ChainedStruct, chain: ChainedStruct,
force_enabled_toggles_count: u32, force_enabled_toggles_count: u32,
force_enabled_toggles: [*]const u8, force_enabled_toggles: [*]const u8,

View file

@ -1,6 +1,13 @@
pub const ChainedStruct = @import("types.zig").ChainedStruct;
pub const ExternalTexture = enum(usize) { pub const ExternalTexture = enum(usize) {
_, _,
// TODO: verify there is a use case for nullable value of this type. // TODO: verify there is a use case for nullable value of this type.
pub const none: ExternalTexture = @intToEnum(ExternalTexture, 0); pub const none: ExternalTexture = @intToEnum(ExternalTexture, 0);
pub const BindingEntry = extern struct {
chain: ChainedStruct,
external_texture: ExternalTexture,
};
}; };