Repository navigation
Conversation
|
Rebased on Fedora 44 Release: |
57b5d0c to
202d5f5
Compare
adriadam10
left a comment
There was a problem hiding this comment.
Thanks for the work. This conflicts with main and the conflict is not only mechanical:
core/shader/recompiler/Optimization/src/SrtWalker/SrtDescriptorEvaluation.cpp:51(main):EvaluateRuntimeSourcesImplnow takesstd::vector<SrtReadPoison>* poisonandstd::uint32_t* nullRootReads(#2989, reads through a null user-data pointer return zero words).SrtExecutionPlan::Evaluateproduces neither, so the compiled path would diverge from the generic one on those cases.ResourceMaterializer.cpp(main) now computesplan.guardedSrtSlotsnext to where this PR setsplan.executionPlan; the compiled plan has to respect guarded slots too, or fall back when any is set.core/libs/prx/libSceAgcDriver/CMakeLists.txt: adjacency withagc_shared_write_testsand the testforeachlist; just a rebase.
What would fix it: rebase on current main, port the plan to the new signature (poison, null-root reads, guarded slots) or make CompileSrtExecutionPlan return null when they apply, extend tests/SrtExecution.cpp with a null-root and a poisoned-read row compared against the generic evaluator, and re-run the paired benchmark on top of main (capture now runs against the prepared invocation since #639, so the 18 sources / 72 reads graph may have changed). Also register agc_srt_execution_tests via the same loop as the other tests, as it is now, but check it still lands in ctest after the rebase.
Compile supported immutable descriptor expressions into a compact indexed operation list. Evaluate changing user data and guest memory without walking the IR or rebuilding hash and cycle tables on every draw. Preserve read ordering and dependency traces; retain the generic evaluator for specialization, conditional flow, cycles and unsupported operations. Add differential fixtures for values, arithmetic boundaries, read failures, nested pointers, inactive sources and generic fallback, plus opt-in captured-input verification. Six suites pass. An alternating warm fixture improves descriptor evaluation from about 5.8-6.2 us to 0.6-0.7 us. Skyrim menu and saved Helgen gameplay complete over 1.8 million compiled evaluations against the generic walk with zero mismatches and no Vulkan validation errors. Written with AI assistance.
Use the IR operand schema when validating memory operations. Scalar address loads carry four operands; the two-operand restriction unnecessarily sent their descriptor plans through generic evaluation. Validate fixture operand shapes and require a translated scalar-address shader to compile its SRT plan. Differential tests, captured-graph replay and verified Helgen gameplay pass. Written with AI assistance.
202d5f5 to
5380bb9
Compare
|
@adriadam10 Updated to
Fedora 44 Release: SRT tests pass normally, with verification, and with compiled evaluation disabled. Shader-memory, driver, graphics, PM4, frontend-pair and read-patching checks pass with compiled-result verification; contribution checks pass. Replaced the stale benchmark in the description with fresh paired synthetic measurements. Prepared-invocation capture (0 descriptor sources / 1 read) measured 0.214–0.220 µs generic versus 0.0949–0.0952 µs compiled across ABBA runs with matching checksums. The 8-source/72-read evaluator fixtures and reproduction commands are also in the description. Ready for another correctness review. A fresh title-derived capture, title-level performance and Windows runtime validation remain outstanding; these synthetic timings do not establish an FPS improvement. |
|
adriadam10's review of 10-13 is still open on this head: |
What
Compile supported immutable SRT expressions into indexed operations, so each draw evaluates current user data and guest memory without rebuilding an IR walk. Preserve descriptor values, flattened slots, active sources, read order and dependency traces.
Rebased on main
d146ec1b6. Null user-data roots now return zero words and preservenullRootReads, without guest reads or dependency records. Scalar-buffer reads outside the descriptor bounds return zero, matching current main. Successful compiled evaluations clear stale poison output. Plans with guarded slots or memory-derived handles use the generic evaluator, preserving inaccessible-read poison and descriptor-zeroing behavior. Conditional flow, specialization memory, cycles and unsupported operations also use the generic evaluator.APS5_VERIFY_COMPILED_SRT=1compares null-root and poison outputs in addition to values and traces, and forwards accessibility probes with their original callback context.APS5_NO_COMPILED_SRT=1disables compiled evaluation for comparisons.Supersedes the SRT evaluation portion of #1193; its other shader-memory changes remain separate. Depends on: none.
Tested
Fedora 44, GCC 16.2.1, Release:
agc_srt_execution_tests,agc_shader_memory_tests,agc_driver_tests,agc_driver_graphics_testsandagc_driver_pm4_tests.agc_srt_executionpasses normally, with compiled-result verification, and with compiled evaluation disabled. CTest registers it through the existing test loop with a 30-second timeout.PrepareShader, instantiated throughPreparedShaderInvocation, and captured through that invocation. Its direct root read selects a compiled plan; its null-root capture reports one null read and touches no guest memory. The existing guarded translated-shader test requires generic fallback.APS5_VERIFY_COMPILED_SRT=1(RX 6600 RADV for Vulkan tests).git diff --checkpass.Fresh measurements on this base, identical Release binary and flags, warm-up excluded:
Prepared-capture checksums match across all four ABBA runs. Reproduce with
agc_srt_execution_tests --prepared-benchmark, alternatingAPS5_NO_COMPILED_SRT=1and the default;--benchmarkruns the paired evaluator fixtures.These are synthetic evaluator/capture measurements, not title FPS. They replace the stale measurements against #1193 in the previous description. A fresh title-derived capture, title-level performance and Windows runtime validation remain outstanding; guarded nested-read plans receive no compiled-path speedup.
Checklist