gpu: add ExternalTexture.Descriptor
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
4dc69a9de6
commit
128f87a3fd
2 changed files with 13 additions and 12 deletions
|
|
@ -1,15 +1,3 @@
|
||||||
typedef struct WGPUExternalTextureDescriptor {
|
|
||||||
next_in_chain: *const ChainedStruct,
|
|
||||||
label: ?[*:0]const u8 = null,
|
|
||||||
WGPUTextureView plane0;
|
|
||||||
WGPUTextureView plane1; // nullable
|
|
||||||
do_yuv_to_rgb_conversion_only: bool,
|
|
||||||
float const * yuvToRgbConversionMatrix; // nullable
|
|
||||||
float const * srcTransferFunctionParameters;
|
|
||||||
float const * dstTransferFunctionParameters;
|
|
||||||
float const * gamutConversionMatrix;
|
|
||||||
} WGPUExternalTextureDescriptor;
|
|
||||||
|
|
||||||
typedef struct WGPUInstanceDescriptor {
|
typedef struct WGPUInstanceDescriptor {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
} WGPUInstanceDescriptor;
|
} WGPUInstanceDescriptor;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
pub const ChainedStruct = @import("types.zig").ChainedStruct;
|
pub const ChainedStruct = @import("types.zig").ChainedStruct;
|
||||||
|
pub const TextureView = @import("texture_view.zig").TextureView;
|
||||||
|
|
||||||
pub const ExternalTexture = enum(usize) {
|
pub const ExternalTexture = enum(usize) {
|
||||||
_,
|
_,
|
||||||
|
|
@ -14,4 +15,16 @@ pub const ExternalTexture = enum(usize) {
|
||||||
pub const BindingLayout = extern struct {
|
pub const BindingLayout = extern struct {
|
||||||
chain: ChainedStruct,
|
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,
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue