i965: Correct check for re-bound buffer in intel_update_image_buffer
authorKeith Packard <keithp@keithp.com>
Fri, 22 Nov 2013 13:39:15 +0000 (05:39 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 21 Dec 2013 00:18:37 +0000 (16:18 -0800)
commitc426fb08cfd973b255d6e97d99350efc38b740ed
treeba0dcf50a38412780e06a5a7efdfe89eafe42103
parentca2012a912dcd3d671071ad7472c8a7c570745f2
i965: Correct check for re-bound buffer in intel_update_image_buffer

The buffer-object is the persistent thing passed through the loader, so when
updating an image buffer, check to see if it is already bound to the provided
bo. The region, on the other hand, is allocated separately for the miptree,
and so will never be the same as that passed back from the loader.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_context.c