Mesa (staging/18.1): radv/winsys: fix creating the BO list for virtual buffers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 20 16:29:46 UTC 2018


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

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Fri Aug 17 14:45:39 2018 +0200

radv/winsys: fix creating the BO list for virtual buffers

When the number of unique BO is 0, we optimize the list creation
by copying all buffers of the current CS directly into it. But
this is only valid if the CS doesn't have virtual buffers,
otherwise they are not added and hw might report VM faults.

This fixes VM faults with:
dEQP-VK.sparse_resources.image_sparse_binding.2d.rgba8ui.1024_128_1

CC: <mesa-stable at lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
(cherry picked from commit d27e1584ce30b2186ac933f976dc31c3624b385b)

---

 src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
index 0cd870b7c8..3103a29cc7 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
@@ -692,7 +692,7 @@ static int radv_amdgpu_create_bo_list(struct radv_amdgpu_winsys *ws,
 			if (!cs->num_buffers)
 				continue;
 
-			if (unique_bo_count == 0) {
+			if (unique_bo_count == 0 && !cs->num_virtual_buffers) {
 				memcpy(handles, cs->handles, cs->num_buffers * sizeof(amdgpu_bo_handle));
 				memcpy(priorities, cs->priorities, cs->num_buffers * sizeof(uint8_t));
 				unique_bo_count = cs->num_buffers;




More information about the mesa-commit mailing list