if (!driContext->driScreenPriv->dri2.enabled)
return;
- intel_update_renderbuffers(driContext, driContext->driDrawablePriv);
- if (driContext->driDrawablePriv != driContext->driReadablePriv)
- intel_update_renderbuffers(driContext, driContext->driReadablePriv);
+ if (!intel->internal_viewport_call) {
+ intel_update_renderbuffers(driContext, driContext->driDrawablePriv);
+ if (driContext->driDrawablePriv != driContext->driReadablePriv)
+ intel_update_renderbuffers(driContext, driContext->driReadablePriv);
+ }
old_viewport = ctx->Driver.Viewport;
ctx->Driver.Viewport = NULL;
struct intel_region *front_region;
struct intel_region *back_region;
struct intel_region *depth_region;
+ GLboolean internal_viewport_call;
/**
* This value indicates that the kernel memory manager is being used
intel->meta.saved_vp_height = ctx->Viewport.Height;
intel->meta.saved_matrix_mode = ctx->Transform.MatrixMode;
+ intel->internal_viewport_call = GL_TRUE;
_mesa_Viewport(0, 0, ctx->DrawBuffer->Width, ctx->DrawBuffer->Height);
+ intel->internal_viewport_call = GL_FALSE;
_mesa_MatrixMode(GL_PROJECTION);
_mesa_PushMatrix();
_mesa_MatrixMode(intel->meta.saved_matrix_mode);
+ intel->internal_viewport_call = GL_TRUE;
_mesa_Viewport(intel->meta.saved_vp_x, intel->meta.saved_vp_y,
intel->meta.saved_vp_width, intel->meta.saved_vp_height);
+ intel->internal_viewport_call = GL_FALSE;
}
/**