Repository navigation
perf(shader): don't wait on GPU-pending branch words that only select read-only buffers - #7891
Conversation
… read-only buffers A resource capture evaluated every branch condition of the SRT walk with reads that wait for pending GPU writes, so a condition on a word that a queued dispatch still writes stalled the capture until the GPU caught up. A condition whose successors reach the same resource blocks is no longer evaluated. A condition read that would wait for a GPU write is refused, and both successors are bound, when the blocks it chooses between hold no images and no written or atomic buffers and the plan has no BDA writes; every other condition still waits. A walk that fails without waiting is redone with waiting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This pull request is labeled |
|
Raw
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":172,"ms":10361.143},"interval_start_s":95.344,"interval_end_s":105.705,"presents":31,"frame_ms":{"p50":321.377,"p90":377.753,"p99":417.499,"max":417.499},"gpu_busy_ms_per_present":240.577,"worker_busy_pct":{"queue worker 0x0":99.456,"queue worker 0x20":78.966},"top_phases_ms_per_frame":{"Driver.Packet":594.583,"Driver.Packet.dispatch":201.652,"Driver.Packet.draw":173.472,"Driver.Draw":173.054,"Driver.Dispatch":163.540,"Driver.Draw.shader_compile_and_link":124.529,"Shader.DrawStage":120.727,"Shader.DrawStage.capture_resources":108.819},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":203,"ms":10222.429},"interval_start_s":105.705,"interval_end_s":115.927,"presents":30,"frame_ms":{"p50":325.887,"p90":385.130,"p99":398.786,"max":398.786},"gpu_busy_ms_per_present":240.480,"worker_busy_pct":{"queue worker 0x0":99.470,"queue worker 0x20":79.158},"top_phases_ms_per_frame":{"Driver.Packet":606.855,"Driver.Packet.dispatch":208.142,"Driver.Packet.draw":173.812,"Driver.Draw":173.388,"Driver.Dispatch":169.287,"Driver.Draw.shader_compile_and_link":126.003,"Shader.DrawStage":122.138,"Shader.DrawStage.capture_resources":110.286},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":233,"ms":10227.634},"interval_start_s":115.927,"interval_end_s":126.155,"presents":30,"frame_ms":{"p50":329.135,"p90":381.714,"p99":418.047,"max":418.047},"gpu_busy_ms_per_present":241.731,"worker_busy_pct":{"queue worker 0x0":99.467,"queue worker 0x20":78.815},"top_phases_ms_per_frame":{"Driver.Packet":606.272,"Driver.Packet.dispatch":205.180,"Driver.Packet.draw":174.326,"Driver.Draw":173.907,"Driver.Dispatch":165.952,"Driver.Draw.shader_compile_and_link":128.474,"Shader.DrawStage":124.647,"Shader.DrawStage.capture_resources":112.762},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":263,"ms":10521.716},"interval_start_s":126.155,"interval_end_s":136.677,"presents":29,"frame_ms":{"p50":321.053,"p90":390.833,"p99":1312.090,"max":1312.090},"gpu_busy_ms_per_present":239.329,"worker_busy_pct":{"queue worker 0x0":99.505,"queue worker 0x20":80.993},"top_phases_ms_per_frame":{"Driver.Packet":652.533,"Driver.Packet.dispatch":203.259,"Driver.Packet.draw":195.889,"Driver.Draw":195.474,"Driver.Dispatch":165.396,"Driver.Draw.shader_compile_and_link":130.672,"Driver.Packet.memory_wait":129.442,"Shader.DrawStage":126.833},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":292,"ms":10117.709},"interval_start_s":136.677,"interval_end_s":146.794,"presents":22,"frame_ms":{"p50":327.450,"p90":718.560,"p99":2059.218,"max":2059.218},"gpu_busy_ms_per_present":333.901,"worker_busy_pct":{"queue worker 0x0":99.610,"queue worker 0x20":81.963},"top_phases_ms_per_frame":{"Driver.Packet":833.245,"Driver.Packet.dispatch":281.412,"Driver.Dispatch":241.928,"Driver.Packet.draw":241.584,"Driver.Draw":241.155,"Driver.Draw.shader_compile_and_link":173.424,"Shader.DrawStage":169.531,"Driver.Packet.memory_wait":165.169},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":180,"ms":10304.757},"interval_start_s":97.151,"interval_end_s":107.456,"presents":31,"frame_ms":{"p50":323.520,"p90":378.092,"p99":394.011,"max":394.011},"gpu_busy_ms_per_present":239.873,"worker_busy_pct":{"queue worker 0x0":99.442,"queue worker 0x20":79.429},"top_phases_ms_per_frame":{"Driver.Packet":593.029,"Driver.Packet.dispatch":200.304,"Driver.Packet.draw":175.543,"Driver.Draw":175.115,"Driver.Dispatch":162.771,"Driver.Draw.shader_compile_and_link":129.831,"Shader.DrawStage":126.023,"Shader.DrawStage.capture_resources":114.033},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":211,"ms":10296.895},"interval_start_s":107.456,"interval_end_s":117.753,"presents":30,"frame_ms":{"p50":332.659,"p90":396.147,"p99":410.646,"max":410.646},"gpu_busy_ms_per_present":249.559,"worker_busy_pct":{"queue worker 0x0":99.445,"queue worker 0x20":79.392},"top_phases_ms_per_frame":{"Driver.Packet":612.120,"Driver.Packet.dispatch":208.945,"Driver.Packet.draw":177.392,"Driver.Draw":176.964,"Driver.Dispatch":169.228,"Driver.Draw.shader_compile_and_link":127.897,"Shader.DrawStage":124.051,"Shader.DrawStage.capture_resources":112.126},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":241,"ms":10301.473},"interval_start_s":117.753,"interval_end_s":128.054,"presents":31,"frame_ms":{"p50":320.415,"p90":378.110,"p99":406.711,"max":406.711},"gpu_busy_ms_per_present":233.692,"worker_busy_pct":{"queue worker 0x0":99.433,"queue worker 0x20":80.008},"top_phases_ms_per_frame":{"Driver.Packet":594.797,"Driver.Packet.dispatch":203.123,"Driver.Packet.draw":172.987,"Driver.Draw":172.572,"Driver.Dispatch":165.716,"Driver.Draw.shader_compile_and_link":123.544,"Shader.DrawStage":119.765,"Shader.DrawStage.capture_resources":107.905},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":272,"ms":10271.213},"interval_start_s":128.054,"interval_end_s":138.326,"presents":22,"frame_ms":{"p50":322.137,"p90":714.764,"p99":2029.634,"max":2029.634},"gpu_busy_ms_per_present":239.744,"worker_busy_pct":{"queue worker 0x0":99.599,"queue worker 0x20":84.160},"top_phases_ms_per_frame":{"Driver.Packet":854.931,"Driver.Packet.dispatch":256.277,"Driver.Packet.draw":252.029,"Driver.Draw":251.606,"Driver.Dispatch":215.891,"Driver.Packet.memory_wait":185.896,"Driver.Draw.shader_compile_and_link":155.459,"Shader.DrawStage":151.578},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":false,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":294,"ms":10227.457},"interval_start_s":138.326,"interval_end_s":148.553,"presents":29,"frame_ms":{"p50":324.315,"p90":402.991,"p99":952.994,"max":952.994},"gpu_busy_ms_per_present":311.509,"worker_busy_pct":{"queue worker 0x0":99.498,"queue worker 0x20":80.261},"top_phases_ms_per_frame":{"Driver.Packet":630.443,"Driver.Packet.dispatch":227.232,"Driver.Packet.draw":193.128,"Driver.Draw":192.717,"Driver.Dispatch":190.916,"Driver.Draw.shader_compile_and_link":143.039,"Shader.DrawStage":139.266,"Shader.DrawStage.capture_resources":127.341},"trace_dropped":false,"trace":""} |
|
Raw
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":145,"ms":10190.925},"interval_start_s":94.572,"interval_end_s":104.762,"presents":28,"frame_ms":{"p50":331.029,"p90":427.443,"p99":915.542,"max":915.542},"gpu_busy_ms_per_present":279.911,"worker_busy_pct":{"queue worker 0x0":99.489,"queue worker 0x20":79.342},"top_phases_ms_per_frame":{"Driver.Packet":648.789,"Driver.Packet.dispatch":225.436,"Driver.Packet.draw":195.559,"Driver.Draw":195.140,"Driver.Dispatch":187.869,"Driver.Draw.draw_and_resource_release":148.510,"Recorder.WaitSerial":115.308,"Driver.Packet.memory_wait":108.080},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":173,"ms":10135.865},"interval_start_s":104.762,"interval_end_s":114.898,"presents":30,"frame_ms":{"p50":328.361,"p90":379.078,"p99":385.785,"max":385.785},"gpu_busy_ms_per_present":240.638,"worker_busy_pct":{"queue worker 0x0":99.449,"queue worker 0x20":78.580},"top_phases_ms_per_frame":{"Driver.Packet":599.671,"Driver.Packet.dispatch":201.527,"Driver.Packet.draw":173.686,"Driver.Draw":173.279,"Driver.Dispatch":163.627,"Driver.Draw.draw_and_resource_release":130.795,"Driver.Packet.memory_wait":107.364,"Recorder.WaitSerial":101.821},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":203,"ms":10073.073},"interval_start_s":114.898,"interval_end_s":124.971,"presents":30,"frame_ms":{"p50":329.570,"p90":379.270,"p99":388.514,"max":388.514},"gpu_busy_ms_per_present":241.064,"worker_busy_pct":{"queue worker 0x0":99.459,"queue worker 0x20":78.756},"top_phases_ms_per_frame":{"Driver.Packet":596.499,"Driver.Packet.dispatch":200.323,"Driver.Packet.draw":171.425,"Driver.Draw":171.018,"Driver.Dispatch":162.174,"Driver.Draw.draw_and_resource_release":126.485,"Driver.Packet.memory_wait":106.098,"Recorder.WaitSerial":106.091},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":233,"ms":10270.615},"interval_start_s":124.971,"interval_end_s":135.242,"presents":31,"frame_ms":{"p50":320.744,"p90":368.223,"p99":417.692,"max":417.692},"gpu_busy_ms_per_present":241.936,"worker_busy_pct":{"queue worker 0x0":99.438,"queue worker 0x20":79.419},"top_phases_ms_per_frame":{"Driver.Packet":590.616,"Driver.Packet.dispatch":198.488,"Driver.Packet.draw":170.074,"Driver.Draw":169.674,"Driver.Dispatch":160.578,"Driver.Draw.draw_and_resource_release":126.928,"Driver.Packet.memory_wait":104.393,"Recorder.WaitSerial":103.821},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":264,"ms":10573.722},"interval_start_s":135.242,"interval_end_s":145.816,"presents":29,"frame_ms":{"p50":313.791,"p90":329.513,"p99":1299.619,"max":1299.619},"gpu_busy_ms_per_present":239.370,"worker_busy_pct":{"queue worker 0x0":99.494,"queue worker 0x20":81.788},"top_phases_ms_per_frame":{"Driver.Packet":659.044,"Driver.Packet.dispatch":202.894,"Driver.Packet.draw":200.192,"Driver.Draw":199.793,"Driver.Dispatch":165.954,"Driver.Packet.memory_wait":130.915,"Driver.Draw.draw_and_resource_release":127.754,"Recorder.WaitSerial":102.662},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":171,"ms":10165.210},"interval_start_s":94.075,"interval_end_s":104.240,"presents":31,"frame_ms":{"p50":318.890,"p90":359.604,"p99":439.638,"max":439.638},"gpu_busy_ms_per_present":239.438,"worker_busy_pct":{"queue worker 0x0":99.446,"queue worker 0x20":79.816},"top_phases_ms_per_frame":{"Driver.Packet":586.334,"Driver.Packet.dispatch":197.897,"Driver.Packet.draw":173.588,"Driver.Draw":173.184,"Driver.Dispatch":160.715,"Driver.Draw.draw_and_resource_release":129.954,"Driver.Packet.memory_wait":105.052,"Recorder.WaitSerial":97.598},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":202,"ms":10176.665},"interval_start_s":104.240,"interval_end_s":114.417,"presents":30,"frame_ms":{"p50":327.739,"p90":388.024,"p99":409.439,"max":409.439},"gpu_busy_ms_per_present":239.772,"worker_busy_pct":{"queue worker 0x0":99.453,"queue worker 0x20":78.567},"top_phases_ms_per_frame":{"Driver.Packet":601.913,"Driver.Packet.dispatch":207.989,"Driver.Packet.draw":170.738,"Driver.Draw":170.337,"Driver.Dispatch":169.226,"Driver.Draw.draw_and_resource_release":125.373,"Driver.Packet.memory_wait":106.640,"Recorder.WaitSerial":95.334},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":232,"ms":10232.896},"interval_start_s":114.417,"interval_end_s":124.650,"presents":31,"frame_ms":{"p50":321.831,"p90":355.476,"p99":395.104,"max":395.104},"gpu_busy_ms_per_present":248.553,"worker_busy_pct":{"queue worker 0x0":99.443,"queue worker 0x20":79.054},"top_phases_ms_per_frame":{"Driver.Packet":587.718,"Driver.Packet.dispatch":199.681,"Driver.Packet.draw":171.480,"Driver.Draw":171.080,"Driver.Dispatch":160.592,"Driver.Draw.draw_and_resource_release":127.911,"Driver.Packet.memory_wait":104.881,"Recorder.WaitSerial":99.073},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":263,"ms":10465.700},"interval_start_s":124.650,"interval_end_s":135.115,"presents":29,"frame_ms":{"p50":318.415,"p90":383.992,"p99":1329.885,"max":1329.885},"gpu_busy_ms_per_present":230.544,"worker_busy_pct":{"queue worker 0x0":99.499,"queue worker 0x20":80.697},"top_phases_ms_per_frame":{"Driver.Packet":648.488,"Driver.Packet.dispatch":207.307,"Driver.Packet.draw":195.159,"Driver.Draw":194.757,"Driver.Dispatch":169.022,"Driver.Draw.draw_and_resource_release":130.228,"Driver.Packet.memory_wait":122.267,"Recorder.WaitSerial":100.333},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":292,"ms":10058.120},"interval_start_s":135.115,"interval_end_s":145.174,"presents":22,"frame_ms":{"p50":324.341,"p90":724.263,"p99":2012.645,"max":2012.645},"gpu_busy_ms_per_present":333.386,"worker_busy_pct":{"queue worker 0x0":99.598,"queue worker 0x20":82.115},"top_phases_ms_per_frame":{"Driver.Packet":820.853,"Driver.Packet.dispatch":282.150,"Driver.Dispatch":243.492,"Driver.Packet.draw":237.983,"Driver.Draw":237.580,"Driver.Draw.draw_and_resource_release":177.445,"Driver.Packet.memory_wait":155.284,"Recorder.WaitSerial":150.152},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_DEBUG_STRICT_UNION":"1","APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":138,"ms":10168.364},"interval_start_s":95.700,"interval_end_s":105.869,"presents":28,"frame_ms":{"p50":314.385,"p90":531.852,"p99":889.925,"max":889.925},"gpu_busy_ms_per_present":282.619,"worker_busy_pct":{"queue worker 0x0":99.510,"queue worker 0x20":80.999},"top_phases_ms_per_frame":{"Driver.Packet":653.684,"Driver.Packet.dispatch":320.590,"Driver.Dispatch":282.542,"Driver.Packet.memory_wait":138.786,"Recorder.WaitSerial":133.462,"Driver.Dispatch.capture_resources":96.314,"Driver.Packet.prepare_memory":81.217,"Driver.Packet.draw":76.950},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_DEBUG_STRICT_UNION":"1","APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":166,"ms":10360.276},"interval_start_s":105.869,"interval_end_s":116.229,"presents":29,"frame_ms":{"p50":354.961,"p90":414.786,"p99":446.653,"max":446.653},"gpu_busy_ms_per_present":244.688,"worker_busy_pct":{"queue worker 0x0":99.491,"queue worker 0x20":78.256},"top_phases_ms_per_frame":{"Driver.Packet":633.182,"Driver.Packet.dispatch":263.422,"Driver.Dispatch":221.989,"Driver.Packet.memory_wait":151.666,"Recorder.WaitSerial":98.567,"Driver.Packet.draw":87.196,"Driver.Draw":86.741,"Driver.Packet.prepare_memory":82.891},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_DEBUG_STRICT_UNION":"1","APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":195,"ms":10298.391},"interval_start_s":116.229,"interval_end_s":126.527,"presents":32,"frame_ms":{"p50":308.945,"p90":362.497,"p99":388.823,"max":388.823},"gpu_busy_ms_per_present":239.654,"worker_busy_pct":{"queue worker 0x0":99.424,"queue worker 0x20":79.771},"top_phases_ms_per_frame":{"Driver.Packet":575.232,"Driver.Packet.dispatch":250.067,"Driver.Dispatch":211.099,"Driver.Packet.memory_wait":137.633,"Recorder.WaitSerial":101.649,"Driver.Packet.prepare_memory":76.863,"Driver.Packet.draw":74.425,"Driver.Draw":73.995},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_DEBUG_STRICT_UNION":"1","APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":227,"ms":10145.255},"interval_start_s":126.527,"interval_end_s":136.673,"presents":31,"frame_ms":{"p50":321.471,"p90":364.150,"p99":402.068,"max":402.068},"gpu_busy_ms_per_present":244.034,"worker_busy_pct":{"queue worker 0x0":99.413,"queue worker 0x20":79.970},"top_phases_ms_per_frame":{"Driver.Packet":585.330,"Driver.Packet.dispatch":247.951,"Driver.Dispatch":209.197,"Driver.Packet.memory_wait":139.166,"Recorder.WaitSerial":95.827,"Driver.Packet.prepare_memory":82.399,"Driver.Packet.draw":78.830,"Driver.Draw":78.388},"trace_dropped":false,"trace":""}
{"commit":"b3d5d03d6d13","dirty":true,"env":{"APS5_DEBUG_STRICT_UNION":"1","APS5_LAZY_SHADER_PREPARE":"1","APS5_NO_PAD_INPUT":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 617.14","os":"Windows 10.0.26300","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":258,"ms":10287.147},"interval_start_s":136.673,"interval_end_s":146.960,"presents":33,"frame_ms":{"p50":309.995,"p90":321.067,"p99":387.835,"max":387.835},"gpu_busy_ms_per_present":241.428,"worker_busy_pct":{"queue worker 0x0":99.413,"queue worker 0x20":80.894},"top_phases_ms_per_frame":{"Driver.Packet":560.604,"Driver.Packet.dispatch":246.356,"Driver.Dispatch":209.189,"Driver.Packet.memory_wait":132.672,"Recorder.WaitSerial":101.179,"Driver.Packet.prepare_memory":76.595,"Driver.Packet.draw":73.611,"Driver.Dispatch.capture_resources":73.262},"trace_dropped":false,"trace":""} |
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
CnRJay
left a comment
There was a problem hiding this comment.
The idea is sound (a branch that only selects which read-only buffer to bind needn't wait for the GPU), the strictness after the water-flare incident is the right call, and the four new checks cover the rule's edges. Three gaps.
- The performance claim is not measured for this PR. The one capture with this rule (
strict-1, 2.98 fps against 2.76 and 2.78 for the base) also carries the non-indexed mesh indirect PR and the DCC extent PR, and its rule is chosen through a temporaryAPS5_DEBUG_STRICT_UNIONswitch that isn't in the PR. The first version "gained 2.7%" and was rejected, so the +7.6% belongs to the mix. Please capture base against base plus this PR alone, interleaved, same scene; at 2.8 fps on a start screen the window needs to be much longer than 90-155 s to resolve a few percent. GPU busy per present barely moves (254-259 ms to 250 ms), so the saving is CPU wait; say which phase shrinks (Driver.Packet.memory_wait?) with the numbers. - Binding both successors binds buffers that the taken branch would not have. A branch that selects between two V#s often guards the other one's validity (a descriptor that is only filled in when the branch is taken, a zero or stale record otherwise). Capturing it reads those words and imports or maps a range from them. What happens when the untaken V# is empty, misaligned or points at unmapped memory: does the build throw, bind a null range, or import something large? A test where the untaken side's V# is garbage, and the draw still renders from the taken side, is the case that matters.
- The flare class is the hazard here, and it was found by eye in frame dumps. The new tests check what is bound, not what is drawn. Add a test that reproduces the flare in miniature: a dispatch writes the word, a draw's branch reads it, the image behind the branch must be the one the exact evaluation picks. It should fail for the first version of this change.
Smaller: EvaluateRuntimeSourcesImpl redoes a walk that failed without waiting, "after rolling back the read trace and user-data use it recorded". A rollback bug leaves a stale trace on the second walk and the draw-cache key wrong. Say which test fails when the rollback is removed.
adriadam10
left a comment
There was a problem hiding this comment.
Checked the diff and ShaderMemory::pending (the probe has no side effects, so refusing a read costs nothing). The rule is coherent and the stricter version after the flare is the right shape. What is missing:
- Performance is not isolated.
strict-1also carries the mesh indirect and DCC extent PRs and the temporaryAPS5_DEBUG_STRICT_UNIONswitch. Theperflabel asks for base vs this PR alone on the same scene; at ~2.8 fps the window must be much longer than 90-155 s, runs interleaved. GPU busy barely moves, so say which CPU phase shrinks (e.g. memory wait) with numbers. ConditionSelectsResourceshas no test. None of the four new checks reaches the "both successors reach the same frontier, condition not evaluated" path (SrtDescriptorEvaluation.cppline 109,SrtTape.cppline 56). Add a plan where that holds and a condition read that would otherwise be wrong or pending, and check that both the generic evaluator andSrtTapeskip it.- Rollback in
EvaluateRuntimeSourcesImpl(lines 356-373) is untested. Add a case where the refusing walk fails and the waiting redo must give the same result, trace anduserDataUseas a plain waiting walk; it should fail if theresizecalls are removed. - Untaken-side V# that is garbage. Binding both successors reads descriptors the taken branch would not. Test a read-only V# behind the untaken branch that is zero, misaligned or points to unmapped memory while the pending word selects the other side: the capture must not throw or import a large range, and the taken side must still be read.
- The flare class is only checked by what is bound, not what is drawn. A small test where a dispatch writes the selecting word and the draw's branch picks the image must show the exact evaluation's image; it should fail for the first version of this change.
Linux/lavapipe was not run by the author; the full Build covers it.
|
Independent Windows validation of the equivalent-resource-frontier test requested by @adriadam10. The test-only addition is 68b7138, on a clean composition of this PR's The new synthetic diamond plan has a runtime-evaluable scalar-address condition and two successors reaching the same descriptor. Its memory reader refuses reads, and cases configure the pending-probe callback to report false or true. Both the generic evaluator and tape must capture the descriptor without reading or probing the condition, or recording it in the read trace/user-data use. A separate tape-only invocation allows its failure to be checked independently.
Conventions pass. Cppcheck and clang-tidy completed with no diagnostics on the new test lines; the translation unit still has inherited findings, including the borrowed This supplies a focused test for the equivalent-frontier rule. The performance, rollback, invalid untaken V#, and dispatch/draw image-selection review requests remain open. GPU coverage here is NVIDIA only; Linux/AMD and title behavior were not validated by this comparison. AI-assisted: yes. |
|
Ran this on GTA V (PPSA04263 01.010.002), Linux 7.2.8-zen1-2-zen, NVIDIA GeForce RTX 5060 Laptop GPU, NVIDIA 615.71.09, Graphics Mode Performance, the Story prologue after Resume Story, with no input. Frame p50: main 80.5, 81.2 ms, with #7891 81.4, 81.4 ms (+0.6 ms, +0.7 %). GPU busy per present: 64.6 and 64.3 ms. Summary lines (main, then the PR): |
|
There is a new integration consideration with #8295 / #8272, separate from my earlier equivalent-frontier validation at this PR's #8295 adds Please account for flat-slot uses in the frontier and exact-condition decisions when combining these changes. The direct-root regression, now included in #8295 at This is a public-source review of the interaction between two unmerged changes, not a reported runtime failure of this PR alone or a completed combined-branch test. My earlier validation keeps its original pins. AI-assisted: yes. |
|
First Linux run of this PR, on AMD with RADV. Head AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. Full suite ( Comparing the JUnit output with This checks correctness only; I did not measure performance. GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38 AI-assisted: yes |
What
A resource capture walks the control flow of a shader's resource plan and evaluates each branch condition with reads that wait for pending GPU writes (
SrtRuntime::pendingWrite). When a condition reads a word that a queued dispatch still writes, the capture waits for the GPU, although the branch only selects which descriptors are bound.ConditionSelectsResources) is no longer evaluated; the walk takes both successors, which bind the same resources.ConditionGuardsImagesOrWrites). An extra read-only buffer binding does not change what the shader reads.EvaluateRuntimeSourcesImpl).SrtTapeand the generic evaluator apply the same rule. A first version took both sides of every condition over a pending word. On PPSA28099 it made the water flicker with red, green and white flares (bursts in a run with a frame dump every third flip). A version that kept the condition exact only when the guarded blocks write showed no flare frame in a run with the same dumps. This version is stricter: it also keeps the condition exact for every image.New checks in
verifyGuardedDescriptorSources(agc_shader_memory):Tested
Windows 11 Pro 26300, Ryzen 7 7800X3D, NVIDIA GeForce RTX 5070 (driver 617.14), WinLibs GCC 15.2 UCRT, Release.
Focused tests. Run on
main6762694 and on this branch, same machine, withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -R <pattern> -V.was not found but was requested by env var VK_INSTANCE_LAYERS.agc_driver_indirect_arguments_pending_producer:VUID-vkCmdWaitEvents-srcStageMask-01158andVUID-vkSetEvent-event-09543. This change adds none.The 63 focused tests (same set on main and the change)
agc_command_batch_fence_failure,agc_compute_descriptor_layout_flags,agc_copy_input_kept_bytes,agc_dcc_key_sharing,agc_depth_copy_kept_bytes,agc_descriptor_cache,agc_descriptor_pool_reset_failure,agc_display_buffer_dcc,agc_driver_address_space_teardown,agc_driver_alpha_to_coverage_state,agc_driver_buffer_descriptor_runtime,agc_driver_covered_centroid_state,agc_driver_dcc_key_presync,agc_driver_dcc_keys_first_write,agc_driver_fill_cover_keys,agc_driver_gpu_indirect_arguments_misaligned_writer_ahead,agc_driver_gpu_indirect_arguments_written_ahead,agc_driver_graphics,agc_driver_guarded_null_pointer,agc_driver_indirect_arguments_pending_producer,agc_driver_indirect_arguments_written_ahead,agc_driver_indirect_patched_stage,agc_driver_memory_value_fill,agc_driver_mesh,agc_driver_mesh_draw_relocation,agc_driver_mesh_index_cache,agc_driver_mesh_provoking_layer,agc_driver_mesh_provoking_vertex,agc_driver_msaa_dcc_state,agc_driver_rect_list_indirect,agc_driver_sample_location_grid_fallback,agc_driver_sparse_indirect_indices,agc_driver_sparse_indirect_indices_unreadable,agc_driver_staged_clear_sampled_read,agc_driver_undithered_alpha_to_coverage_state,agc_driver_unused_viewport_depth,agc_heap_mirror_run_unwatch,agc_heap_mirror_run_unwatch_no_space_cache,agc_heap_mirror_unwatch,agc_heap_mirror_unwatch_no_space_cache,agc_pipeline_journal,agc_pipeline_library_clear_waits_for_build,agc_pipeline_store_lazy_buffer_pool,agc_shader_bindless,agc_shader_entry_lane_proof_budget,agc_shader_frontend_pair,agc_shader_frontend_pair_off,agc_shader_layout_pair,agc_shader_layout_pair_off,agc_shader_memory,agc_shader_quad_mask_no_demote,agc_shader_selected_records_direct_image_limit,agc_shader_selected_records_direct_pair_limit,agc_shader_selected_records_image_limit,agc_shader_selected_records_pair_limit,agc_shader_srt_read_patching,agc_shader_table_snapshot_reuse,agc_shader_type_zero_image_materialization,agc_sparse_buffer_holes,agc_sparse_heap_mirror_unwatch,agc_sparse_heap_mirror_unwatch_no_space_cache,agc_write_tracking,agc_write_watch_coveragePerformance. PPSA28099 start screen ("Press any button to continue"), 3840x2160.
maincannot run this title: at 6762694 it stops at boot withindirect register sentinel semantics are not implemented(Execution/src/Pm4.cpp:47). The captures below use the base the title runs on: main a62c724 with #6094 and #6160 (both merged since), #6146, #6366 and #7644, commit b3d5d03d6.b3d5d03d6d13. The base lines have"dirty":falseand the change lines"dirty":true.APS5_TRACE_SUMMARY_EVERY=10,APS5_LAZY_SHADER_PREPARE=1andAPS5_NO_PAD_INPUT=1, a warm shader cache, and no otherAPS5_TRACE_*orAPS5_PROFILE_*switch. Only interval summary lines were written; there is no trace file to attach.This version was not captured on its own: strict-1 also holds the non-indexed mesh indirect change and the DCC key extent fix (separate PRs). Its build chose this rule through a temporary switch,
APS5_DEBUG_STRICT_UNION=1in its lines, which is not part of this PR. The first version gained 2.7 % on average over the base; strict-1 gained 7.6 %.tools/trace_digest.py, base (ctl-2)
17 intervals, 0.0 to 179.1 s, 416 presents
NVIDIA GeForce RTX 5070, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit b3d5d03d6d13
tools/trace_digest.py, first version (srt-2)
17 intervals, 0.0 to 175.9 s, 408 presents
NVIDIA GeForce RTX 5070, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit b3d5d03d6d13 (dirty)
tools/trace_digest.py, this change + mesh indirect + DCC extent (strict-1)
16 intervals, 0.0 to 177.5 s, 375 presents
NVIDIA GeForce RTX 5070, NVIDIA 617.14, Windows 10.0.26300, 3840x2160, commit b3d5d03d6d13 (dirty)
The raw
aps5-summary.jsonllines of the 90-155 s window for every run above are in the two comments below.Overlap.
tools/pr_overlap.py --branchfinds no open PR that changes the same lines. It lists PRs that conflict withmainand share files. On the SRT walker these are #1341, #5609, #6539, #6947 and #7642; none of them changes how branch conditions are evaluated.Checklist
main; 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)