graphics: prune unused mesh outputs #741
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!741
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/741/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@carbonimax on GitHub · 2026-09-20 21:01 UTC · original
carbonimax:codex/macos-mesh-output-pruning→main· +84 −6 · 5 files · 1 commits · closed without mergingSummary
Motivation
A mesh pipeline used by the game declared 36,864 bytes of mesh output, exceeding the 32,768-byte MoltenVK limit. The pixel shader does not consume three of those parameter locations. This keeps the original 190 vertices and 152 primitives while removing only unused SPIR-V outputs.
Validation
shader_cfg_testsshader_cfg_testsexit 0git diff --checkRuntime validation past the affected frame is intentionally pending this PR build.
Depends on #643; its commits remain visible here until that PR merges.
@coderabbitai[bot] on GitHub · 2026-09-20 21:13 UTC · original · edited 2026-10-16 06:45 UTC
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
f643023f-87c7-4133-8e92-f45c67f20962📥 Commits
Reviewing files that changed from the base of the PR and between b6b7da27b28851a88d96ec7c468a150ca0813644 and 38a4ec5838485da052a5735eb9a7cae7d1e105fb.
📒 Files selected for processing (17)
src/graphics/guest_gpu/graphicsRun.cppsrc/graphics/host_gpu/renderer/pipeline/descriptors.cppsrc/graphics/host_gpu/renderer/pipeline/pipelineCache.cppsrc/graphics/host_gpu/renderer/render.hsrc/graphics/host_gpu/renderer/renderCompute.cppsrc/graphics/host_gpu/renderer/renderDraw.cppsrc/graphics/presentation/window/vulkanWindow.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterInternal.hsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterMemory.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterModule.cppsrc/graphics/shader/recompiler/ir/ShaderIR.hsrc/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cppsrc/graphics/shader/recompiler/ir/passes/ResourceTracking.cppsrc/graphics/shader/shader.cppsrc/graphics/shader/shaderPixelParameter.cpptests/ShaderRecompilerComputeTests.cpptests/shaderCfgTests.cpp🚧 Files skipped from review as they are similar to previous changes (9)
Files not reviewed due to moderation or processing errors (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
The change adds validated pixel-parameter plans with locations and aliases. Graphics pipeline setup tracks single-sample state and links vertex plans to pixel inputs for coupled pipelines. SPIR-V emission supports aliased outputs, single-sample centroid loads, and mesh-output pruning. Static shader keys include the new plan and sampling state. Tests cover these behaviors and add a centroid-only mode.
Suggested reviewers:
nmzikPriority: ➖ Normal
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
38a4eThe previously reported mesh-output pruning risk does not affect the inspected draw path. No actionable merge-blocking issue remains after normal checks.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Full details: Docstring Coverage
Explanation
Docstring coverage is 4.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 254 functions across 42 files. (2 skipped: 2 too large.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.@coderabbitai[bot] on GitHub · 2026-09-22 09:56 UTC · original · reviewed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
77e2ac67-ebb6-4e50-b497-a548cd8ca79f📥 Commits
Reviewing files that changed from the base of the PR and between 23c9ae8abc4e0395dc6b4f3062378206817abc77 and fea7f91dc255337e09d599282b366f42f66caa65.
📒 Files selected for processing (8)
src/graphics/host_gpu/renderer/pipeline/pipelineCache.cppsrc/graphics/host_gpu/renderer/pipeline/pipelineCache.hsrc/graphics/host_gpu/renderer/renderDraw.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterMesh.cppsrc/graphics/shader/recompiler/ir/ShaderIR.hsrc/graphics/shader/shader.cppsrc/graphics/shader/shader.htests/shaderCfgTests.cppIncluded review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
@carbonimax on GitHub · 2026-10-01 16:59 UTC · original
The outside-diff review found a real bug: MeshOutputIsConsumed tested parameter_plan.valid with the wrong polarity. The updated branch keeps the conservative fallback for invalid plans and permits pruning for valid plans. The regression now sets a valid plan for the pruning case and an invalid plan for the fallback case.
Main has also been merged while preserving its updated render-target mask and shader APIs. Host/build results for the updated head are recorded below; the original GPU observations remain historical.
@carbonimax on GitHub · 2026-10-01 17:39 UTC · original
CI update: Windows and Linux builds pass. The macOS job builds successfully, then fails in the unchanged
page_managertest (fixed low mach_vm_allocate failed), with 12/13 tests passing. Local x86_64 Release build and shader_cfg_tests pass for this head. The macOS job on main44798085also fails inpage_manageron fixed low mach_vm_allocate. These PRs do not modify the reservation tests or their implementation.I tried rerunning the failed job, but GitHub requires repository admin rights. Could a maintainer rerun the failed macOS job? No reservation-code workaround is included in this PR.
@carbonimax on GitHub · 2026-10-01 19:58 UTC · original
The macOS CI reservation failure is now addressed by a test-only fix. The tests no longer assume that the low address 0x200010000 is free: Mach chooses available memory while preserving the offset within the 4 MiB tracker region and checking that the allocation remains in the valid low guest range. The extended-range test keeps its fixed address.
A regression case deliberately occupies the preferred address, verifies relocation without overwriting that mapping, and retains the existing protection and region-boundary assertions. Both memory_tracker and page_manager fail with the fixed-address allocator and pass with the corrected allocator (2/2), on the same tests. The tested memory sources and helper are identical across #633, #643 and #741. No emulator runtime or submission protocol change is included.
The updated head triggers a fresh CI run; local success is not being reported as a GitHub CI result.
Pull request closed