nouveau: nv10: also set modelview0 matrix to identity
authorPatrice Mandin <pmandin@caramail.com>
Sat, 25 Aug 2007 15:46:53 +0000 (17:46 +0200)
committerPatrice Mandin <pmandin@caramail.com>
Sat, 25 Aug 2007 15:46:53 +0000 (17:46 +0200)
src/mesa/drivers/dri/nouveau/nv10_state.c

index d3331ac970270c63d3e2d4222ff72ddf43f6ab5c..79d567b25d725b4486bd89fabcd8549575a073d0 100644 (file)
@@ -869,7 +869,7 @@ static GLboolean nv10InitCard(nouveauContextPtr nmesa)
        OUT_RING  (0x802);
        OUT_RING  (2);
 
-       /* Projection matrix */
+       /* Projection and modelview matrix */
        memset(projection, 0, sizeof(projection));
        projection[0*4+0] = 1.0;
        projection[1*4+1] = 1.0;
@@ -882,6 +882,10 @@ static GLboolean nv10InitCard(nouveauContextPtr nmesa)
        for (i=0; i<16; i++) {
                OUT_RINGf (projection[i]);
        }
+       BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_MODELVIEW0_MATRIX(0), 16);
+       for (i=0; i<16; i++) {
+               OUT_RINGf (projection[i]);
+       }
        BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_DEPTH_RANGE_NEAR, 2);
        OUT_RINGf  (0.0);
        OUT_RINGf  (1.0);