gpu: improve ExternalTexture.Descriptor type safety

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-08-16 21:05:54 -07:00
parent 26ee34a09f
commit b28a01d2e8

View file

@ -18,14 +18,10 @@ pub const ExternalTexture = opaque {
plane0: *TextureView, plane0: *TextureView,
plane1: ?*TextureView = null, plane1: ?*TextureView = null,
do_yuv_to_rgb_conversion_only: bool = false, do_yuv_to_rgb_conversion_only: bool = false,
// TODO: dawn.json says length 12, does it mean array length? yuv_to_rgb_conversion_matrix: ?*const [12]f32 = null,
yuv_to_rgb_conversion_matrix: ?[*]const f32 = null, src_transform_function_parameters: *const [7]f32,
// TODO: dawn.json says length 7, does it mean array length? dst_transform_function_parameters: *const [7]f32,
src_transform_function_parameters: [*]const f32, gamut_conversion_matrix: *const [9]f32,
// TODO: dawn.json says length 7, does it mean array length?
dst_transform_function_parameters: [*]const f32,
// TODO: dawn.json says length 9, does it mean array length?
gamut_conversion_matrix: [*]const f32,
}; };
pub inline fn destroy(external_texture: *ExternalTexture) void { pub inline fn destroy(external_texture: *ExternalTexture) void {