Skip to content

fix(agc): preserve requests when draw resource capture fails - #11

Draft
p3n1cillin wants to merge 1 commit into
mainfrom
codex/failed-draw-capture
Draft

p3n1cillin wants to merge 1 commit into
mainfrom
codex/failed-draw-capture

Conversation

@p3n1cillin

Copy link
Copy Markdown
Owner

What

When ShaderMemory::Capture fails during a draw stage, the existing path throws before retaining its read regions or dumping the stage request. The presentation failure lacks the shader address, and APS5_DUMP_SHADERS does not preserve the request needed for offline reproduction.

On an opt-in failed capture, serialize a copied graphics request with the memory regions read so far and log its shader address, stage, region count and request filename. Keep the region vector alive through serialization. Dump failures are reported and the original exception is rethrown; execution behavior and successful captures are unchanged.

Tested

Windows 11, GCC 15.2, Release Ninja, RTX 5070/NVIDIA 617.42:

  • Clean main-based driver and affected test targets built. agc_driver, agc_shader_memory, agc_shader_disk_cache, agc_driver_graphics: 4/4 passed, 8.54s.
  • The ASTRO BOT integration branch built and runtime libraries were patched. Same four tests: 4/4 passed, 8.06s.
  • A private game run is in progress to validate request retention at the graphics failure. No proprietary shader or capture is included here.
  • tools/check_conventions.py --base origin/main passed.

This is a diagnostic follow-up to the graphics failure reached after #10. The diagnostic patch itself is based on current main d70b899 and has no dependency on that shader change. AI-assisted: yes.

Checklist

  • Based on current main; related draw-capture proposals inspected, no matching diagnostic change found
  • One topic; new follow-up PR
  • No added code comments, reports, screenshots, assets or new dependencies
  • Original failure is preserved; no skipped GPU command or substituted result
  • Generic draw-stage diagnostic behavior
  • Depends on: none
  • AI-assisted: yes

@p3n1cillin

Copy link
Copy Markdown
Owner Author

The integration game run at 38102bb exercised the new failure path successfully. It retained a fragment-stage request with 612 code words, 32 user-data words, two linked programs and four captured memory regions. Offline replay with the current integration tool reproduces the same image-interface error at firstUsePc 760. The original presentation failure and SIGABRT were preserved, and the monitor stopped the exact game process. No game capture or shader content is included here.

The failing access is full-DMASK, 32-bit image_sample_lz with DIM2D against a 1x1 non-array 1D descriptor: format 71 (RGBA16_FLOAT), identity selectors, level zero and SW_64KB_R_X. It is outside the ordinary R32_FLOAT/RGBA32_FLOAT load/store forms measured and admitted by #10. Its sampling and tiling behavior need native measurement before adding compatibility.

Both diagnostic runs ended before a completed presentation; no gameplay or FPS result is available. All runtime processes from these runs have ended. The recorded heap-capacity registration warnings also existed before #10; old logs show the same programs exceeding the four-descriptor storage heap.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant