v3dv: fix BO list for TFU jobs

Instead of checking whether the source and destination are the same,
we should check if the underlying BOs are the same, since we may
be suballocating resources from the same allocation and the kernel
will fail to execute jobs if the BO list has duplicated entries.

Fixes aborts with Unreal Engine due to failed TFU jobs.

Fixes: 30f1fc25ce ('v3dv: implement TFU blits')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8098>
This commit is contained in:
Iago Toral Quiroga
2020-12-15 09:21:49 +01:00
parent 9f2afe4170
commit 2832cbea7a
+2 -2
View File
@@ -1466,7 +1466,7 @@ emit_tfu_job(struct v3dv_cmd_buffer *cmd_buffer,
.ios = (height << 16) | width,
.bo_handles = {
dst_bo->handle,
src != dst ? src_bo->handle : 0
src_bo->handle != dst_bo->handle ? src_bo->handle : 0
},
};
@@ -2640,7 +2640,7 @@ copy_buffer_to_image_tfu(struct v3dv_cmd_buffer *cmd_buffer,
.ios = (height << 16) | width,
.bo_handles = {
dst_bo->handle,
src_bo != dst_bo ? src_bo->handle : 0
src_bo->handle != dst_bo->handle ? src_bo->handle : 0
},
};