Merge branch 'master' of git+ssh://keithw@git.freedesktop.org/git/mesa/mesa into...
[mesa.git] / src / mesa / drivers / dri / nouveau / nouveau_state.c
index 6406b2d9cd43ae6fe0565d94e95be76ed210b48c..8d3c018dffaec12ed092832f27dfbee790e487de 100644 (file)
@@ -30,7 +30,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "nouveau_fifo.h"
 
 #include "swrast/swrast.h"
-#include "array_cache/acache.h"
 #include "tnl/tnl.h"
 #include "swrast_setup/swrast_setup.h"
 
@@ -59,25 +58,12 @@ static void nouveauCalcViewport(GLcontext *ctx)
     /* Calculate the Viewport Matrix */
     
     nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
-    nouveau_renderbuffer *nrb;
     const GLfloat *v = ctx->Viewport._WindowMap.m;
     GLfloat *m = nmesa->viewport.m;
-    GLfloat xoffset, yoffset;
-    GLint h = 0;
+    GLfloat xoffset = nmesa->drawX, yoffset = nmesa->drawY;
   
-    nrb = nouveau_current_draw_buffer(ctx);
     nmesa->depth_scale = 1.0 / ctx->DrawBuffer->_DepthMaxF;
 
-    if (nrb && nrb->map) {
-       /* Window */
-       xoffset = nrb->dPriv->x;
-       yoffset = nrb->dPriv->y;
-    } else {
-       /* Offscreen or back buffer */
-       xoffset = 0.0;
-       yoffset = 0.0;
-    }
-
     m[MAT_SX] =   v[MAT_SX];
     m[MAT_TX] =   v[MAT_TX] + xoffset + SUBPIXEL_X;
     m[MAT_SY] = - v[MAT_SY];
@@ -157,7 +143,7 @@ static void nouveauDDInvalidateState(GLcontext *ctx, GLuint new_state)
 {
     _swrast_InvalidateState( ctx, new_state );
     _swsetup_InvalidateState( ctx, new_state );
-    _ac_InvalidateState( ctx, new_state );
+    _vbo_InvalidateState( ctx, new_state );
     _tnl_InvalidateState( ctx, new_state );
     NOUVEAU_CONTEXT(ctx)->new_render_state |= new_state;
 }
@@ -181,6 +167,7 @@ void nouveauDDInitState(nouveauContextPtr nmesa)
             break;
         case NV_30:
         case NV_40:
+        case NV_44:
         case NV_50:
             nv30InitStateFuncs(nmesa->glCtx, &nmesa->glCtx->Driver);
             break;