Repository navigation
feat(kyty): record the graphics stages' float modes in the pipeline manifest - #281
Open
Celegans12 wants to merge 1 commit into
Open
Celegans12 wants to merge 1 commit into
Celegans12 wants to merge 1 commit into
Conversation
…anifest The pipeline manifest kept the compute FLOAT_MODE but not the SPI_SHADER_PGM_RSRC1 fields of draws. Each graphics pipeline line now carries, per stage, FLOAT_MODE, IEEE and DX10_CLAMP as fv/fh/fd/fp (<FLOAT_MODE hex>.<IEEE>.<DX10_CLAMP>), read from RSRC1_GS for vertex, mesh and evaluation stages, RSRC1_HS for local and hull stages and RSRC1_PS for pixel stages. Lines without them still load, and older readers ignore the new keys, so the format stays v1. Pipelines are now recorded when a draw first uses them, not only when they are created, so pipelines taken from the store or made by the manifest warm-up get their float modes too; one that a later draw uses with other modes is counted in the "wrote" log line. tools/kyty_manifest_float_modes.py counts the values per title and stage from .kpm files.
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.
What
This is #237: the pipeline manifest kept the compute
FLOAT_MODE, but not thePGM_RSRC1float fields of draws, so the float-mode survey on #217 couldn't see the graphics stages.Each graphics pipeline line now carries, per stage,
FLOAT_MODE,IEEEandDX10_CLAMPasfv,fh,fdandfp(<FLOAT_MODE hex>.<IEEE>.<DX10_CLAMP>, e.g.fp=c0.0.1). Vertex, mesh and evaluation stages readSPI_SHADER_PGM_RSRC1_GS, local and hull stagesSPI_SHADER_PGM_RSRC1_HS, pixel stagesSPI_SHADER_PGM_RSRC1_PS, which are the registers those stages run with on this hardware. The tree has no handler for the VS, ES and LSPGM_RSRC1registers, so there is nothing to read for them. I kept the format at v1: lines without the new keys load with the modes unrecorded, and older builds skip keys they don't know.Until now a pipeline was recorded only when it was created, so pipelines that came from the store or from the manifest warm-up were never seen again in a session.
GetGraphicsPipelinenow records a pipeline when a draw first uses it, and again only if a later draw uses it with other modes, so a warm session rewrites the modes of every pipeline it draws. A pipeline whose modules aren't in the manifest yet is retried once more modules are recorded. The "wrote" log line counts pipelines with modes, pipelines drawn with more than one set of modes, and drawn pipelines whose modules the manifest doesn't list.tools/kyty_manifest_float_modes.pycounts the values per title and stage from.kpmfiles or folders (--jsontoo), along with the compute modules'FLOAT_MODE.No other open PR touches the manifest code. #181 edits another function in
pipelineCache.cpp, and #181 and #220 add tests elsewhere in the shim test list.Tested
Windows 11, kyty_gpu DLL built with llvm-mingw 20261104 (Yōtei PGO profile), host side with MinGW-w64 GCC 15.2.0:
libs,relinkerand the shim test targets build, andcheck_kyty_settings, the newkyty_manifest_float_modestool test and the 13kyty_shim_*tests that link in the DLL build pass. In a plain (non-DLL) Kyty build with clang 21.1.8, the newkyty_shim_manifest_float_modespasses (write and read back, older lines, bad values, stage-to-register mapping), and so dokyty_shim_merged_hull,kyty_shim_merged_hull_draw,kyty_shim_shader_store_encodeandkyty_shim_ahead_revalidation. The new test needs this change, so it doesn't build onAnyKytyalone.check_conventionspasses.Ghost of Yōtei (PPSA26344 v1.008), 300 s at the Teshio save on a warm cache with
KYTY_*defaults: the manifest got the modes of the 1,196 pipelines drawn there, with none left unlinked and none drawn with two sets of modes. The counts are on #237. 0 errors, usual frame rate.Checklist
AnyKyty(7de61e3451c); no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)