Mesa (main): radv: Set parameter cache oversubscription according to the PC lines.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 8 15:21:57 UTC 2021


Module: Mesa
Branch: main
Commit: 4fcb7e96b8350845390f912c0f51d3e1e2ae4e9d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4fcb7e96b8350845390f912c0f51d3e1e2ae4e9d

Author: Timur Kristóf <timur.kristof at gmail.com>
Date:   Tue Jun  8 12:25:36 2021 +0200

radv: Set parameter cache oversubscription according to the PC lines.

This matches how RadeonSI also sets this register.

Signed-off-by: Timur Kristóf <timur.kristof at gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11711>

---

 src/amd/vulkan/si_cmd_buffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c
index 433ab50eee7..48e7bc64e40 100644
--- a/src/amd/vulkan/si_cmd_buffer.c
+++ b/src/amd/vulkan/si_cmd_buffer.c
@@ -496,10 +496,10 @@ si_emit_graphics(struct radv_device *device, struct radeon_cmdbuf *cs)
          radeon_emit(cs, EVENT_TYPE(V_028A90_SQ_NON_EVENT) | EVENT_INDEX(0));
       }
 
-      /* TODO: For culling, replace 128 with 256. */
+      /* When culling is enabled, this will be overwritten accordingly */
       radeon_set_uconfig_reg(cs, R_030980_GE_PC_ALLOC,
                              S_030980_OVERSUB_EN(physical_device->rad_info.use_late_alloc) |
-                                S_030980_NUM_PC_LINES(128 * physical_device->rad_info.max_se - 1));
+                             S_030980_NUM_PC_LINES(physical_device->rad_info.pc_lines / 4 - 1));
    }
 
    if (physical_device->rad_info.chip_class >= GFX9) {



More information about the mesa-commit mailing list