Mesa (staging/21.1): radv/winsys: fix resetting the number of padded IB words
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Apr 25 11:35:15 UTC 2021
Module: Mesa
Branch: staging/21.1
Commit: 844a782919d2bb3e52d84f491f4029d40556c501
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=844a782919d2bb3e52d84f491f4029d40556c501
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Wed Apr 21 16:06:30 2021 +0200
radv/winsys: fix resetting the number of padded IB words
The number of padded words is per IB, so it should be reset.
Found with Valgrind and dEQP-VK.api.command_buffers.record_many_draws*
Cc: 21.1 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10376>
(cherry picked from commit f9e9b21e10cd3e26c4210bbf646f246a52444426)
---
.pick_status.json | 2 +-
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 0aa3e8da89a..9889da19124 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -238,7 +238,7 @@
"description": "radv/winsys: fix resetting the number of padded IB words",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
index 65e5d76d23f..1cfd2921a6d 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
@@ -902,7 +902,6 @@ radv_amdgpu_winsys_cs_submit_sysmem(struct radeon_winsys_ctx *_ctx, int queue_id
unsigned number_of_ibs;
uint32_t *ptr;
unsigned cnt = 0;
- unsigned pad_words = 0;
/* Compute the number of IBs for this submit. */
number_of_ibs = cs->num_old_cs_buffers + 1;
@@ -935,6 +934,7 @@ radv_amdgpu_winsys_cs_submit_sysmem(struct radeon_winsys_ctx *_ctx, int queue_id
for (unsigned j = 0; j < number_of_ibs; j++) {
struct radeon_cmdbuf *rcs = new_cs_array[j];
bool needs_preamble = preamble_cs && j == 0;
+ unsigned pad_words = 0;
unsigned size = 0;
if (needs_preamble)
@@ -973,6 +973,7 @@ radv_amdgpu_winsys_cs_submit_sysmem(struct radeon_winsys_ctx *_ctx, int queue_id
cnt++;
free(new_cs_array);
} else {
+ unsigned pad_words = 0;
unsigned size = 0;
if (preamble_cs)
More information about the mesa-commit
mailing list