Skip to content

CI: perf/agc-device-local-mirrors - #1

Closed
EagleBearerYS wants to merge 1 commit into
mainfrom
perf/agc-device-local-mirrors
Closed

EagleBearerYS wants to merge 1 commit into
mainfrom
perf/agc-device-local-mirrors

Conversation

@EagleBearerYS

Copy link
Copy Markdown
Owner

Fork-internal PR, only to run the Build workflow (Windows and Linux, full test suite) before an upstream PR. Not for review.

Address-based shaders map every readable registered GPU range. Past
the host import budget (APS5_HOST_IMPORT_MIB) each further releasable
range is served by a heap mirror: a persistent copy that the CPU fills
and refreshes block by block and the GPU reads. Heap mirrors were
Buffers with the default host properties, which prefer host-cached
memory, so they landed in the system-memory heap that the imports
already fill. On a 16 GB PC that heap's VK_EXT_memory_budget budget is
7,237 MiB, and the imports alone can take 6 GiB of it. Resident Evil
Village (PPSA01556) needed 1.2-1.4 GiB of heap mirrors in its first
scene load, and pool allocations then failed with
VK_ERROR_OUT_OF_DEVICE_MEMORY.

A heap mirror is now placed in DEVICE_LOCAL | HOST_VISIBLE |
HOST_COHERENT memory when the first memory type with those flags lies
in the largest device-local heap (resizable BAR, or a unified heap).
That heap's budget must keep APS5_DEVICE_MIRROR_RESERVE_MIB (default
1024) free beyond the mirror, which leaves room for textures.
Otherwise the mirror stays in host memory as before. The CPU writes a
heap mirror and reads back only the ranges a build writes through
descriptors (takeHeapReferences, WriteBack). Image mirrors keep host
memory: a writable one's shadow is read back whole when it is made.
APS5_NO_DEVICE_MIRRORS=1 restores host memory for heap mirrors too.
@EagleBearerYS

Copy link
Copy Markdown
Owner Author

Closing: the change is parked (boykopovar/AnyPS5 boykopovar#4446 covers it); the branch stays.

EagleBearerYS pushed a commit that referenced this pull request Oct 14, 2026
fix(libkernel): convert local time with the host time zone
EagleBearerYS added a commit that referenced this pull request Oct 15, 2026
… heap runs"

Local fast-tree change: cut #1 (08f7bcc) showed no gain on matched frames in Village and one unexplained load hang, so the explorer trees leave it out for now.
EagleBearerYS added a commit that referenced this pull request Oct 15, 2026
… heap runs"

Local fast-tree change: cut #1 (08f7bcc) showed no gain on matched frames in Village and one unexplained load hang, so the explorer trees leave it out for now.
EagleBearerYS pushed a commit that referenced this pull request Oct 18, 2026
…stages

Since boykopovar#3878 every vertex program that exports a position also writes
gl_ClipDistance for the all-zero position distance. The tessellation
stages generated for rect lists declared only gl_Position in gl_in, so
their input interface no longer matched the vertex outputs; on MoltenVK
the control stage then reads all-zero positions and every rect-list
draw stops with "rect-list requires finite nondegenerate axis-aligned
positions" (reported in #1).

The control and evaluation stages now declare the vertex program's
gl_ClipDistance array in their per-vertex blocks and forward it. The
generated fourth corner gets the clip distances interpolated with the
same weights as its position, so the all-zero position clip keeps
working for rect lists. Validation accepts gl_ClipDistance as a
tessellation input and as a tessellation-control output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXdkh9PHBCPqGcGQPeikAe
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