Skip to content

Commit ab320d4

Browse files
committed
Convert dynamic offset to u32
1 parent aee888e commit ab320d4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/zgpu.zig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,15 +1122,19 @@ pub fn bufferEntry(
11221122
binding: u32,
11231123
visibility: wgpu.ShaderStage,
11241124
binding_type: wgpu.BufferBindingType,
1125-
has_dynamic_offset: u32,
1125+
has_dynamic_offset: bool,
11261126
min_binding_size: u64,
11271127
) wgpu.BindGroupLayoutEntry {
1128+
const emscripten_bool: u32 = switch (has_dynamic_offset) {
1129+
true => 1,
1130+
false => 0,
1131+
};
11281132
return .{
11291133
.binding = binding,
11301134
.visibility = visibility,
11311135
.buffer = .{
11321136
.binding_type = binding_type,
1133-
.has_dynamic_offset = has_dynamic_offset,
1137+
.has_dynamic_offset = emscripten_bool,
11341138
.min_binding_size = min_binding_size,
11351139
},
11361140
};

0 commit comments

Comments
 (0)