diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index fd0ea547dbd..b54ef1f5a73 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -918,7 +918,6 @@ intelMakeCurrent(__DRIcontext * driContextPriv, if (driContextPriv) { struct gl_context *ctx = &brw->ctx; struct gl_framebuffer *fb, *readFb; - struct intel_renderbuffer *rb = NULL; if (driDrawPriv == NULL && driReadPriv == NULL) { fb = _mesa_get_incomplete_framebuffer(); @@ -926,7 +925,6 @@ intelMakeCurrent(__DRIcontext * driContextPriv, } else { fb = driDrawPriv->driverPrivate; readFb = driReadPriv->driverPrivate; - rb = intel_get_renderbuffer(fb, BUFFER_BACK_LEFT); driContextPriv->dri2.draw_stamp = driDrawPriv->dri2.stamp - 1; driContextPriv->dri2.read_stamp = driReadPriv->dri2.stamp - 1; } @@ -938,11 +936,11 @@ intelMakeCurrent(__DRIcontext * driContextPriv, intel_gles3_srgb_workaround(brw, fb); intel_gles3_srgb_workaround(brw, readFb); - if (rb && !rb->mt) { - /* If we don't have buffers for the drawable yet, force a call to - * getbuffers here so we can have a default drawable size. */ + /* If the context viewport hasn't been initialized, force a call out to + * the loader to get buffers so we have a drawable size for the initial + * viewport. */ + if (!brw->ctx.ViewportInitialized) intel_prepare_render(brw); - } _mesa_make_current(ctx, fb, readFb); } else { |