| ... | @@ -6639,7 +6639,8 @@ fn airWorkGroupSize(self: *FuncGen, inst: Air.Inst.Index) Allocator.Error!Builde | ... | @@ -6639,7 +6639,8 @@ fn airWorkGroupSize(self: *FuncGen, inst: Air.Inst.Index) Allocator.Error!Builde |
| 6639 | // Load the work_group_* member from the struct as u16. | 6639 | // Load the work_group_* member from the struct as u16. |
| 6640 | // Just treat the dispatch pointer as an array of u16 to keep things simple. | 6640 | // Just treat the dispatch pointer as an array of u16 to keep things simple. |
| 6641 | const workgroup_size_ptr = try self.ptraddConst(dispatch_ptr, (2 + dimension) * 2); | 6641 | const workgroup_size_ptr = try self.ptraddConst(dispatch_ptr, (2 + dimension) * 2); |
| 6642 | return self.load(workgroup_size_ptr, .@"2", .u16, .normal); | 6642 | const workgroup_size = try self.load(workgroup_size_ptr, .@"2", .u16, .normal); |
| | 6643 | return try self.wip.cast(.zext, workgroup_size, .i32, ""); |
| 6643 | }, | 6644 | }, |
| 6644 | .nvptx, .nvptx64 => { | 6645 | .nvptx, .nvptx64 => { |
| 6645 | return self.workIntrinsic(dimension, 1, "nvvm.read.ptx.sreg.ntid"); | 6646 | return self.workIntrinsic(dimension, 1, "nvvm.read.ptx.sreg.ntid"); |