gpu: convert ExternalTexture from enum(usize) to *opaque
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
4e045ff45d
commit
1d07d1784e
1 changed files with 20 additions and 25 deletions
|
|
@ -1,30 +1,25 @@
|
|||
const ChainedStruct = @import("types.zig").ChainedStruct;
|
||||
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 none: ExternalTexture = @intToEnum(ExternalTexture, 0);
|
||||
|
||||
pub const BindingEntry = extern struct {
|
||||
chain: ChainedStruct,
|
||||
external_texture: ExternalTexture,
|
||||
};
|
||||
|
||||
pub const BindingLayout = extern struct {
|
||||
chain: ChainedStruct,
|
||||
};
|
||||
|
||||
pub const Descriptor = extern struct {
|
||||
next_in_chain: *const ChainedStruct,
|
||||
label: ?[*:0]const u8 = null,
|
||||
plane0: TextureView,
|
||||
plane1: TextureView = TextureView.none, // nullable
|
||||
do_yuv_to_rgb_conversion_only: bool,
|
||||
yuv_to_rgb_conversion_matrix: ?[*]const f32 = null, // nullable
|
||||
src_transform_function_parameters: [*]const f32,
|
||||
dst_transform_function_parameters: [*]const f32,
|
||||
gamut_conversion_matrix: [*]const f32,
|
||||
};
|
||||
pub const ExternalTextureBindingEntry = extern struct {
|
||||
chain: ChainedStruct,
|
||||
external_texture: ExternalTexture,
|
||||
};
|
||||
|
||||
pub const ExternalTextureBindingLayout = extern struct {
|
||||
chain: ChainedStruct,
|
||||
};
|
||||
|
||||
pub const ExternalTextureDescriptor = extern struct {
|
||||
next_in_chain: *const ChainedStruct,
|
||||
label: ?[*:0]const u8 = null,
|
||||
plane0: TextureView,
|
||||
plane1: TextureView = TextureView.none, // nullable
|
||||
do_yuv_to_rgb_conversion_only: bool,
|
||||
yuv_to_rgb_conversion_matrix: ?[*]const f32 = null, // nullable
|
||||
src_transform_function_parameters: [*]const f32,
|
||||
dst_transform_function_parameters: [*]const f32,
|
||||
gamut_conversion_matrix: [*]const f32,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue