radv: add the custom border color BO to the list of buffers
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 13 Jul 2020 18:09:15 +0000 (20:09 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 14 Jul 2020 06:29:06 +0000 (08:29 +0200)
The buffer was never added to the list of buffers. This might lead to
VM faults and GPU hangs.

Found this by luck.

Fixes: 57e796a12a8 ("radv: Implement VK_EXT_custom_border_color")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5884>

src/amd/vulkan/radv_device.c

index dee12f98e2d092906593995d277fbbea94f51dc8..9fc0668761ec5a27f9dd78590ca644d719a7246f 100644 (file)
@@ -3591,6 +3591,10 @@ radv_get_preamble_cs(struct radv_queue *queue,
                if (queue->device->trace_bo)
                        radv_cs_add_buffer(queue->device->ws, cs, queue->device->trace_bo);
 
+               if (queue->device->border_color_data.bo)
+                       radv_cs_add_buffer(queue->device->ws, cs,
+                                          queue->device->border_color_data.bo);
+
                if (i == 0) {
                        si_cs_emit_cache_flush(cs,
                                               queue->device->physical_device->rad_info.chip_class,