Skip to content
Snippets Groups Projects
Commit 83a83a89 authored by Ilia Mirkin's avatar Ilia Mirkin Committed by Emil Velikov
Browse files

nouveau: take extra push space into account for pushbuf_space calls

Ever since a long time ago when I messed around with fences, I ensure
that after a PUSH_SPACE call there is enough space to write a fence out
into the pushbuf.

However the PUSH_SPACE macro is not all-knowing, and so sometimes we
have to invoke nouveau_pushbuf_space manually with the relocs/pushes
args set. If we don't take the extra allocation from PUSH_SPACE into
account, then we will end up accidentally flushing when the code was not
expecting a flush. This can lead to various runtime and rendering
failures.

The amount of extra allocation isn't that important - it has to be at
least 8 based on the current nouveau_winsys.h setting, but even more
won't hurt. I just rounded up to powers of 2.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99354


Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
Acked-by: default avatarBen Skeggs <bskeggs@redhat.com>
(cherry picked from commit eb60a89b)
parent eba4c8fe
No related branches found
No related tags found
No related merge requests found
Showing
with 26 additions and 56 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment