mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-23 03:00:37 +02:00
nvk: Stop creating a new upload BO every time
We intended this optimization for the case where we're uploading more data than we had in the previous upload BO. If there is no previous upload BO, we always want to set it to the new one. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
parent
55278fe2b8
commit
7660e585f6
1 changed files with 1 additions and 1 deletions
|
|
@ -175,7 +175,7 @@ nvk_cmd_buffer_upload_alloc(struct nvk_cmd_buffer *cmd,
|
|||
* upload BO on this one allocation and continuing on the current upload
|
||||
* BO.
|
||||
*/
|
||||
if (size < cmd->upload_offset) {
|
||||
if (cmd->upload_bo == NULL || size < cmd->upload_offset) {
|
||||
cmd->upload_bo = bo;
|
||||
cmd->upload_offset = size;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue