i965: Only update renderbuffers on initial intelMakeCurrent
authorKristian Høgsberg <krh@bitplanet.net>
Sat, 18 Jan 2014 00:55:31 +0000 (16:55 -0800)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 20 Jan 2014 04:48:19 +0000 (20:48 -0800)
commit05da4a7a5e7d5bd988cb31f94ed8e1f053d9ee39
treedd82b2ce7709416d448001a503069defda43b53c
parentf5788e042afbb93e693885e90609d552674f9bd2
i965: Only update renderbuffers on initial intelMakeCurrent

We call intel_prepare_render() in intelMakeCurrent() to make sure we have
renderbuffers before calling _mesa_make_current().  The only reason we
do this is so that we can have valid defaults for width and height.
If we already have buffers for the drawable we're making current, we
don't need this step.

In itself, this is a small optimization, but it also avoids a round trip
that could block on the display server in a unexpected place.

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

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i965/brw_context.c