Skip to content

Commit d19d543

Browse files
committed
zgpu: explicitly align bool struct fields
1 parent 5e135b5 commit d19d543

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

libs/zgpu/src/wgpu.zig

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -769,8 +769,8 @@ pub const RenderBundleEncoderDescriptor = extern struct {
769769
color_formats: ?[*]const TextureFormat,
770770
depth_stencil_format: TextureFormat,
771771
sample_count: u32,
772-
depth_read_only: bool,
773-
stencil_read_only: bool,
772+
depth_read_only: bool align(4),
773+
stencil_read_only: bool align(4),
774774
};
775775

776776
pub const VertexAttribute = extern struct {
@@ -1017,8 +1017,8 @@ pub const RequestAdapterOptions = extern struct {
10171017
compatible_surface: ?Surface = null,
10181018
power_preference: PowerPreference,
10191019
backend_type: BackendType = .undef,
1020-
force_fallback_adapter: bool = false,
1021-
compatibility_mode: bool = false,
1020+
force_fallback_adapter: bool align(4) = false,
1021+
compatibility_mode: bool align(4) = false,
10221022
};
10231023

10241024
pub const ComputePassTimestampWrite = extern struct {
@@ -1125,14 +1125,14 @@ pub const CommandBufferDescriptor = extern struct {
11251125

11261126
pub const CopyTextureForBrowserOptions = extern struct {
11271127
next_in_chain: ?*const ChainedStruct = null,
1128-
flip_y: bool,
1129-
needs_color_space_conversion: bool,
1128+
flip_y: bool align(4),
1129+
needs_color_space_conversion: bool align(4),
11301130
src_alpha_mode: AlphaMode,
11311131
src_transfer_function_parameters: ?[*]const f32,
11321132
conversion_matrix: ?[*]const f32,
11331133
dst_transfer_function_parameters: ?[*]const f32,
11341134
dst_alpha_mode: AlphaMode,
1135-
internal_usage: bool,
1135+
internal_usage: bool align(4),
11361136
};
11371137

11381138
pub const TextureViewDescriptor = extern struct {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy