summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915tex/intel_context.c
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@tungstengraphics.com>2007-07-12 21:52:02 +0200
committerRoland Scheidegger <sroland@tungstengraphics.com>2007-07-12 21:52:02 +0200
commit8b6517abfc20dc508c2a4cb1f6f22f34a8a70805 (patch)
treef45b11f5e0c06f25a5a49bc8b98ed736085805b4 /src/mesa/drivers/dri/i915tex/intel_context.c
parent9870f7bccc55f9b1728fa8b9ed78a72ab15d7f4f (diff)
don't use driDrawable information directly, don't resize at makecurrent
driDrawable information now isn't used in most parts of the driver. makecurrent only updates fb information when the context is new (driDrawable is still updated by the dri common code).
Diffstat (limited to 'src/mesa/drivers/dri/i915tex/intel_context.c')
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_context.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_context.c b/src/mesa/drivers/dri/i915tex/intel_context.c
index 531b4adde8..451c7fd1ba 100644
--- a/src/mesa/drivers/dri/i915tex/intel_context.c
+++ b/src/mesa/drivers/dri/i915tex/intel_context.c
@@ -370,7 +370,7 @@ intelInitContext(struct intel_context *intel,
if (!havePools)
return GL_FALSE;
-
+
if (!_mesa_initialize_context(&intel->ctx,
mesaVis, shareCtx,
functions, (void *) intel))
@@ -572,6 +572,7 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
__DRIdrawablePrivate * driDrawPriv,
__DRIdrawablePrivate * driReadPriv)
{
+ GLuint updatebufsize = GL_FALSE;
#if 0
if (driDrawPriv) {
@@ -619,19 +620,22 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
}
}
- /* set GLframebuffer size to match window, if needed */
- driUpdateFramebufferSize(&intel->ctx, driDrawPriv);
+ /* only update GLframebuffer size to match window
+ if here for the first time */
+ if (intel->ctx.FirstTimeCurrent) {
+ updatebufsize = GL_TRUE;
+ driUpdateFramebufferSize(&intel->ctx, driDrawPriv);
- if (driReadPriv != driDrawPriv) {
- driUpdateFramebufferSize(&intel->ctx, driReadPriv);
+ if (driReadPriv != driDrawPriv) {
+ driUpdateFramebufferSize(&intel->ctx, driReadPriv);
+ }
}
_mesa_make_current(&intel->ctx, &intel_fb->Base, readFb);
- intel->intelScreen->dummyctxptr = &intel->ctx;
/* The drawbuffer won't always be updated by _mesa_make_current:
*/
- if (intel->ctx.DrawBuffer == &intel_fb->Base) {
+ if (updatebufsize && intel->ctx.DrawBuffer == &intel_fb->Base) {
if (intel->driDrawable != driDrawPriv) {
intel_fb->vblank_flags = (intel->intelScreen->irq_active != 0)