Repository navigation
Conversation
…he stage has no push constants The draw builds a CompiledShader with offset 0 when the shader has no push constants, but the registration prebuild always passed the fixed fragment push offset. The offset is part of the fragment library key, so the prebuilt part never matched and the draw built its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he draw Expose PrebuildStageLibrary and check that after the registration prebuild of a fragment shader without push constants, the draw-side lookup with offset 0 builds no further fragment library. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s use Graphics pipeline library fragment parts are keyed on the depth and stencil attachment formats, but the registration prebuild only built colour-only parts. A draw now records the format pair of each fragment part it builds, and PrebuildGraphicsLibraries prebuilds once more for every recorded pair. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Draw a fragment shader on a D32S8 target, prebuild a second one, and require that the second shader draws without building a fragment library. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pipodi
force-pushed
the
perf/prebuild-draw-depth-format-parts-ybest
branch
from
October 30, 2026 10:30
6e83d3a to
c6e47f9
Compare
Owner
|
@Pipodi thanks, this is in On our side the If you open the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two changes to the background fragment-library prebuild in
yotei/best. Before them, a prebuilt fragment library never matched a draw whose shader has no push constants or whose target has a depth or stencil attachment, so that draw still built its own library on the draw path.ShaderRegistry.cpp). The draw builds a stage with no push constants with push offset 0. The registration prebuild always passed the fixed fragment push offset. The offset is part of the fragment library key, so the prebuilt library never matched and the draw built another one. The prebuild now uses offset 0 when the stage has no push constants.PipelineLibrary,VulkanDevice.cpp). Fragment libraries are keyed on the depth and stencil attachment formats, but the prebuild only built colour-only libraries. A draw now records the format pair of each fragment library it builds, andPrebuildGraphicsLibrariesbuilds once more for every recorded pair.The debt entry "Prebuilt pipeline libraries" in
docs/dev/debt/libSceAgcDriver.mdis extended:Tests
agc_driver_prepared_graphicsgains two cases:yotei/best358458a and on this branch (rebased 2026-10-30): the same 12 failures on both (direct_image_refusal,gpu_buffer_format,sampled_cache_budget,sampled_cache_budget_without_storage_image_multisample,sampled_cache_later_use_refusal,draw_unsupported_buffer_type_draw_pipeline,draw_shader_failure_materialization,draw_shader_failure_materialization_correlation_disabled,depth_plane_partial_store,host_import_cut_lifetime,prx_thread_local_destructors,public_headers). The timings below were measured before the rebase, on 703b139.-R "prepared_graphics|prepared_shaders|depth",REQUIRE_VULKAN,NO_SHADER_CACHE): the same 4VUID-VkWriteDescriptorSet-descriptorType-00337lines on the base and on the change, all inside the already failingsample_order_recipe_depth_locations.Ghost of Yōtei A/B (cold)
[pipecache]misses, whole runTrace summary lines (APS5_TRACE_FRAMES=620:720)
base 703b139: frames 620:720 from present 620: 720 presents, frame p50 507.6 / p90 1565.3 / p99 34542.7 / max 738856.4 ms, GPU busy 440.2 ms per present
NVIDIA GeForce RTX 4090, NVIDIA 617.42, Windows 10.0.26200, 3840x2160, commit 703b139, dropped: yes
this PR 6e83d3a (built as f2eef06385, the same tree; only the commit messages changed since): frames 620:720 from present 620: 720 presents, frame p50 468.9 / p90 1509.3 / p99 33378.2 / max 726692.2 ms, GPU busy 491.1 ms per present
NVIDIA GeForce RTX 4090, NVIDIA 617.42, Windows 10.0.26200, 3840x2160, commit f2eef0638524, dropped: yes
Environment, the same in both arms:
APS5_ASYNC_LANE=51 APS5_BINDLESS_IMAGES=1 APS5_BINDLESS_LAZY=1 APS5_DEFER_REFRESH_FLUSH=1 APS5_GPU_CHECKPOINTS=1 APS5_HOST_IMPORT_MIB=16384 APS5_NO_ADDRESS_DRAW_REUSE=1 APS5_NO_DRAW_AHEAD=1 APS5_NO_PIPELINE_JOURNAL=1 APS5_NO_RESULT_MEMO=1 APS5_NO_SNAPSHOT_CHECK=1 APS5_PIPELINE_DISPATCH=1 APS5_PIPELINE_INDIRECT=1 APS5_PREBUILD_THREADS=2 APS5_PREPARED_SPIRV_MIB=6144 APS5_PROFILE_DRAW=1 APS5_RESOURCE_CACHE_ENTRIES=1024 APS5_SPANNED_WAVE=1 APS5_STAGING_DIFF=1 APS5_STAGING_POOL_MIB=2048 APS5_TRACE_EVENTS=1048576 APS5_TRACE_FRAMES=620:720Trace digest, frames 620:720 (ms per frame)
DrawPipeline.commitDrawPipeline.drain.packetVulkan.ComputePipelineShader.PrepareArtifactVulkan.GraphicsPipelinePrebuild(2 threads)The slowest frames in both runs are the compute-giant wall: three builds of
0x800014e300(~1.42M words, ~425–433 s together), plus0x8000173b00and0x807b30a100at ~160 s each. This PR doesn't touch them.Main
Main 3d2b7c0 has the same two gaps (
ShaderRegistry.cpp:1334passes the fixed push offset, and there is no depth-format prebuild). The same change rebased on main is ready asperf/prebuild-draw-depth-format-parts(08c6ea862f). On main it merges cleanly with boykopovar#9563 and boykopovar#10388. Following the plan in discussion boykopovar#675, I can open it as a standalone PR on main whenever you want it in a stack.🤖 Generated with Claude Code