gpu: convert ExternalTexture from enum(usize) to *opaque

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-24 14:51:35 -07:00 committed by Stephen Gutekanst
parent 4e045ff45d
commit 1d07d1784e

View file

@ -1,22 +1,18 @@
const ChainedStruct = @import("types.zig").ChainedStruct; const ChainedStruct = @import("types.zig").ChainedStruct;
const TextureView = @import("texture_view.zig").TextureView; const TextureView = @import("texture_view.zig").TextureView;
pub const ExternalTexture = enum(usize) { pub const ExternalTexture = *opaque {};
_,
// TODO: verify there is a use case for nullable value of this type. pub const ExternalTextureBindingEntry = extern struct {
pub const none: ExternalTexture = @intToEnum(ExternalTexture, 0);
pub const BindingEntry = extern struct {
chain: ChainedStruct, chain: ChainedStruct,
external_texture: ExternalTexture, external_texture: ExternalTexture,
}; };
pub const BindingLayout = extern struct { pub const ExternalTextureBindingLayout = extern struct {
chain: ChainedStruct, chain: ChainedStruct,
}; };
pub const Descriptor = extern struct { pub const ExternalTextureDescriptor = extern struct {
next_in_chain: *const ChainedStruct, next_in_chain: *const ChainedStruct,
label: ?[*:0]const u8 = null, label: ?[*:0]const u8 = null,
plane0: TextureView, plane0: TextureView,
@ -26,5 +22,4 @@ pub const ExternalTexture = enum(usize) {
src_transform_function_parameters: [*]const f32, src_transform_function_parameters: [*]const f32,
dst_transform_function_parameters: [*]const f32, dst_transform_function_parameters: [*]const f32,
gamut_conversion_matrix: [*]const f32, gamut_conversion_matrix: [*]const f32,
};
}; };