Mesa (staging/21.1): radv: Allocate space for inline push constants.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 9 21:30:01 UTC 2021


Module: Mesa
Branch: staging/21.1
Commit: dfdd3875a1088f79e0d2f94501fd869044e4509e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=dfdd3875a1088f79e0d2f94501fd869044e4509e

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Sun Aug  8 14:37:52 2021 +0200

radv: Allocate space for inline push constants.

In the compute dispatch path we do not allocate a huge amount
of space to cover everything so the individual functions have to
allocate. This was missing here, causing a hang in Cyberpunk when
accessing the system menu at some locations with thread tracing
enabled.

Fixes: bd1186572f6 ("radv: add support for push constants inlining when possible")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12271>
(cherry picked from commit 02b601594587e8d7462a353039108241aa4ab81a)

---

 .pick_status.json                | 2 +-
 src/amd/vulkan/radv_cmd_buffer.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index e2b793fa9e0..c7ce1ce01e3 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -157,7 +157,7 @@
         "description": "radv: Allocate space for inline push constants.",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "bd1186572f6924a15ea10cd72a95c6d451016bae"
     },
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 82e6fb44940..978b5593706 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -940,6 +940,8 @@ radv_emit_inline_push_consts(struct radv_cmd_buffer *cmd_buffer, struct radv_pip
 
    assert(loc->num_sgprs == count);
 
+   radeon_check_space(cmd_buffer->device->ws, cmd_buffer->cs, 2 + count);
+
    radeon_set_sh_reg_seq(cmd_buffer->cs, base_reg + loc->sgpr_idx * 4, count);
    radeon_emit_array(cmd_buffer->cs, values, count);
 }



More information about the mesa-commit mailing list