venus: fix empty submits with BOs
Empty submits with BOs (!batch_count && bo_count) were incorrectly skipped. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11791>
This commit is contained in:
@@ -542,6 +542,17 @@ sim_submit(struct virtgpu *gpu, const struct vn_renderer_submit *submit)
|
||||
}
|
||||
}
|
||||
|
||||
if (!submit->batch_count && submit->bo_count) {
|
||||
struct drm_virtgpu_execbuffer args = {
|
||||
.bo_handles = (uintptr_t)gem_handles,
|
||||
.num_bo_handles = submit->bo_count,
|
||||
};
|
||||
|
||||
ret = drmIoctl(gpu->fd, DRM_IOCTL_VIRTGPU_EXECBUFFER, &args);
|
||||
if (ret)
|
||||
vn_log(gpu->instance, "failed to execbuffer: %s", strerror(errno));
|
||||
}
|
||||
|
||||
free(gem_handles);
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user