Mesa (main): radv: Allocate space for inline push constants.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Aug 9 14:44:15 UTC 2021
Module: Mesa
Branch: main
Commit: 02b601594587e8d7462a353039108241aa4ab81a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=02b601594587e8d7462a353039108241aa4ab81a
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>
---
src/amd/vulkan/radv_cmd_buffer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index feb78d628c3..4ba59c80aae 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -982,6 +982,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