i965: Fix aux-surface size check
authorDaniel Stone <daniels@collabora.com>
Thu, 15 Feb 2018 15:04:51 +0000 (15:04 +0000)
committerDaniel Stone <daniels@collabora.com>
Sat, 17 Feb 2018 10:22:35 +0000 (10:22 +0000)
commit9d21dbeb88bc99ca0e153c11265e19536ad36b61
tree2cb8c182274f92b14e8e6b364eee2865763d2e91
parent931ec80eebbfd6a301a828daa0c9945f49533611
i965: Fix aux-surface size check

The previous commit reworked the checks intel_from_planar() to check the
right individual cases for regular/planar/aux buffers, and do size
checks in all cases.

Unfortunately, the aux size check was broken, and required the aux
surface to be allocated with the correct aux stride, but full image
height (!).

As the ISL aux surface is not recorded in the DRIimage, we cannot easily
access it to check. Instead, store the aux size from when we do have the
ISL surface to hand, and check against that later when we go to access
the aux surface.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: c2c4e5bae3ba ("i965: Fix bugs in intel_from_planar")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/intel_image.h
src/mesa/drivers/dri/i965/intel_screen.c