intel: Simplify stencil detiling arithmetic
authorChad Versace <chad.versace@linux.intel.com>
Tue, 15 Nov 2011 15:10:18 +0000 (07:10 -0800)
committerChad Versace <chad.versace@linux.intel.com>
Tue, 15 Nov 2011 16:00:29 +0000 (08:00 -0800)
commitdc4c3a31c64aae2c3d76ccbd5bf54d04a1d5d041
tree7222d7f08def7d8b309f97c9332778a04f968d87
parent1161facaf9bb14086807714c72a7554ed229a52f
intel: Simplify stencil detiling arithmetic

When calculating the y offset needed for detiling window system stencil
buffers, replace the term
   region->height * 2 + region->height % 2 - 1
with
   rb->Height - 1 .

The two terms are incidentally equivalent due to some out-of-date,
incorrect code in the Intel DRI2 glue for DDX. (See
intel_process_dri2_buffer_with_separate_stencil(), line ``buffer_height /=
2;``).

Note: This is a candidate for the 7.11 branch (only the intel_span.c hunk).
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/intel/intel_fbo.c
src/mesa/drivers/dri/intel/intel_span.c