[Mesa-dev] [PATCH 1/2] i965 gen4-6: Fix off-by-one errors brw_create_constant_surface()
Eric Anholt
eric at anholt.net
Wed Jan 11 12:21:50 PST 2012
On Wed, 11 Jan 2012 12:06:36 -0800, Paul Berry <stereotype441 at gmail.com> wrote:
> Commit 9bdc44a52804a64219a0ca1a061b18596863e524 (i965: Replace struct
> with bit shifting for WM pull constant surfaces) accidentally
> introduced off-by-one errors into the calculation of the surface
> width, height, and depth. This patch restores the correct
> computation.
>
> The reason this wasn't noticed by Piglit tests is that the size of our
> constant surfaces is always less than 2^20, therefore the off-by-one
> error was causing the "depth" field of the surface to be set to all
> 1's. The hardware interpreted this as an extremely large surface, so
> overflow checking was effectively disabled.
>
> No Piglit regressions on Sandy Bridge.
Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120111/4d5c9c1f/attachment.pgp>
More information about the mesa-dev
mailing list