aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv/Section.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-02-19 10:10:59 -0500
committerGitHub <noreply@github.com>2023-02-19 10:10:59 -0500
commit0bb178bbb2451238a326c6e916ecf38fbc34cab1 (patch)
treeb2499481c929ba1497d6eef8b85cc46205f953ab /src/codegen/spirv/Section.zig
parent346ec15c5005e523c2a1d4b967ee7a4e5d1e9775 (diff)
parent5fc6bbe71eeecb195d2cda2a2522e7fd04749d5b (diff)
downloadzig-0bb178bbb2451238a326c6e916ecf38fbc34cab1.tar.gz
zig-0bb178bbb2451238a326c6e916ecf38fbc34cab1.zip
Merge pull request #14671 from ziglang/multi-object-for
implement multi-object for loops
Diffstat (limited to 'src/codegen/spirv/Section.zig')
-rw-r--r--src/codegen/spirv/Section.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen/spirv/Section.zig b/src/codegen/spirv/Section.zig
index 83f594dcef..a76314f5fa 100644
--- a/src/codegen/spirv/Section.zig
+++ b/src/codegen/spirv/Section.zig
@@ -195,7 +195,7 @@ fn writeContextDependentNumber(section: *Section, operand: spec.LiteralContextDe
fn writeExtendedMask(section: *Section, comptime Operand: type, operand: Operand) void {
var mask: Word = 0;
- inline for (@typeInfo(Operand).Struct.fields) |field, bit| {
+ inline for (@typeInfo(Operand).Struct.fields, 0..) |field, bit| {
switch (@typeInfo(field.type)) {
.Optional => if (@field(operand, field.name) != null) {
mask |= 1 << @intCast(u5, bit);