r300: radeonMakeCurrent cleanups.
authorMichel Dänzer <michel@tungstengraphics.com>
Sun, 29 Apr 2007 11:52:11 +0000 (13:52 +0200)
committerMichel Dänzer <michel@tungstengraphics.com>
Sun, 29 Apr 2007 11:52:11 +0000 (13:52 +0200)
r300UpdateWindow is superfluous or even possibly wrong here; _mesa_make_current
will set the viewport when necessary. So the conditional _mesa_set_viewport call
can go as well.

src/mesa/drivers/dri/r300/radeon_context.c

index 22f943ebf38887ba43c7f3f0b186e642d449d210..ef1f25dd413ff1fa1e65023a8fd3163b9ab66072 100644 (file)
@@ -283,7 +283,6 @@ GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv,
                        radeon->dri.drawable = driDrawPriv;
 
                        radeonSetCliprects(radeon);
-                       r300UpdateWindow(radeon->glCtx);
                        r300UpdateViewportOffset(radeon->glCtx);
                }
 
@@ -293,11 +292,6 @@ GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv,
                                    (GLframebuffer *) driReadPriv->
                                    driverPrivate);
 
-               if (!radeon->glCtx->Viewport.Width) {
-                       _mesa_set_viewport(radeon->glCtx, 0, 0,
-                                          driDrawPriv->w, driDrawPriv->h);
-               }
-
                _mesa_update_state(radeon->glCtx);              
        } else {
                if (RADEON_DEBUG & DEBUG_DRI)