nv50,nvc0: fix buffer clearing to respect engine alignment requirements
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 30 Jan 2016 15:02:43 +0000 (10:02 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 30 Jan 2016 21:01:41 +0000 (16:01 -0500)
commit3ca2001b537a2709e7ef60410e7dfad5d38663f4
treea8466aadc9a44c52456ccbaac207bc3644884640
parentf15447e7c9dc1e00973b02098637da0aa74de7d5
nv50,nvc0: fix buffer clearing to respect engine alignment requirements

It appears that the nvidia render engine is quite picky when it comes to
linear surfaces. It doesn't like non-256-byte aligned offsets, and
apparently doesn't even do non-256-byte strides.

This makes arb_clear_buffer_object-unaligned pass on both nv50 and nvc0.

As a side-effect this also allows RGB32 clears to work via GPU data
upload instead of synchronizing the buffer to the CPU (nvc0 only).

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> # tested on GF108, GT215
Tested-by: Nick Sarnie <commendsarnex@gmail.com> # GK208
Cc: mesa-stable@lists.freedesktop.org
src/gallium/drivers/nouveau/nv50/nv50_surface.c
src/gallium/drivers/nouveau/nvc0/nvc0_surface.c