[Mesa-stable] [Mesa-dev] [PATCH] radv/winsys: fix creating the BO list for virtual buffers

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Fri Aug 17 12:46:50 UTC 2018


Thanks!

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

On Fri, Aug 17, 2018 at 2:45 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> 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>
> ---
>  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 c94c0f339f..149c256218 100644
> --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
> +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
> @@ -673,7 +673,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));
>                                 unique_bo_count = cs->num_buffers;
>                                 continue;
> --
> 2.18.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-stable mailing list