zink: don't finish barriers cmd buffer if not used.
finishing has some cpu overhead, which if the cmd buffer isn't going to be used is pointless. just let it get reset next time. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16393>
This commit is contained in:
@@ -403,10 +403,12 @@ submit_queue(void *data, void *gdata, int thread_index)
|
||||
bs->is_device_lost = true;
|
||||
goto end;
|
||||
}
|
||||
if (VKSCR(EndCommandBuffer)(bs->barrier_cmdbuf) != VK_SUCCESS) {
|
||||
mesa_loge("ZINK: vkEndCommandBuffer failed");
|
||||
bs->is_device_lost = true;
|
||||
goto end;
|
||||
if (bs->has_barriers) {
|
||||
if (VKSCR(EndCommandBuffer)(bs->barrier_cmdbuf) != VK_SUCCESS) {
|
||||
mesa_loge("ZINK: vkEndCommandBuffer failed");
|
||||
bs->is_device_lost = true;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
while (util_dynarray_contains(&bs->persistent_resources, struct zink_resource_object*)) {
|
||||
|
||||
Reference in New Issue
Block a user