nv50: allocate more offset space for occlusion queries
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 4 Apr 2015 03:57:43 +0000 (23:57 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 4 Apr 2015 15:30:03 +0000 (11:30 -0400)
commitba353935a392d2a43422f1d258456336b40b60ea
treeb7bcab5fb51e041797c0c0edbdcb6441e3aac66c
parent9c53e80b9b6a637a771328bac98d2292a00869ce
nv50: allocate more offset space for occlusion queries

Commit 1a170980a09 started writing to q->data[4]/[5] but kept the
per-query space at 16, which meant that in some cases we would write
past the end of the buffer. Rotate by 32, like nvc0 does. This ensures
that we always have 32 bytes in front of us, and the data writes will go
within the allocated space.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89679
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Nick Tenney <nick.tenney@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/nv50/nv50_query.c