i965: Replace references to stencil region size with buffer size
authorChad Versace <chad.versace@linux.intel.com>
Thu, 22 Dec 2011 00:58:38 +0000 (16:58 -0800)
committerChad Versace <chad.versace@linux.intel.com>
Tue, 10 Jan 2012 23:52:27 +0000 (15:52 -0800)
commitbebc91f0f3a1f2d19d36a7f1a4f7c992ace064e9
tree951bbf31bbbdb5236fd1970afc7aad9f742290f0
parentb755f5894ce211dcb8ec881ba9cd9856383c3c79
i965: Replace references to stencil region size with buffer size

It is unwise to use a stencil region's size to determine its
renderbuffer's size, because at region creation we fudge the width and
height to accomodate interleaved rows. (See the comment for MESA_FORMAT_S8
in intel_miptree_create()). Most users of stencil_region->{width,height}
should be converted to use stencil_rb->{Width,Height}.

We have already done the replacement in several locations. This patch
continues the replacement in {brw,gen7}_emit_depthbuffer(). To make those
functions look consistent, I've also done the equivalent replacement for
the depth buffer.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i965/brw_misc_state.c
src/mesa/drivers/dri/i965/gen7_misc_state.c