editing/reading.

This commit is contained in:
ed
2026-08-13 21:22:29 -04:00
parent ea3e30a11e
commit b8e31123e4
9 changed files with 62 additions and 152 deletions
+5 -16
View File
@@ -440,22 +440,11 @@ enum { _C2_TX_SUBS_ = 0
#define gte_cmdw_mvmva_pass1_c11 (gte_cmd_base | enc_gte_v(2) | enc_gte_mx(3) | enc_gte_cmd(gte_cmd_mvmva))
#define gte_cmdw_mvmva_no_tr gte_cmdw_mvmva_ir
/* MVMVA pass 2 — EXACT C11 ApplyMatrixLV command.
* Command word: 0x4A49E012.
* bits 31-26: 010010 = COP2
* bit 25: 1 (CO set)
* bits 24-20: 01001 = 9 (fake_cmd)
* bit 19: 1 (sf=1)
* bits 18-17: 00 (mx=0, RT matrix)
* bits 16-15: 11 (v=3, IR)
* bits 14-13: 11 (cv=3, no translation)
* bits 5-0: 010010 = MVMVA
* sf=1, mx=0, v=3, cv=3. Pass 2 reads RT matrix, IR input, >>12. */
#define gte_cmdw_mvmva_c11_pass2_exact 0x4A49E012
/* MVMVA pass 1 — C11's exact command: 0x4A41E012.
* bit 25: 1, sf=0, mx=0, v=3, cv=3. Pass 1 reads RT matrix, IR input, no shift. */
#define gte_cmdw_mvmva_c11_pass1_exact 0x4A41E012
/* MVMVA pass 2 — C11 ApplyMatrixLV command.
* Decoded: op_cop2 | CO | fake_cmd=4 | sf=1 (>>12) | mx=0 (RT matrix) | v=3 (IR) | cv=3 (no translation) | lm=0 | cmd=MVMVA.
* Reads (RT row · IR) >> 12 into MAC1/2/3. Per-field composition (no opaque literal)
* keeps the bit layout visible at the call site + matches the libgte C-side byte-exact. */
#define gte_cmdw_mvmva_c11_pass2 (gte_cmd_base | enc_gte_fake_cmd(4) | enc_gte_sf(1) | enc_gte_v(3) | enc_gte_mx(0) | enc_gte_cv(3) | enc_gte_cmd(gte_cmd_mvmva))
/* MVMVA: sf=1 (>>12), mx=0 (RT matrix), v=0 (V0), cv=3 (no TR). */
#define gte_cmdw_mvmva_sf1_mx0_v0_cv3 (gte_cmd_base | enc_gte_sf(1) | enc_gte_cv(3) | enc_gte_v(0) | enc_gte_mx(0) | enc_gte_cmd(gte_cmd_mvmva))