nv50: make sure to clear _all_ layers of all attachments
authorIlia Mirkin <imirkin@alum.mit.edu>
Thu, 13 Feb 2014 10:10:23 +0000 (05:10 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 22 Feb 2014 23:42:31 +0000 (18:42 -0500)
commit6152ba08945a5a0139dd47745962ef66be8b8a70
tree00a94fa38bc1e1ddf40c607fe99e2885faa93632
parentd5cbd73d210d73b39c1b94f58c203053be2e4128
nv50: make sure to clear _all_ layers of all attachments

Unfortunately there's only one RT_ARRAY_MODE setting for all
attachments, so clears were previously truncated to the minimum number
of layers any attachment had. Instead set the RT_ARRAY_MODE to 512 (the
max number of layers) before doing the clear. This fixes
gl-3.2-layered-rendering-clear-color-mismatched-layer-count.

Also fix clears of individual layered rt/zeta, in case it ever happens.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Cc: 10.1 <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/nv50/nv50_context.h
src/gallium/drivers/nouveau/nv50/nv50_state_validate.c
src/gallium/drivers/nouveau/nv50/nv50_surface.c