intel: Fix software detiling of system stencil buffers
authorChad Versace <chad.versace@linux.intel.com>
Fri, 11 Nov 2011 02:39:25 +0000 (18:39 -0800)
committerChad Versace <chad.versace@linux.intel.com>
Tue, 15 Nov 2011 14:42:05 +0000 (06:42 -0800)
commit5365ba19db8e9d714604bb63f037800ba2ff2f4d
tree504ce67e9a48eb07b59ae88657dc07a79117160c
parent87d6b359745b6b2c94d1c852ce27e2879d4bec56
intel: Fix software detiling of system stencil buffers

If a window system stencil buffer had a region with odd height, then the
calculated y offset needed for software detiling was off by one.  The bug
existed in intel_{map,unmap}_renderbuffer_s8() and in the intel_span.c
accessors.

Fixes the following Piglit tests on gen7:
    general/depthstencil-default_fb-readpixels-24_8
    general/depthstencil-default_fb-readpixels-FLOAT-and-USHORT

Fixes SIGABRT in the following Piglit tests on gen7:
    general/depthstencil-default_fb-blit
    general/depthstencil-default_fb-copypixels
    general/depthstencil-default_fb-drawpixels-24_8
    general/depthstencil-default_fb-drawpixels-FLOAT-and-USHORT

Reviewed-by: Eric Anholt <eric@anholt.net>
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