Skip to content

Gfxfixes - #350

Merged
techomancer merged 7 commits into
mainfrom
gfxfixes
Oct 29, 2026
Merged

techomancer merged 7 commits into
mainfrom
gfxfixes

Conversation

@techomancer

Copy link
Copy Markdown
Owner

No description provided.

techomancer and others added 7 commits October 28, 2026 21:58
The 36-bit pixel type has no alpha planes: planes 31:24 hold red's and
green's low nibbles. glReadPixels took them for alpha, so a Solid IMPACT's
deepest visual (the Octane's pixtest default) read alpha as colour bits.
Both read paths (the generic formats and the byte RGBA one) now give full
scale, GL's value for a visual without alpha.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ocode fingerprints

- HQ4: the pixel pipeline's ERAM blocks sit 0x8C words higher on the
  6.5.22 Octane (expand state, transfer size, texture-load blocks).
  Pixel-state writes and program state addresses are translated to the
  Indigo2 layout on the way in (Hq3Board::pixel_state_address), so the
  HLE sees the host pixel shape; glDrawPixels no longer draws RGB rows as
  RGBA. The colour matrix readback does not move. pixtest 52 -> 366 on
  the Octane, glstate 393 -> 394.
- A STATUS or DMABUSY read of a busy board waits up to 100 us for it
  (settle). The kernel's idle waits count polls; behind long drawing a
  context switch ran out ('hq idle wait timeout') and the X server died.
- The refresh thread takes the frame before the retrace pulse: after it,
  the copy raced the kernel's buffer flip and the client's next frame,
  and double-buffered GL tore.
- Fingerprints of the HQ microcode and each GE11 program, kept as they
  are written; logged once stable and shown by 'mgras status', with the
  release for known ones (6.5.22 Octane and Indigo2).

Notes: clanker/mgras/hq4-microcode-moves-eram-state.md,
clanker/mgras/display-snapshot-before-retrace.md,
clanker/irix/delay-loop-calibrated-cold.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The display thread pulsed the retrace (holding the vertical status for
700 us) and then composed VRAM, so the copy raced the guest's buffer flip
in the blank and the next frame's drawing into the buffer just shown. It
now composes and presents first, as IMPACT does since 7e528ae5; a flip
made at a retrace shows from the next frame. REX3 already copies its
state before raising VBLANK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[octane] graphics takes highimpact (SI with texture option: one GE, one
RE, four TRAMs) and maximpact (MXI: two GEs, two REs, four TRAMs behind
each), on the raster models of the Indigo2's High and Maximum IMPACT. The
board version bytes follow the IP30 kernel's decode: version 1 has the GE
count in bits 1:0, the board revision in 4:2 and the product in 6:5 (the
Octane's GM10 is 2, GM20 taken as 3); version 0 has the A and B TRAM
fields in 1:0 and 3:2, 3 for none. The serial-number record names GM10
or GM20 by RE count.

hinv says 'SI with texture option' and 'MXI'; gfxinfo '1 GE, 1 RE, 4
TRAMs' and '2 GEs, 2 REs, 4 TRAMs'. On IRIX 6.5.22 both pass glstate
(397, the name stack failing as on the Indigo2), pixtest (365 and 369, no
failures) and blendtest, and texsweep's output is identical to an IP28
High IMPACT's. iris-gui offers both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
glRenderMode(GL_SELECT) as libGLcore drives the GE: 0x0CB enters select
mode, INIT_NAMES / LOAD_NAME / PUSH_NAME / POP_NAME keep a name stack of
up to 64, RENDER_MODE leaves. Primitives that survive clipping draw
nothing and make a hit over their clipped window depths; a name change
turns a hit into a record [sequence, names, z min, z max, names...].
libGLcore reads the records back with __MGR_RETURN_MODE of word 0xC60
(their length) and of each word with 0xFFFFFFFF as the second argument;
0x061 turns a two-GE board's reads to the second list (empty here), 0x062
empties them. GL_NAME_STACK_DEPTH reads word 0xC59. The state lives in
the context (1536 record words fit the kernel's slot beside the rest).

glstate passes all 398 cases on IRIX 6.5.22 on the IP28 High IMPACT and
the Octane SI with texture and MXI; the new test/gltest/seltest checks
hit records (names, depth ranges, a culled-out object, nested names) and
passes on all three.

Also a note on glGetTexImage: the texsweep differences for ALPHA,
LUMINANCE, INTENSITY and RGB textures are libGLcore's host-side expansion
of the components the board returns, identical on every board, and are
left as they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Octane kernel flips XMAP buf_select at the retrace after the swap
flag rises, without waiting for the board to go idle (it flips on STATUS
0x55, HQ idle and board busy). The flag rose when SCHEDULE_SWAP reached
the HQ, while rss_fifo could still hold the frame, so fullscreen bongo
showed half-drawn frames. The HQ now drains the raster engines first.
The Indigo2 kernel flushes the board before each swap, so it never saw
this.

Perfetto: the monitor command is registered on IP30 and IP32 too, and
IMPACT traces frame capture and present, STATUS reads, flags, XMAP modes,
VC3 writes and line reads, the draw bank, interrupt lines, HEART packets
and acks, and the swap wait.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Octane read its board from [octane] graphics and ignored [graphics]
board and --graphics, so setting the board the way every other machine
does left it on the SI without a word. The board is now [graphics] board
everywhere: optional, with a per-machine default (SI on the Octane,
Newport elsewhere) read through MachineConfig::graphics_board. "none" is
a board value (Octane only). Newport, XZ and Extreme are refused on the
Octane, and a config that still sets [octane] graphics is refused with a
message naming the new key. The GUI pickers write [graphics] board.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@techomancer
techomancer merged commit 5113662 into main Oct 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant