nvk: Do a second submit to check for errors in the sync case
With NVK_DEBUG=push_sync, we signal and immediately wait on a syncobj to better detect whitch push failed and then print it. However, the syncobj wait itself isn't enough to check for errors. We have to try pushing again. Adding an empty push lets us get errors immediately and print the actually failing pushbuf to stderr. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27320>
This commit is contained in:
committed by
Marge Bot
parent
38aba351f1
commit
c4254f374f
@@ -269,6 +269,18 @@ push_submit(struct push_builder *pb, struct nvk_queue *queue, bool sync)
|
||||
return vk_errorf(queue, VK_ERROR_UNKNOWN,
|
||||
"DRM_SYNCOBJ_WAIT failed: %m");
|
||||
}
|
||||
|
||||
/* Push an empty again, just to check for errors */
|
||||
struct drm_nouveau_exec empty = {
|
||||
.channel = pb->req.channel,
|
||||
};
|
||||
err = drmCommandWriteRead(pb->dev->ws_dev->fd,
|
||||
DRM_NOUVEAU_EXEC,
|
||||
&empty, sizeof(empty));
|
||||
if (err) {
|
||||
return vk_errorf(queue, VK_ERROR_DEVICE_LOST,
|
||||
"DRM_NOUVEAU_EXEC failed: %m");
|
||||
}
|
||||
}
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user