From 28771211471a75142fe9ecc53cee623ce55f9741 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 15 Jul 2022 23:06:20 -0700 Subject: [PATCH] gpu: add CopyTextureForBrowserOptions Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 11 ----------- gpu/src/main.zig | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index e8a699e0..0bbd4fec 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,14 +1,3 @@ -typedef struct WGPUCopyTextureForBrowserOptions { - next_in_chain: *const ChainedStruct, - flip_y: bool, - needs_color_space_conversion: bool, - WGPUAlphaMode srcAlphaMode; - float const * srcTransferFunctionParameters; // nullable - float const * conversionMatrix; // nullable - float const * dstTransferFunctionParameters; // nullable - WGPUAlphaMode dstAlphaMode; -} WGPUCopyTextureForBrowserOptions; - typedef struct WGPUDawnCacheDeviceDescriptor { WGPUChainedStruct chain; char const * isolationKey; diff --git a/gpu/src/main.zig b/gpu/src/main.zig index 8df8ee01..a33e6f79 100644 --- a/gpu/src/main.zig +++ b/gpu/src/main.zig @@ -44,6 +44,17 @@ pub const ComputePassTimestampWrite = struct { location: ComputePassTimestampLocation, }; +pub const CopyTextureForBrowserOptions = extern struct { + next_in_chain: *const ChainedStruct, + flip_y: bool, + needs_color_space_conversion: bool, + src_alpha_mode: AlphaMode, + src_transfer_function_parameters: ?*const f32 = null, + conversion_matrix: ?*const f32 = null, + dst_transfer_function_parameters: ?*const f32 = null, + dst_alpha_mode: AlphaMode, +}; + test { refAllDecls(@import("adapter.zig")); refAllDecls(@import("bind_group.zig"));