Skip to content

docs(libSceAgc): record how sceAgcGetGsPrimPayload searches the IDX_FORMAT registers on firmware 11.60 - #26753

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
xXPBSXx:docs/libsceagc-gsprimpayload-search
Nov 25, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
xXPBSXx:docs/libsceagc-gsprimpayload-search

Conversation

@xXPBSXx

@xXPBSXx xXPBSXx commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

What

The debt entry of sceAgcGetGsPrimPayload (docs/dev/debt/libSceAgc.md, line 17 on main) says that AnyPS5's search over the context registers does not stop at an SPI_SHADER_IDX_FORMAT (0x1C2) entry whose format is not SPI_SHADER_2COMP, as an analysis of the library describes, while OpenAGC stops there, and that this is "not verified on PS5 hardware". No fragment on main names this entry. This pull request adds one fragment, docs/dev/debt/changes/docs-libsceagc-gsprimpayload-search.md (the entry with the sentence "not verified on PS5 hardware" replaced by "on a PS5 only the search below was measured", and one sentence added), and no code.

A PS5 payload process on firmware 11.60 loaded libSceAgc.sprx and took sceAgcGetGsPrimPayload with dlsym (found; a control name in libkernel.sprx and a control name of the same module, sceAgcCbCondWriteGetSize, were found, and a name that does not exist was not). It called the function eight times, once per case, at 17:06 UTC on 2026-11-24 (one run), on a synthetic shader record in a static buffer: the layout of Shader is taken from core/libs/SceShaders.hpp and only the context register list is filled, so the prototype (payload*, shader*) and the layout are assumptions, and the payload word was pre-filled with 0xAA. The results (lines 9 to 16 of the output) were 8 or 0 in the first word, and the other words stayed untouched:

  • one SPI_SHADER_IDX_FORMAT register with format 2 (SPI_SHADER_2COMP): 8; with value 0x12 (low nibble 2, upper bits set): 8; with format 1: 0 (cases a.1, a.3, a.2);
  • two such registers, first format 1 and then format 2: 8, so the search went on past the entry that is not 2COMP (a.4); first format 2 and then format 1: 8 (a.5); another register (0x291) first and then format 2: 8 (a.6); only another register, no SPI_SHADER_IDX_FORMAT: 0 (a.7);
  • an empty list, with count 0 and a null register array: 0 (a.8).

I read the function in core/libs/prx/libSceAgc/Shader/src/GsPrimPayload.cpp on main 89aad36: it loops over the registers up to num_cx_registers (line 33), takes the first with offset 0x1C2 and a low nibble of 2 (line 38), writes 8 and stops, and otherwise writes 0, so a non-2COMP entry does not stop the search. I applied that rule to the eight register lists of the probe with a script on the host: it gives the value the console returned in all 8 cases (the null array with count 0 never reaches a read). The library's own code was not run against these calls. Its tests (core/libs/prx/libSceAgc/tests/GsPrimPayload.cpp) already check the same rules with their own values: no registers (testNoRegisters, line 46), format 2 (line 51), the low nibble and formats other than 2 (line 56), other registers (line 65) and a search that goes on past a non-matching entry (line 70); no test or code is changed here.

Not measured: a register count greater than 0 with a null register array, a null payload and a null shader (the entry says these throw; the probe made none of these calls), unmapped pointers, a title process, other firmware, and whether the prototype and the layout of the record are the console's. The probe also called sceAgcGetGsOversubscription after these cases; its results are not part of this pull request and nothing about that function is changed. The entry keeps its other text, including the sentence about the analysis it cites and OpenAGC.

Tested

Measured on a PS5 with firmware 11.60 (kernel_get_fw_version 0x11600005), from a homebrew payload process (ps5-payload-sdk, elfldr) that loads libSceAgc.sprx and takes the function with dlsym, on 2026-11-24 at 17:06 UTC (one run). A title process may differ. The probe source and the complete output are in the first comment.

Case (synthetic shader record, assumed layout) PS5 payload process, firmware 11.60 rule in GsPrimPayload.cpp on main (not run)
IDX_FORMAT format 2 / value 0x12 / format 1 8 / 8 / 0 8 / 8 / 0
format 1 then 2 / format 2 then 1 8 / 8 8 / 8
other register, then format 2 / only another register 8 / 0 8 / 0
count 0, null array 0 0

The change is 1 new file, 4 lines, no code and no test. The entry grows from 632 to 998 characters, counted with the leading - as tools/check_conventions.py does, so it stays under the limit of 1000. I ran tools/check_conventions.py --base (with this title and this body) and tools/debt_fold.py --check on the merge of this head into main at 5f04682 (a merge commit made with git merge-tree, in a separate checkout): both pass, and the merge has no conflict. This is a documentation change, so no GPU test applies. Title use of the function is not established: no run log of a title that I know of calls it. Not tested: the emulator against these calls, the cases listed above as not measured, a title process and other firmware.

Overlap: counted on 2026-11-24 from 19:11 to 19:25 UTC, starting from the list of the 2466 open pull requests (file lists from the GitHub API; the 17 with 100 or more files were read in full through the files API) against main at 5f04682; the 8 open pull requests that have a GsPrimPayload file or change docs/dev/debt/libSceAgc.md (#6743, #12315, #17742, #19051, #19486, #20294, #20548 and #21376) were each merged with this branch and with main (git merge-tree), and the patches of the debt files and of the libSceAgc files of the 1779 open pull requests that change a file under docs/dev/debt/, a libSceAgc file or 100 or more files (read between 08:09 on 23 November and 19:25 UTC; the ones new or changed since 16:46 UTC today were read again) were searched for sceAgcGetGsPrimPayload and GsPrimPayload. This change adds one new file, docs/dev/debt/changes/docs-libsceagc-gsprimpayload-search.md, on the entry at libSceAgc.md line 17, and no code. No open pull request has a file of that name or changes the entry at line 17 (the others change libSceAgc.md at other places, old lines 24 to 68), and none changes GsPrimPayload.cpp or its tests against main. Of the 8, #6743, #19051 and #21376 merge cleanly with this branch and with main, and #12315, #17742, #19486, #20294 and #20548 conflict with main already. #6743 and #19486 show lines of tests/GsPrimPayload.cpp in their patches against an older base (checks of an unwritable payload pointer and an unreadable shader), but git diff of their heads against main changes none of its files, because the change is in main already (#22192, merged on 17 November, in the base of this branch). #22416 (a change of GsOversubscription.cpp, PrimState.cpp and InterpolantMapping.cpp) names sceAgcGetGsPrimPayload in its description, changes none of the files of this change, and merges cleanly with this branch and with main. A search of open and recently merged pull requests (since 15 November) for the function name and for IDX_FORMAT finds only #22416 (open) and #22192 (merged), and no pull request on the search of the registers. This pull request does not depend on any of them (Depends on: none).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a (documentation only)
  • AI-assisted: yes

…ORMAT registers on firmware 11.60

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@xXPBSXx

xXPBSXx commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Probe source (built with ps5-payload-sdk; PROBE_BUILD is the first 12 hex digits of the source's SHA-256) and the complete raw output of the run on 2026-11-24 at 17:06 UTC. The utc in the PROBE line is the console's own clock, about 1 h 42 min ahead of real UTC; the time in the pull request is real UTC. The probe loads libSceAgc.sprx, checks a control name in libkernel.sprx, a name that does not exist (expected not found) and a control name of the same module, looks up the two functions with dlsym, and calls them on a synthetic shader record in a static buffer (the layout is assumed), guarded against signals and with a watchdog thread. The pull request cites lines 9 to 16 (the eight calls of sceAgcGetGsPrimPayload). The output also contains the calls of sceAgcGetGsOversubscription (lines 18 to 20, the last of them ended by a signal, after which the probe stopped); they are not part of this pull request. The German note about aborting and the probe's internal letter were removed from the header comment, and the code is unchanged; the build ID is the hash of the original file.

Probe: probe.c (build d1c10b830039)
#include <errno.h>
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <ps5/kernel.h>   /* only for kernel_get_fw_version() */

#ifndef PROBE_NAME
#define PROBE_NAME "unnamed"
#endif
#ifndef PROBE_BUILD
#define PROBE_BUILD "unbuilt"
#endif
/* Self limit: on timeout the runner can only close the connection, not end the process on the console.
   The probe ends itself after at most PROBE_MAX_S seconds (the build script sets timeout - 10 s). */
#ifndef PROBE_MAX_S
#define PROBE_MAX_S 50
#endif

static void probe_alarm(int sig) {
  static const char msg[] = "TIMEOUT\tprobe self limit\n";
  (void)sig;
  (void)!write(1, msg, sizeof msg - 1);
  _exit(124);
}

static int cases = 0;

static void probe_header(void) {
  char utc[32];
  time_t now = time(0);
  struct tm tmv;
  gmtime_r(&now, &tmv);
  strftime(utc, sizeof utc, "%Y-%m-%dT%H:%M:%SZ", &tmv);
  printf("PROBE\t%s\tfw=0x%08x\tbuild=%s\tpid=%d\tutc=%s\n", PROBE_NAME, kernel_get_fw_version(), PROBE_BUILD,
         getpid(), utc);
  fflush(stdout);
}

/* CASE: id, description of the call, return value as long, errno (0 if not set), extra (hex/bytes). */
static void probe_case(const char* id, const char* call, long ret, int err, const char* extra) {
  printf("CASE\t%s\t%s\t%ld\t%d\t%s\n", id, call, ret, err, extra ? extra : "-");
  fflush(stdout);
  cases++;
}

static void probe_end(void) {
  printf("END\t%d\n", cases);
  fflush(stdout);
}

#include <dlfcn.h>
#include <setjmp.h>
#include <stdlib.h>
#include <pthread.h>
#include <sys/mman.h>
#include <sys/types.h>

static sigjmp_buf guard_env;
static volatile int guard_sig = 0;
static volatile int guard_active = 0;
static volatile int guard_hits = 0;
static void guard_handler(int s) {
  static const char msg[] = "FAULT\tprobe guard: fault outside a guarded call or too many faults\n";
  if(!guard_active || ++guard_hits > 8) {
    (void)!write(1, msg, sizeof msg - 1);
    _exit(125);
  }
  guard_sig = s;
  guard_active = 0;
  siglongjmp(guard_env, 1);
}
static void guard_arm(void) {
  struct sigaction sa;
  memset(&sa, 0, sizeof sa);
  sa.sa_handler = guard_handler;
  sigaction(SIGSEGV, &sa, 0);
  sigaction(SIGBUS, &sa, 0);
  sigaction(SIGABRT, &sa, 0);
}
#define CALL(rvar, evar, expr) do { errno = 0; guard_sig = 0; rvar = -1; if(sigsetjmp(guard_env, 1) == 0) { guard_active = 1; rvar = (expr); } guard_active = 0; evar = errno; } while(0)
#include <time.h>

/* Probe: sceAgcGetGsPrimPayload and sceAgcGetGsOversubscription in libSceAgc.sprx on firmware 11.60 (payload process; a title process may differ), pure evaluation of a synthetic shader record in a static buffer; no driver or context initialisation, no submit. dlopen first (result printed at once), control in libkernel, negative control, control in the same module, names of the two functions. The prototypes sceAgcGetGsPrimPayload(uint32_t* payload, const Shader* gs) and sceAgcGetGsOversubscription(ShaderRegister* regs, const Shader* gs, uint32_t budget, float factor) and the Shader layout are ASSUMPTIONS. SOURCE OF THE LAYOUT: core/libs/SceShaders.hpp at upstream/main 6417a957a6b1 (struct Shader, ShaderRegister, ShaderSpecialRegs), and only the fields that GsPrimPayload.cpp and GsOversubscription.cpp of that state read: cx_registers, num_cx_registers (uint8 at offset 91), specials->vgt_shader_stages_en; every other field is zero and every pointer in the record points into the static buffers of this probe; the search question follows the OpenAGC game_compat.c lines 1285-1310. Outputs are filled with 0xAA so that writes show. Negative or NaN factors are not used. Pointer cases (NULL, 0x10) are single calls and come last; a fault ends the calls. A watchdog thread ends the probe after PROBE_MAX_S. */

typedef long (*f4_t)(long, long, long, long);
static void* L;
static int stopped = 0;
static void note(const char* t) { printf("NOTE\t%s\n", t); fflush(stdout); }
static void report(const char* id, const char* what, const char* ex) { probe_case(id, what, 0, 0, ex); }
static void* wd_thread(void* arg) {
  static const char msg[] = "TIMEOUT\twatchdog thread\n";
  unsigned left = PROBE_MAX_S;
  (void)arg;
  while(left) left = sleep(left);
  (void)!write(1, msg, sizeof msg - 1);
  _exit(124);
  return 0;
}
static void wd_start(void) { pthread_t t; if(pthread_create(&t, 0, wd_thread, 0) == 0) pthread_detach(t); }
static int canary_ok(const unsigned char* p, int n) { for(int i = 0; i < n; i++) if(p[i] != 0xAA) return 0; return 1; }

typedef struct { unsigned offset; unsigned value; } Reg;
typedef struct { Reg ge_cntl; Reg vgt_shader_stages_en; unsigned dmod; unsigned short ur_start, ur_end; unsigned draw_modifier[2]; Reg vgt_gs_out_prim_type; Reg ge_user_vgpr_en; } Special;
typedef struct {
  unsigned file_header; unsigned version; void* user_data; const volatile void* code;
  Reg* cx_registers; Reg* sh_registers; Special* specials; void* input_semantics; void* output_semantics;
  unsigned header_size; unsigned shader_size; unsigned ecb; unsigned target; unsigned num_input_semantics;
  unsigned short scratch; unsigned short num_output_semantics; unsigned short special_sizes;
  unsigned char type; unsigned char num_cx; unsigned char num_sh;
} Shd;
typedef int (*pp_t)(void*, void*);
typedef int (*os_t)(void*, void*, unsigned, float);
static pp_t f_pp; static os_t f_os;
static Reg REGS[8];
static Shd GSD;
static Special SPEC;
static struct { unsigned w[4]; unsigned char can[64]; } PAY;
static unsigned char gsguard[64];
static void arm(void) { memset(PAY.w, 0xAA, sizeof PAY.w); memset(PAY.can, 0xAA, sizeof PAY.can); }
static void setgs(int n) { memset(&GSD, 0, sizeof GSD); GSD.cx_registers = REGS; GSD.num_cx = (unsigned char)n; GSD.specials = &SPEC; memset(&SPEC, 0, sizeof SPEC); SPEC.vgt_shader_stages_en.value = 0x400000u; }
static void fin(const char* id, const char* what, long r) {
  char ex[300];
  snprintf(ex, sizeof ex, "rc=0x%08x out0=0x%08x out1=0x%08x out2=0x%08x out3=0x%08x canaries_intact=%d signal=%d", (unsigned)r, PAY.w[0], PAY.w[1], PAY.w[2], PAY.w[3], canary_ok(PAY.can, 64), (int)guard_sig);
  probe_case(id, what, guard_sig ? -1 : (int)r, 0, ex);
  if(guard_sig) stopped = 1;
}
static void prim(const char* id, const char* what, void* pay, void* gs) {
  if(stopped) return;
  arm();
  long r = -1; int e;
  CALL(r, e, f_pp(pay, gs));
  fin(id, what, r);
}
static void over(const char* id, const char* what, void* regs, void* gs, unsigned budget, float factor) {
  if(stopped) return;
  arm();
  long r = -1; int e;
  CALL(r, e, f_os(regs, gs, budget, factor));
  fin(id, what, r);
}
#define PAYP ((void*)PAY.w)
int main(void) {
  signal(SIGALRM, probe_alarm);
  alarm(PROBE_MAX_S);
  probe_header();
  guard_arm();
  wd_start();
  L = dlopen("libSceAgc.sprx", RTLD_LAZY);
  { char ex[16]; snprintf(ex, sizeof ex, "%d", L != 0); report("0", "dlopen of the module (1 yes, 0 no)", ex); }
  if(!L) { probe_end(); return 0; }
  { void* k = dlopen("libkernel.sprx", RTLD_LAZY); char ex[80]; snprintf(ex, sizeof ex, "libkernel_opened=%d control_found=%d", k != 0, k ? dlsym(k, "sceKernelGetProcessTime") != 0 : 0); report("1", "control in libkernel.sprx: sceKernelGetProcessTime (dlsym, name only)", ex); }
  { char ex[40]; snprintf(ex, sizeof ex, "found=%d", dlsym(L, "probe_e_no_such_function_in_module") != 0); report("2", "negative control, a name that does not exist (expected found=0)", ex); }
  { char ex[40]; snprintf(ex, sizeof ex, "found=%d", dlsym(L, "sceAgcCbCondWriteGetSize") != 0); report("2b", "control in the same module: sceAgcCbCondWriteGetSize (dlsym, name only)", ex); }
  f_pp = (pp_t)dlsym(L, "sceAgcGetGsPrimPayload");
  f_os = (os_t)dlsym(L, "sceAgcGetGsOversubscription");
  { char ex[60]; snprintf(ex, sizeof ex, "GetGsPrimPayload_found=%d GetGsOversubscription_found=%d", f_pp != 0, f_os != 0); report("3", "the two functions under test (dlsym, name only)", ex); }
  if(!f_pp || !f_os) { probe_end(); return 0; }
  note("next: sceAgcGetGsPrimPayload(payload*, shader*) on a synthetic shader record in a static buffer (assumed layout: Shader of the library headers, context register list of offset/value pairs); the payload word is filled with 0xAA; formats: 2 = SPI_SHADER_2COMP");
  REGS[0].offset = 0x1C2; REGS[0].value = 2; setgs(1); prim("a.1", "one IDX_FORMAT (0x1C2) register with format 2 (2COMP)", PAYP, &GSD);
  REGS[0].offset = 0x1C2; REGS[0].value = 1; setgs(1); prim("a.2", "one IDX_FORMAT register with format 1 (not 2COMP)", PAYP, &GSD);
  REGS[0].offset = 0x1C2; REGS[0].value = 0x12; setgs(1); prim("a.3", "one IDX_FORMAT register with value 0x12 (low nibble 2, upper bits set)", PAYP, &GSD);
  REGS[0].offset = 0x1C2; REGS[0].value = 1; REGS[1].offset = 0x1C2; REGS[1].value = 2; setgs(2); prim("a.4", "two IDX_FORMAT registers: first format 1, then format 2 (does the search go on past a non-2COMP entry?)", PAYP, &GSD);
  REGS[0].offset = 0x1C2; REGS[0].value = 2; REGS[1].offset = 0x1C2; REGS[1].value = 1; setgs(2); prim("a.5", "two IDX_FORMAT registers: first format 2, then format 1", PAYP, &GSD);
  REGS[0].offset = 0x291; REGS[0].value = 0; REGS[1].offset = 0x1C2; REGS[1].value = 2; setgs(2); prim("a.6", "one other register (0x291) first, then IDX_FORMAT format 2", PAYP, &GSD);
  REGS[0].offset = 0x291; REGS[0].value = 0; setgs(1); prim("a.7", "only another register (0x291), no IDX_FORMAT", PAYP, &GSD);
  setgs(0); GSD.cx_registers = 0; prim("a.8", "zero context registers, null register array", PAYP, &GSD);
  note("next: sceAgcGetGsOversubscription(regs*, shader*, budget, float factor), output of two offset/value pairs filled with 0xAA, assumed prototype");
  over("b.1", "budget 0, shader NULL, factor 1.0", PAYP, 0, 0u, 1.0f);
  over("b.2", "budget 0xFFFFFFFF, shader NULL, factor 1.0", PAYP, 0, 0xFFFFFFFFu, 1.0f);
  REGS[0].offset = 0x291; REGS[0].value = 0; REGS[1].offset = 0x2D3; REGS[1].value = 0; REGS[2].offset = 0x1B1; REGS[2].value = 0; REGS[3].offset = 0x207; REGS[3].value = 0; REGS[4].offset = 0x1FF; REGS[4].value = 0x40;
  setgs(5); over("b.3", "synthetic GS (onchip 0, subgroup 0, vs_out 0, cl_out 0, max output 0x40, wave32), budget 0x10000, factor 0.0", PAYP, &GSD, 0x10000u, 0.0f);
  setgs(5); over("b.4", "same synthetic GS, budget 0x10000, factor 0.5", PAYP, &GSD, 0x10000u, 0.5f);
  setgs(5); over("b.5", "same synthetic GS, budget 0x10000, factor 1.0", PAYP, &GSD, 0x10000u, 1.0f);
  setgs(5); over("b.6", "same synthetic GS, budget 0, factor 1.0 (shader given, budget zero)", PAYP, &GSD, 0u, 1.0f);
  note("next: pointer cases, one call each, last; a fault ends the calls");
  REGS[0].offset = 0x1C2; REGS[0].value = 2; setgs(1);
  prim("z.1", "GetGsPrimPayload with a NULL payload pointer, valid shader", 0, &GSD);
  prim("z.2", "GetGsPrimPayload with payload pointer 0x10 (unmapped), valid shader", (void*)0x10, &GSD);
  prim("z.3", "GetGsPrimPayload with a NULL shader pointer, valid payload", PAYP, 0);
  prim("z.4", "GetGsPrimPayload with shader pointer 0x10 (unmapped), valid payload", PAYP, (void*)0x10);
  over("z.5", "GetGsOversubscription with a NULL output pointer, budget 0", 0, 0, 0u, 1.0f);
  over("z.6", "GetGsOversubscription with output pointer 0x10 (unmapped), budget 0", (void*)0x10, 0, 0u, 1.0f);
  probe_end();
  return 0;
}
Probe: stdout
PROBE	libSceAgc_gs_primpayload_oversub	fw=0x11600005	build=d1c10b830039	pid=547	utc=2026-11-24T18:48:13Z
[AgcDriver] Info - Initialized, submit.mode= 1. 
CASE	0	dlopen of the module (1 yes, 0 no)	0	0	1
CASE	1	control in libkernel.sprx: sceKernelGetProcessTime (dlsym, name only)	0	0	libkernel_opened=1 control_found=1
CASE	2	negative control, a name that does not exist (expected found=0)	0	0	found=0
CASE	2b	control in the same module: sceAgcCbCondWriteGetSize (dlsym, name only)	0	0	found=1
CASE	3	the two functions under test (dlsym, name only)	0	0	GetGsPrimPayload_found=1 GetGsOversubscription_found=1
NOTE	next: sceAgcGetGsPrimPayload(payload*, shader*) on a synthetic shader record in a static buffer (assumed layout: Shader of the library headers, context register list of offset/value pairs); the payload word is filled with 0xAA; formats: 2 = SPI_SHADER_2COMP
CASE	a.1	one IDX_FORMAT (0x1C2) register with format 2 (2COMP)	0	0	rc=0x00000000 out0=0x00000008 out1=0xaaaaaaaa out2=0xaaaaaaaa out3=0xaaaaaaaa canaries_intact=1 signal=0
CASE	a.2	one IDX_FORMAT register with format 1 (not 2COMP)	0	0	rc=0x00000000 out0=0x00000000 out1=0xaaaaaaaa out2=0xaaaaaaaa out3=0xaaaaaaaa canaries_intact=1 signal=0
CASE	a.3	one IDX_FORMAT register with value 0x12 (low nibble 2, upper bits set)	0	0	rc=0x00000000 out0=0x00000008 out1=0xaaaaaaaa out2=0xaaaaaaaa out3=0xaaaaaaaa canaries_intact=1 signal=0
CASE	a.4	two IDX_FORMAT registers: first format 1, then format 2 (does the search go on past a non-2COMP entry?)	0	0	rc=0x00000000 out0=0x00000008 out1=0xaaaaaaaa out2=0xaaaaaaaa out3=0xaaaaaaaa canaries_intact=1 signal=0
CASE	a.5	two IDX_FORMAT registers: first format 2, then format 1	0	0	rc=0x00000000 out0=0x00000008 out1=0xaaaaaaaa out2=0xaaaaaaaa out3=0xaaaaaaaa canaries_intact=1 signal=0
CASE	a.6	one other register (0x291) first, then IDX_FORMAT format 2	0	0	rc=0x00000000 out0=0x00000008 out1=0xaaaaaaaa out2=0xaaaaaaaa out3=0xaaaaaaaa canaries_intact=1 signal=0
CASE	a.7	only another register (0x291), no IDX_FORMAT	0	0	rc=0x00000000 out0=0x00000000 out1=0xaaaaaaaa out2=0xaaaaaaaa out3=0xaaaaaaaa canaries_intact=1 signal=0
CASE	a.8	zero context registers, null register array	0	0	rc=0x00000000 out0=0x00000000 out1=0xaaaaaaaa out2=0xaaaaaaaa out3=0xaaaaaaaa canaries_intact=1 signal=0
NOTE	next: sceAgcGetGsOversubscription(regs*, shader*, budget, float factor), output of two offset/value pairs filled with 0xAA, assumed prototype
CASE	b.1	budget 0, shader NULL, factor 1.0	0	0	rc=0x00000000 out0=0x10000000 out1=0x00000000 out2=0x10000000 out3=0x00000000 canaries_intact=1 signal=0
CASE	b.2	budget 0xFFFFFFFF, shader NULL, factor 1.0	0	0	rc=0x00000000 out0=0x10000000 out1=0x000007ff out2=0x10000000 out3=0x007f0000 canaries_intact=1 signal=0
CASE	b.3	synthetic GS (onchip 0, subgroup 0, vs_out 0, cl_out 0, max output 0x40, wave32), budget 0x10000, factor 0.0	-1	0	rc=0xffffffff out0=0x10000000 out1=0x00000000 out2=0x10000000 out3=0x00000000 canaries_intact=1 signal=11
NOTE	next: pointer cases, one call each, last; a fault ends the calls
END	16

AI-assisted (Claude Code).

@github-actions github-actions Bot added the docs label Nov 24, 2026
@oneandonlydean
oneandonlydean merged commit b189ab5 into boykopovar:main Nov 25, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants