Compute, fragment (3D) and transfer kicks
Register-level hardware specification for the Compute (CDM, DM 4),
Fragment (3D, DM 3) and Transfer (TQ_3D, DM 3) kicks, per-DM
completion cache flushes, and context-switch (preemption) behaviour
(docsClean/BXE-2-32/kick-compute-and-3d, docsClean/BXE-2-32/scheduler, docsClean/BXE-2-32/input-attachment-dump).
Common kick skeleton
1. Ensure GPU power domain and GPU units are initialised
2. [First kick after units init] Run rf_cmd_addr compute job if non-zero (no-op on mainline)
3. Program multicore control (BCAST ..._CTRL_COMMON)
4. Bind memory context to BIF slot 1..7 and BIF_CAT_BASE_INDEX (BEFORE any unit writes)
5. [TA / 3D] Load HWRTData into PM context 0 / 1 (+ load commands / handshakes)
6. Program unit register block (mostly broadcast, from host-prepared command regs)
7. [Preemption only] Reload saved state from snapshot / context-state buffer
8. Trace entry + arm watchdog + record DM state
9. TRIGGER (last write):
TA: CR[0x0400] = 1
CDM: BCAST[0x0478] = 1
3D: BCAST[0x0F00] = 1 (ISP_RENDER left at 0; |= 0x10 on resume only)
TQ: BCAST[0x0F08] = isp_render ; then BCAST[0x0F00] = 1
10. ON COMPLETION:
clear EVENT_STATUS bit -> per-DM cache flush -> retire cCCB command -> UFO updates -> host IRQ
Compute kick (CDM / DM 4)
Verified in E013, E019, E021, E023:
Phase |
Register(s) |
Data / action |
|---|---|---|
A |
|
Read |
B |
|
64-bit |
C |
Snapshot buffer |
Context-switch resume only (unused when CSW flags are 0) |
D |
Trace |
Arm DM 4 watchdog; poke |
E |
|
|
F |
|
CDM run trigger (last write); completes on
|
Unused fields on BXE-2-32:
tpu(BRN 49927),cdm_item(COMPUTE_MORTON_CAPABLE),compute_cluster(CLUSTER_GROUPING),tpu_tag_cdm_ctrl(TPU_DM_GLOBAL_REGISTERS) andcdm_cb*(CDM_USER_MODE_QUEUE) are all gated by absent features and ignored.Single-kick / zero-workgroup rule (Q10): the firmware issues one kick per
rogue_fwif_cmd_computeand never inspects workgroup dimensions; the CDM walks the full control stream itself.
Fragment kick (3D / DM 3)
Verified for colour and depth/stencil renders under -DEXP_TA
(E036–E040, docsClean/BXE-2-32/kick-compute-and-3d):
A. Preconditions
BCAST[ROGUE_CR_MULTICORE_FRAGMENT_CTRL_COMMON] (0xF310) = 1.Bind DM 3 BIF slot (
CAT_BASE_INDEXbits 10:8).Load the HWRTData into PM context 1 (store freelists from PM ctx 0, load into PM ctx 1, load ALIST/MLIST SPs via
0x0288/0x0190, copyPM_CAT_BASE_*0→*1, set0x0388 = 1; Parameter Manager (PM), freelists and SPM). On a partial render with pending deallocation, pause PM deallocation first and setPM_PARTIAL_RENDER_ENABLE = 1.
B–D. ISP, ZLS, MSAA and PBE registers (broadcast)
Register(s) |
Data source |
Notes |
|---|---|---|
|
|
USC pixel output control |
|
|
Clear colour registers |
|
|
Multiview index |
|
|
64-bit region headers base |
|
|
Target pixel max & macrotile size (do not put |
|
|
|
|
|
|
|
|
|
|
|
Observed |
|
|
64-bit scissor & depth-bias bases |
|
|
Omitted / 0 on partial renders & colour-only; reverts to 0 after render (E038) |
|
|
Depth load and store bases (0 without depth) |
|
|
Stencil load and store bases (0 without stencil) |
|
|
Shared with geometry kick |
|
|
Pipe reset ( |
|
|
End-of-tile pixel-event PDS program ( |
|
|
Two planar PBE banks (up to 8 MRTs, 2 words per target) |
F. Trigger and resume
Normal kick: write
CR[0x0298] = 0,CR[0x01C8] = 0, then launch withBCAST[0x0F00] = 1(ISP_RENDERremains0from pipe reset).Resuming a stored context (
ROGUE_FWIF_CONTEXT_FLAGS_NEED_RESUME): reload per-core saved state intoCR[0x1020], setROGUE_CR_ISP_RENDER |= 0x10, reloadCR[0x0298]/0x01C8, then launch withBCAST[0x0F00] = 1[spec].Unused
FRAG_PR: when geometry finishes without OOM, theFRAG_PRentry sitting ahead ofFRAGin the fragment cCCB is skipped without launching the 3D pipe — itsread_offsetadvances and its trailing UFO updates still run ([spec]Q16m).
Input-attachment subpasses [open]
Multi-subpass render passes (such as
dEQP-VK.renderpasses.renderpass1…d32_sfloat.input.clear.dont_care.draw)
use two distinct HWRTData (the second sharing VHeap/TPC and placing its
region headers at +0x80, with its own MLIST, VDM stream and PM
catalogues, using CONTEXT_PB_BASE = 0 shared-PB mode). A fault at VA
0x2000 decodes as TAG_ID = 0x25 (IPF control request) reading an
invalid region-header, MLIST or catalogue base (docsClean/BXE-2-32/input-attachment-dump,
E039, E040).
Transfer kick (TQ_3D / DM 3)
TQ_3D executes blits and resolves through the 3D pixel pipe (verified in
E020, E022, E023, E026). Binding the DM 3 BIF
slot is a mandatory gate before writing any ISP/PBE register.
Complete broadcast register table (docsClean/BXE-2-32/kick-compute-and-3d, Q13/Q14/Q25):
Register(s) |
Value (from |
Condition |
|---|---|---|
|
|
Always |
|
|
Always |
|
|
Always ( |
|
|
Only if |
|
|
Always |
|
|
Always |
|
|
Always (tiles in flight) |
|
|
Always |
|
|
Only if |
|
|
Always |
|
|
Always (see pixel-event layout below) |
|
|
Targets |
|
|
Always (suppresses |
|
|
Immediately before launch (writing earlier drops the first tile of multi-tile transfers; E023) |
|
|
Always last write (pixel-pipe launch; completes on
|
Pixel-event PDS registers and destination address (Q13)
The destination surface address is not in pbe_wordx_mrty (which holds
only PBE register words: format, stride, swizzle, clip). The host places PBE
state words (including address_low/address_high) in the data
segment of the end-of-tile pixel-event PDS program:
0x0618: pixel-event PDS code offset (bits 31:4, 128-bit granular, relative toPDS_EXEC_BASE0x0610);0x0620: pixel-event PDS data offset (bits 31:4, 128-bit granular);0x0628: pixel-event info (const_sizebits 4:0,temp_stridebits 8:5,usc_sr_sizebits 14:9). Ifconst_size == 0orusc_sr_size == 0, the pixel-event task is skipped andPIXELBE_END_RENDERnever arrives.
Per-DM completion cache flush
Runs after clearing the completion event and before retiring the command so host memory is coherent when fences signal (docsClean/BXE-2-32/kick-compute-and-3d Q14, verified in E023). All writes are broadcast:
Step |
Fragment / |
Compute (DM 4) |
|---|---|---|
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
MIPS write barrier |
— |
9 |
|
|
A geometry variant also exists (0x0688 = 1, 0x0668 = 5, SLC
DM_TA) [spec].
Context switching (preemption) and overlap rules [spec]
Preemption only occurs when OS config flags enable it
(ROGUE_FWIF_INICFG_OS_CTXSWITCH_{FRAG,CDM,GEOM,TDM}_EN; mainline leaves
all at 0). Observed behaviour on BXE-2-32 (docsClean/BXE-2-32/scheduler Q24):
Fragment (DM 3): store requested via
BCAST[0x1000] = 1while(ISP_RENDER & 3) != 3; completes on normalPIXELBE_END_RENDER, setsROGUE_FWIF_CONTEXT_FLAGS_NEED_RESUMEwithout retiring the cCCB command, and resumes later by restoring PM ctx 1,0x1020andISP_RENDER |= 0x10.Geometry (DM 2): not preempted mid-pass — the store completes only when
TA_FINISHEDarrives naturally.Compute (DM 4): on mainline + Mesa, a CDM store faults at low VA
0xD0and triggers HWR (making CDM CSW unusable on this stack).Inter-DM overlap rules: scheduling blocks a DM while HWR is active, when
DISABLE_DM_OVERLAPis set and another DM runs, or while a partial render is pending (final fragment cannot start ahead ofFRAG_PR).