diff --git a/src/panfrost/vulkan/panvk_vX_device.c b/src/panfrost/vulkan/panvk_vX_device.c index 3f0147c4a9f..b607f6ce718 100644 --- a/src/panfrost/vulkan/panvk_vX_device.c +++ b/src/panfrost/vulkan/panvk_vX_device.c @@ -262,6 +262,16 @@ panvk_per_arch(QueueSubmit)(VkQueue _queue, bos[bo_idx++] = pdev->sample_positions->gem_handle; assert(bo_idx == nr_bos); + /* Merge identical BO entries. */ + for (unsigned x = 0; x < nr_bos; x++) { + for (unsigned y = x + 1; y < nr_bos; ) { + if (bos[x] == bos[y]) + bos[y] = bos[--nr_bos]; + else + y++; + } + } + unsigned nr_in_fences = 0; unsigned max_wait_event_syncobjs = util_dynarray_num_elements(&batch->event_ops,