i965: Move intel_prepare_render() above first buffer access
authorKristian Høgsberg <krh@bitplanet.net>
Wed, 5 Feb 2014 18:59:02 +0000 (10:59 -0800)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 5 Feb 2014 19:10:39 +0000 (11:10 -0800)
commit44338cd826623ae0675861015a56c528261f3fd3
tree08f29922471791f9168c29631d9d7e02247ff1d9
parentdb98d238e237f19c3d1bc201e748ed5bf289ba6b
i965: Move intel_prepare_render() above first buffer access

The driver is supposed to ensure buffers before any drawing operation, but in
do_blit_drawpixels() and do_blit_copypixels() we inspect the buffer format
before calling intel_prepare_render().  That was covered up by the
unconditional call to intel_prepare_render() in intelMakeCurrent(), but we
now only do this on the initial intelMakeCurrent call for a context
(to get the size for the initial viewport values).

https://bugs.freedesktop.org/show_bug.cgi?id=74083

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Tested-by: Alexander Monakov <amonakov@gmail.com>
src/mesa/drivers/dri/i965/intel_pixel_copy.c
src/mesa/drivers/dri/i965/intel_pixel_draw.c