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,30 +1,25 @@
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); chain: ChainedStruct,
external_texture: ExternalTexture,
pub const BindingEntry = extern struct { };
chain: ChainedStruct,
external_texture: ExternalTexture, pub const ExternalTextureBindingLayout = extern struct {
}; chain: ChainedStruct,
};
pub const BindingLayout = extern struct {
chain: ChainedStruct, pub const ExternalTextureDescriptor = extern struct {
}; next_in_chain: *const ChainedStruct,
label: ?[*:0]const u8 = null,
pub const Descriptor = extern struct { plane0: TextureView,
next_in_chain: *const ChainedStruct, plane1: TextureView = TextureView.none, // nullable
label: ?[*:0]const u8 = null, do_yuv_to_rgb_conversion_only: bool,
plane0: TextureView, yuv_to_rgb_conversion_matrix: ?[*]const f32 = null, // nullable
plane1: TextureView = TextureView.none, // nullable src_transform_function_parameters: [*]const f32,
do_yuv_to_rgb_conversion_only: bool, dst_transform_function_parameters: [*]const f32,
yuv_to_rgb_conversion_matrix: ?[*]const f32 = null, // nullable gamut_conversion_matrix: [*]const f32,
src_transform_function_parameters: [*]const f32,
dst_transform_function_parameters: [*]const f32,
gamut_conversion_matrix: [*]const f32,
};
}; };