From 159ead625e6358817a7a26334ae9ef94dd3103ec Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sat, 22 Aug 2026 22:48:45 -0400 Subject: [PATCH] fixing weird identifiers... --- code/duffle/gte.atom.h | 20 ++++++++++---------- code/hello_camera/hello_camera.c | 10 +++++----- code/hello_camera/hello_camera.h | 6 +++--- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/code/duffle/gte.atom.h b/code/duffle/gte.atom.h index 6886f4b..52a7883 100644 --- a/code/duffle/gte.atom.h +++ b/code/duffle/gte.atom.h @@ -336,21 +336,21 @@ typedef Struct_(Binds_gte_cross_v3s4) { V3_S4* src_a; V3_S4* src_b; V3_S4* out; typedef Struct_(RegUse_gte_cross_v3s4) { Reg_(V3_S4) a; Reg_(V3_S4) b; - union { Reg out, t0; } x; - union { Reg src_a, t1, rt11; } y; - union { Reg src_b, t2, rt22; } z; + Reg out; + Reg src_a; + Reg src_b; }; internal MipsAtom* gte_cross_v3s4(AtomArena_R aa, RegUse_gte_cross_v3s4 r) atom_info(atom_bind(Binds_gte_cross_v3s4)) MipsAtom_Proc_(aa, { - load_word(r.y.src_a, R_TapePtr, O_(Binds_gte_cross_v3s4,src_a)), - load_word(r.z.src_b, R_TapePtr, O_(Binds_gte_cross_v3s4,src_b)), - load_word(r.x.out, R_TapePtr, O_(Binds_gte_cross_v3s4,out)), - LdSlot_ add_ui_self( R_TapePtr, S_(Binds_gte_cross_v3s4)), + load_word(r.src_a, R_TapePtr, O_(Binds_gte_cross_v3s4,src_a)), + load_word(r.src_b, R_TapePtr, O_(Binds_gte_cross_v3s4,src_b)), + load_word(r.out, R_TapePtr, O_(Binds_gte_cross_v3s4,out)), + LdSlot_ add_ui_self(R_TapePtr, S_(Binds_gte_cross_v3s4)), - mac_load_v3s4(r.a, r.y.src_a, 0), LdSlot_ - mac_load_v3s4(r.b, r.z.src_b, 0), LdSlot_ + mac_load_v3s4(r.a, r.src_a, 0), LdSlot_ + mac_load_v3s4(r.b, r.src_b, 0), LdSlot_ mac_gte_op_cross_v3s4(r.a, r.b), /* RT diagonal + IR + OP + MAC read + shift */ - mac_store_v3s4(r.a, r.x.out, 0), + mac_store_v3s4(r.a, r.out, 0), mac_yield() }) diff --git a/code/hello_camera/hello_camera.c b/code/hello_camera/hello_camera.c index 64d3f7f..f5b190f 100644 --- a/code/hello_camera/hello_camera.c +++ b/code/hello_camera/hello_camera.c @@ -138,11 +138,11 @@ internal void compile_init_atoms(void) { smem.gte_cross_v3s4 = gte_cross_v3s4(& ab, RegUse_(gte_cross_v3s4) { - .a = ralloc_v3(), - .b = ralloc_v3(), - .x = ralloc(), - .y = ralloc(), - .z = ralloc(), + .a = ralloc_v3(), + .b = ralloc_v3(), + .out = ralloc(), + .src_a = ralloc(), + .src_b = ralloc(), }); regfile_reset(& rf); diff --git a/code/hello_camera/hello_camera.h b/code/hello_camera/hello_camera.h index 1746882..e1cc70b 100644 --- a/code/hello_camera/hello_camera.h +++ b/code/hello_camera/hello_camera.h @@ -61,7 +61,7 @@ I_ void ent_cube128_init(A8_V3_S2* verts, A6_V4_S2* faces) { typedef Struct_(Ent_Cube) { V3_S4 accel; V3_S4 vel; - V3_S4 pos; // RGA(Lengyel): affine point with implicit weight one. Storage alias of V3_S4. + V3_S4 pos; V3_S4 scale; V3_S2 rot; A8_V3_S2 verts; @@ -88,7 +88,7 @@ I_ void ent_floor_init(A4_V3_S2* verts, A2_V3_S2* faces) { }; typedef Struct_(Ent_Floor) { V3_S4 accel; - V3_S4 pos; // RGA(Lengyel): affine point with implicit weight one. Storage alias of V3_S4. + V3_S4 pos; V3_S4 scale; V3_S2 rot; A4_V3_S2 verts; @@ -96,7 +96,7 @@ typedef Struct_(Ent_Floor) { }; typedef Struct_(Camera) { - P3_S4 pos; // RGA(Lengyel): affine point with implicit weight one. Storage alias of V3_S4. + P3_S4 pos; V3_S2 rot; MT3_S2S4 look_at; };