From: Patrick Rudolph Date: Thu, 22 Oct 2015 13:46:16 +0000 (+0200) Subject: st/nine: Respect block alignment on surface lock X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0b35da59deff0d6671649a6aedc10b3c81aeb8a7;p=mesa.git st/nine: Respect block alignment on surface lock Respect block alignment for ATI1/ATI2 format when trying to lock a surface using LockRect(). Fixes failing WINE tests device.c test_surface_blocks() tests. Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy --- diff --git a/src/gallium/state_trackers/nine/surface9.c b/src/gallium/state_trackers/nine/surface9.c index 996cde807d0..484176e6b96 100644 --- a/src/gallium/state_trackers/nine/surface9.c +++ b/src/gallium/state_trackers/nine/surface9.c @@ -357,7 +357,7 @@ NineSurface9_LockRect( struct NineSurface9 *This, D3DERR_INVALIDCALL); if (pRect && This->desc.Pool == D3DPOOL_DEFAULT && - compressed_format (This->desc.Format)) { + util_format_is_compressed(This->base.info.format)) { const unsigned w = util_format_get_blockwidth(This->base.info.format); const unsigned h = util_format_get_blockheight(This->base.info.format); user_assert((pRect->left == 0 && pRect->right == This->desc.Width &&