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:Ilia Mirkin <imirkin@alum.mit.edu> Acked-by:
Ben Skeggs <bskeggs@redhat.com>
- src/gallium/drivers/nouveau/nouveau_video.c 1 addition, 1 deletionsrc/gallium/drivers/nouveau/nouveau_video.c
- src/gallium/drivers/nouveau/nv30/nv30_clear.c 1 addition, 1 deletionsrc/gallium/drivers/nouveau/nv30/nv30_clear.c
- src/gallium/drivers/nouveau/nv30/nv30_transfer.c 4 additions, 4 deletionssrc/gallium/drivers/nouveau/nv30/nv30_transfer.c
- src/gallium/drivers/nouveau/nv50/nv50_surface.c 3 additions, 3 deletionssrc/gallium/drivers/nouveau/nv50/nv50_surface.c
- src/gallium/drivers/nouveau/nv50/nv50_vbo.c 1 addition, 1 deletionsrc/gallium/drivers/nouveau/nv50/nv50_vbo.c
- src/gallium/drivers/nouveau/nv50/nv98_video.c 3 additions, 3 deletionssrc/gallium/drivers/nouveau/nv50/nv98_video.c
- src/gallium/drivers/nouveau/nv50/nv98_video_bsp.c 1 addition, 6 deletionssrc/gallium/drivers/nouveau/nv50/nv98_video_bsp.c
- src/gallium/drivers/nouveau/nv50/nv98_video_ppp.c 1 addition, 6 deletionssrc/gallium/drivers/nouveau/nv50/nv98_video_ppp.c
- src/gallium/drivers/nouveau/nv50/nv98_video_vp.c 2 additions, 7 deletionssrc/gallium/drivers/nouveau/nv50/nv98_video_vp.c
- src/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c 1 addition, 1 deletionsrc/gallium/drivers/nouveau/nvc0/nvc0_query_hw.c
- src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c 1 addition, 1 deletionsrc/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
- src/gallium/drivers/nouveau/nvc0/nvc0_video.c 3 additions, 3 deletionssrc/gallium/drivers/nouveau/nvc0/nvc0_video.c
- src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c 1 addition, 6 deletionssrc/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c
- src/gallium/drivers/nouveau/nvc0/nvc0_video_ppp.c 1 addition, 6 deletionssrc/gallium/drivers/nouveau/nvc0/nvc0_video_ppp.c
- src/gallium/drivers/nouveau/nvc0/nvc0_video_vp.c 2 additions, 7 deletionssrc/gallium/drivers/nouveau/nvc0/nvc0_video_vp.c