mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 17:00:09 +01:00
nvk: Don't re-initialize the descriptor writer if the set matches
The logic here before was wrong. In the case where the set is the same,
it would avoid the flush but then re-initialize anyway, loosing the
dirty information and causing us not to actually flush out all the
descriptors.
Fixes: 1f0fda22f7 ("nvk: Flush descriptor set maps")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38163>
This commit is contained in:
parent
bae22fec7d
commit
2f6b3b6b91
1 changed files with 8 additions and 1 deletions
|
|
@ -94,7 +94,14 @@ nvk_descriptor_writer_next_set(struct nvk_descriptor_writer *w,
|
|||
{
|
||||
const struct nvk_physical_device *pdev = w->pdev;
|
||||
|
||||
if (w->set != NULL && w->set != set)
|
||||
/* If we're writing to the same set, keep using the original writer as-is
|
||||
* so we don't do unnecessary extra flushing in the case where the client
|
||||
* has a lot of writes to the same set back-to-back.
|
||||
*/
|
||||
if (w->set == set)
|
||||
return;
|
||||
|
||||
if (w->set != NULL)
|
||||
nvk_descriptor_writer_finish(w);
|
||||
|
||||
nvk_descriptor_writer_init_set(pdev, w, set);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue