[AGC/gfx1013] NGG producer has NO_PC_EXPORT and no EXP_PARAM, but fragment shader consumes live PARAM0 #868

Closed
opened 2026-10-06 11:21:09 +00:00 by guimsolutions · 2 comments
guimsolutions commented 2026-10-06 11:21:09 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by guimsolutions on 2026-10-06T11:21:09Z.


Summary

A graphics pipeline captured from UFC 5 exposes an unresolved gfx1013/AGC
inter-stage interface case.

Within the same serialized graphics request:

Producer:

  • logical vertex / NGG passthrough
  • guest VA: 0x340724800
  • FNV-1a-64: c94f39b2bd051319
  • 72 DWORDs
  • EXP_PRIM at PC +0x30, target 0x14
  • EXP_POS0 at PC +0x68, target 0x0c
  • no EXP target 0x20..0x3f

Consumer:

  • fragment shader
  • guest VA: 0x34072d000
  • FNV-1a-64: 1adb03e7b5cae97d
  • live normal PARAM0 / ATTR0 interpolation
  • Location 0 input contributes to the final MRT output

Relevant draw state includes:

VGT_SHADER_STAGES_EN = 0x02002000
SPI_VS_OUT_CONFIG = 0x00000080

decoded as:

PRIMGEN_EN = 1
PRIMGEN_PASSTHRU_EN = 1
VS_EXPORT_COUNT = 0
NO_PC_EXPORT = 1
PRIM_EXPORT_COUNT = 0

Pixel state includes a normal slot-0 interpolation mapping rather than an
explicit default-value route.

What has been ruled out

The following have been independently checked:

  • stale/lost PS input state
  • shader cache identity mismatch
  • wrong linked-program pairing
  • dead fragment ATTR0
  • hidden EXP_PARAM inside the captured producer
  • secondary producer entry/branch range
  • ordinary captured SPI/GE/VGT/PA routing
  • public PS5 Vulkan/AGC evidence currently available

The request contains exactly two linked graphics programs and the producer
above is the producer serialized with this fragment shader.

No synthetic varying or interface pruning has been implemented.

Current failure

AnyPS5 correctly rejects the Vulkan pipeline because the fragment module
requires Location 0 while the translated producer exposes no corresponding
parameter output.

The unresolved question is:

What gfx1013/AGC mechanism supplies normal fragment PARAM0 for an NGG
passthrough draw with NO_PC_EXPORT=1 and no executed EXP_PARAM?

Possibilities include:

  • an additional AGC shader part/linkage mechanism not represented in the
    current request model
  • implicit parameter-cache generation
  • gfx1013-specific register semantics
  • an incorrect interpretation of the fragment interpolation ISA/state
  • undocumented hardware behavior

Public evidence

Public PS5 Vulkan / AGC projects were inspected, but no published artifact
contains the required combination of:

  • NGG passthrough
  • NO_PC_EXPORT=1
  • no EXP_PARAM
  • live normal fragment PARAM0
  • final SPI/GE/VGT/PA state

Therefore no hardware behavior has been guessed.

Alternative verification path

LLVM supports gfx1013 independently, and AMD BC-250 / Cyan Skillfish hardware
provides a possible gfx1013 test platform.

An independent LLVM gfx1013 ISA decode and gfx1013-specific Mesa/AMDGPU audit
would be useful before resorting to native PS5 evidence.

Expected behavior

Do not bypass Vulkan interface validation.

The desired fix is to identify and generically model the guest mechanism that
supplies PARAM0, if one exists.

Safety / source material

Hashes, register values and derived instruction summaries can be published.
Full proprietary game shader binaries are intentionally not attached.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5727507906 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/868). Originally posted by [guimsolutions](https://github.com/guimsolutions) on 2026-10-06T11:21:09Z. --- ## Summary A graphics pipeline captured from UFC 5 exposes an unresolved gfx1013/AGC inter-stage interface case. Within the same serialized graphics request: Producer: - logical vertex / NGG passthrough - guest VA: 0x340724800 - FNV-1a-64: c94f39b2bd051319 - 72 DWORDs - EXP_PRIM at PC +0x30, target 0x14 - EXP_POS0 at PC +0x68, target 0x0c - no EXP target 0x20..0x3f Consumer: - fragment shader - guest VA: 0x34072d000 - FNV-1a-64: 1adb03e7b5cae97d - live normal PARAM0 / ATTR0 interpolation - Location 0 input contributes to the final MRT output Relevant draw state includes: VGT_SHADER_STAGES_EN = 0x02002000 SPI_VS_OUT_CONFIG = 0x00000080 decoded as: PRIMGEN_EN = 1 PRIMGEN_PASSTHRU_EN = 1 VS_EXPORT_COUNT = 0 NO_PC_EXPORT = 1 PRIM_EXPORT_COUNT = 0 Pixel state includes a normal slot-0 interpolation mapping rather than an explicit default-value route. ## What has been ruled out The following have been independently checked: - stale/lost PS input state - shader cache identity mismatch - wrong linked-program pairing - dead fragment ATTR0 - hidden EXP_PARAM inside the captured producer - secondary producer entry/branch range - ordinary captured SPI/GE/VGT/PA routing - public PS5 Vulkan/AGC evidence currently available The request contains exactly two linked graphics programs and the producer above is the producer serialized with this fragment shader. No synthetic varying or interface pruning has been implemented. ## Current failure AnyPS5 correctly rejects the Vulkan pipeline because the fragment module requires Location 0 while the translated producer exposes no corresponding parameter output. The unresolved question is: **What gfx1013/AGC mechanism supplies normal fragment PARAM0 for an NGG passthrough draw with NO_PC_EXPORT=1 and no executed EXP_PARAM?** Possibilities include: - an additional AGC shader part/linkage mechanism not represented in the current request model - implicit parameter-cache generation - gfx1013-specific register semantics - an incorrect interpretation of the fragment interpolation ISA/state - undocumented hardware behavior ## Public evidence Public PS5 Vulkan / AGC projects were inspected, but no published artifact contains the required combination of: - NGG passthrough - NO_PC_EXPORT=1 - no EXP_PARAM - live normal fragment PARAM0 - final SPI/GE/VGT/PA state Therefore no hardware behavior has been guessed. ## Alternative verification path LLVM supports gfx1013 independently, and AMD BC-250 / Cyan Skillfish hardware provides a possible gfx1013 test platform. An independent LLVM gfx1013 ISA decode and gfx1013-specific Mesa/AMDGPU audit would be useful before resorting to native PS5 evidence. ## Expected behavior Do not bypass Vulkan interface validation. The desired fix is to identify and generically model the guest mechanism that supplies PARAM0, if one exists. ## Safety / source material Hashes, register values and derived instruction summaries can be published. Full proprietary game shader binaries are intentionally not attached.
guimsolutions commented 2026-10-06 12:19:55 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by guimsolutions on 2026-10-06T12:19:55Z.


Update: the independent gfx1013 ISA validation is now complete.

The exact hash-identified binaries were disassembled independently with:

  • LLVM 18.1.3
  • AMDGPU backend (amdgcn)
  • -mcpu=gfx1013

This was run in an ephemeral Ubuntu 24.04 container and does not use
AnyPS5's decoder.

LLVM independently confirms the producer:

hash: c94f39b2bd051319

EXP_PRIM
EXP_POS0
S_ENDPGM
no EXP_PARAM / no export target 0x20..0x3f

and the consumer:

hash: 1adb03e7b5cae97d

V_INTERP_P1/P2
ATTR0.x / ATTR0.y / ATTR0.w

The comparison therefore preserves the original contradiction with two
independent gfx1013 decoders.

We also corrected one earlier architectural assumption:

  • gfx1013 is ISA 10.1.3 / GFX10, not gfx1030/GFX10.3
  • gfx1013 SPI_VS_OUT_CONFIG has no PRIM_EXPORT_COUNT field
  • 0x80 still decodes as:
    VS_EXPORT_COUNT = 0
    NO_PC_EXPORT = 1

VGT_SHADER_STAGES_EN=0x02002000 still identifies NGG passthrough, and
SPI_PS_INPUT_CNTL[0]=0 still selects ordinary parameter slot 0 rather
than the default-value route.

So an AnyPS5 ISA decoding error is no longer a plausible explanation.

The remaining unknown is specifically the gfx1013 graphics-front-end
mechanism that makes PARAM0 valid between the NGG producer and the PS.

A native gfx1013 graphics/raster observation (for example BC-250 /
Cyan Skillfish) is now the remaining causal experiment. PS5 hardware
specifically is not required.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6016087912 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/868#issuecomment-6016087912). Originally posted by [guimsolutions](https://github.com/guimsolutions) on 2026-10-06T12:19:55Z. --- Update: the independent gfx1013 ISA validation is now complete. The exact hash-identified binaries were disassembled independently with: - LLVM 18.1.3 - AMDGPU backend (`amdgcn`) - `-mcpu=gfx1013` This was run in an ephemeral Ubuntu 24.04 container and does not use AnyPS5's decoder. LLVM independently confirms the producer: hash: c94f39b2bd051319 EXP_PRIM EXP_POS0 S_ENDPGM no EXP_PARAM / no export target 0x20..0x3f and the consumer: hash: 1adb03e7b5cae97d V_INTERP_P1/P2 ATTR0.x / ATTR0.y / ATTR0.w The comparison therefore preserves the original contradiction with two independent gfx1013 decoders. We also corrected one earlier architectural assumption: - gfx1013 is ISA 10.1.3 / GFX10, not gfx1030/GFX10.3 - gfx1013 SPI_VS_OUT_CONFIG has no PRIM_EXPORT_COUNT field - 0x80 still decodes as: VS_EXPORT_COUNT = 0 NO_PC_EXPORT = 1 VGT_SHADER_STAGES_EN=0x02002000 still identifies NGG passthrough, and SPI_PS_INPUT_CNTL[0]=0 still selects ordinary parameter slot 0 rather than the default-value route. So an AnyPS5 ISA decoding error is no longer a plausible explanation. The remaining unknown is specifically the gfx1013 graphics-front-end mechanism that makes PARAM0 valid between the NGG producer and the PS. A native gfx1013 graphics/raster observation (for example BC-250 / Cyan Skillfish) is now the remaining causal experiment. PS5 hardware specifically is not required.
oneandonlydean commented 2026-10-11 23:25:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:25:20Z.


Closing: #3523 reads zero for a pixel input whose parameter the vertex stage does not export, which is this case. Reopen with the log if PPSA03541 still stops there on current main.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115083390 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/868#issuecomment-6115083390). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-11T23:25:20Z. --- Closing: #3523 reads zero for a pixel input whose parameter the vertex stage does not export, which is this case. Reopen with the log if PPSA03541 still stops there on current main.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#868
No description provided.