[Mesa-dev] [PATCH 2/3] intel: Fix height in stencil buffer region allocation

Chad Versace chad at chad-versace.us
Mon Jul 11 15:21:15 PDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/11/2011 12:08 PM, Eric Anholt wrote:
> On Sat,  9 Jul 2011 09:01:07 -0700, Chad Versace <chad at chad-versace.us> wrote:
>> If the height of the stencil buffer were odd, then we allocated a region
>> whose height was too small --- `height / 2` rather than
>> `height / 2 + height % 2`.
> 
> Generally this is written "(height + 1) / 2" or "ALIGN(height, 2) / 2".

Ok. I'll change the patch to use the (height+1)/2 idiom.
 
> So, did the math end up working out so that Y tiling the W buffer was
> easier?

The math for decoding a W tile through a Y fence was slightly more complex than decoding an unfenced W tile. As far as arithmetic complexity is concerned, it doesn't matter which one we choose.

More importantly, I was absolutely unable to get the stencil buffer to work as non-tiled. I encountered bizarre behavior. However, if you really think that we should allocate the stencil buffer as non-tiled, then we can discuss on Wednesday possible interpretations of that bizarre behavior and the needed fixes.

- -- 
Chad Versace
chad at chad-versace.us
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOG3dbAAoJEAIvNt057x8iMugQAKbQcu7tg0wYGrbGB9DhhW4Y
zIQueR+d8dcEXB/C5hN2PdxHLAkVQrkUz7PXxPmbOn9nDH69CtBdTJhIpEJtiOH7
RtYgsfiIwqEu7YHs6y4+GgmwnmIokiIJMSOtLgx8hZgvO0wdxqITHcE+qZubDQQz
lMpxjKu7pM+B2sb3FooRCYO/EzzFaj4Iz27Eav3aQM7GceSp7aOtlMTUGrIs0a2q
XtIEOF7m04JtfVeLnkiqkLVIIfVFeSPP0FAXkgnJcmESIkWOUQ2fEOiWj4b4EgIe
iRDRJOLYuf20s8eT2WLK/Zck7JJajy6VKl+OemwJtzbTzZlhWD24dR/Tu5TReL9X
n/YSCyO+hzTEwcIgNaiIH5oY8dABEs702lT0xZlUicIlJFsrr2Bri3mj5B/OSdOG
hN+Vy2DF6+DuYbz8SkURMdHdbxVEtGJXXgX2m9RgJ8u64s24HywSRKDkLU/M2i0k
DWkScczFyr61BaPOWQjcbcL0hbstzpELGAzAZrTR2r2VLgMDmqmovd7TpnVrgZAw
kklB/nuM5wO8Mehs0ZOag6AALtclJJx0llUc2QZ3bWwWWJKpTgDBSLnTsL5vb86b
hEIa1qnEOlupCj9h1r0JHqzyOsS7J+PRf+dwlQn3gmb4hdUTVBBYkBCTaDvjmkoc
8LWR5N/RmsCh8OCbdLAd
=V3ci
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list