Skip to content

Commit

Permalink
msl: fix codegen for pixel-post-process example
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
emidoots committed Feb 24, 2024
1 parent fe51d6d commit d779f74
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/shader/codegen/msl.zig
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,9 @@ fn emitFn(msl: *Msl, inst: Inst.Fn) !void {
const slice = msl.fn_emit_list.entries.slice();
const keys = slice.items(.key).ptr;
const values = slice.items(.value).ptr;
var i: usize = 0;
while (i < slice.len) : (i += 1) {
var i: usize = slice.len;
while (i > 0) {
i -= 1;
if (values[i] == false) {
values[i] = true;
try msl.emitFn(msl.air.getInst(keys[i]).@"fn");
Expand Down

0 comments on commit d779f74

Please sign in to comment.