Repository navigation
fix(agc): cover the console's DCC key extent for 1, 2, 8 and 16-byte elements - #7896
eljackjoestar-cmd wants to merge 1 commit into
Conversation
…elements DccKeyCount took the console's DCC extent only for 4-byte SW_64KB_R_X surfaces and left every other element size at one key per 256 bytes. addrlib's GFX10 meta blocks hold 4 KiB of keys over 2^(20 - log2 element bytes) texels, the odd bit going to the width, so a 2420x1364 8-byte target has 0x1e000 key bytes, not 0x1a200. A key fill of that whole extent over memory that other live images overlap was longer than the computed extent, so it was classified by its overlaps instead of as a fast clear of the target, and the target kept stale texels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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.
|
|
Host: Arch Linux, kernel 7.2.11, AMD Radeon RX 7900 GRE (RADV NAVI31), Mesa 26.2.5, GCC 16.2.1, Release,
The fixture ( The PR's own tests pass: |
What
DccKeyCounttook the console's DCC key extent only for 4-byte SW_64KB_R_X surfaces: 512x512-texel meta blocks of 4 KiB of keys, measured in #788. Every other element size kept one key per 256 bytes.addrlib's GFX10 meta blocks hold 4 KiB of keys over 2^(20 - log2 element bytes) texels, the odd bit going to the width:
The extent now follows these blocks for 1, 2, 4, 8 and 16-byte elements. Other element sizes (12-byte) and other tile modes keep one key per 256 bytes. The 4-byte result is unchanged.
Effect on PPSA28099. Its start screen showed a black sky.
DccKeyCountgave 0x1a200, so the fill was longer than the image's key extent. The title's transient allocator also places other live images over that memory.StorageTexture::keysFillMatchestherefore classified the fill by its overlaps instead of as the target's key fill.scene * translucency.a + translucency.rgb), and the sky turned black.With the 8-byte extent, the fill is the target's key fill and the sky renders.
The debt entry "DCC key stores" is cut to what stays open: the 1, 2 and 16-byte extents follow addrlib and are not measured.
New
KeyCountTestscases (agc_display_buffer_dcc):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. The tests includeagc_display_buffer_dcc,agc_dcc_key_sharing,agc_driver_fill_cover_keys,agc_driver_dcc_key_presync,agc_driver_dcc_keys_first_write,agc_driver_memory_value_fillandagc_driver_staged_clear_sampled_read.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_coverageTitle. PPSA28099 start screen at 3840x2160.
maincannot run this title: at 6762694 it stops at boot withindirect register sentinel semantics are not implemented(Execution/src/Pm4.cpp:47). The check used the base the title runs on: main a62c724 with #6094 and #6160 (both merged since), #6146, #6366 and #7644.Overlap.
tools/pr_overlap.py --branchlists #7480, which adds a debt entry on the line next to the edited one (docs/dev/debt/libSceAgcDriver.md). The conflict is textual only. The other PRs it lists conflict withmainand shareDccMetadata.cppor the debt file; none of them changesDccKeyCount.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)