mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
anv/sparse: don't issue a single bind operation per vm_bind ioctl
The xe.ko driver finally fixed bug 746, which means we can finally pass multiple bind operations in a single ioctl. There's a dEQP test that issues 960 bind operations in a single call, so our gains here have potential, although most real-world apps are not even remotely close to this. Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/746 Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27926>
This commit is contained in:
parent
dd6301935e
commit
aa07d8a04c
1 changed files with 3 additions and 18 deletions
|
|
@ -624,24 +624,9 @@ anv_sparse_bind_vm_bind(struct anv_device *device,
|
||||||
if (result != VK_SUCCESS)
|
if (result != VK_SUCCESS)
|
||||||
return vk_queue_set_lost(&queue->vk, "vk_sync_wait failed");
|
return vk_queue_set_lost(&queue->vk, "vk_sync_wait failed");
|
||||||
|
|
||||||
/* FIXME: here we were supposed to issue a single vm_bind ioctl by calling
|
int rc = device->kmd_backend->vm_bind(device, submit);
|
||||||
* vm_bind(device, num_binds, binds), but for an unknown reason some
|
if (rc)
|
||||||
* shader-related tests fail when we do that, so work around it for now.
|
return vk_error(device, VK_ERROR_OUT_OF_DEVICE_MEMORY);
|
||||||
* See: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/746
|
|
||||||
*/
|
|
||||||
for (int b = 0; b < submit->binds_len; b++) {
|
|
||||||
struct anv_sparse_submission s = {
|
|
||||||
.queue = submit->queue,
|
|
||||||
.binds = &submit->binds[b],
|
|
||||||
.binds_len = 1,
|
|
||||||
.binds_capacity = 1,
|
|
||||||
.wait_count = 0,
|
|
||||||
.signal_count = 0,
|
|
||||||
};
|
|
||||||
int rc = device->kmd_backend->vm_bind(device, &s);
|
|
||||||
if (rc)
|
|
||||||
return vk_error(device, VK_ERROR_OUT_OF_DEVICE_MEMORY);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (uint32_t i = 0; i < submit->signal_count; i++) {
|
for (uint32_t i = 0; i < submit->signal_count; i++) {
|
||||||
struct vk_sync_signal *s = &submit->signals[i];
|
struct vk_sync_signal *s = &submit->signals[i];
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue