nouveau: nv30 fixes.
authorStephane Marchesin <marchesin@icps.u-strasbg.fr>
Fri, 15 Feb 2008 02:48:32 +0000 (03:48 +0100)
committerStephane Marchesin <marchesin@icps.u-strasbg.fr>
Fri, 15 Feb 2008 02:48:47 +0000 (03:48 +0100)
src/mesa/pipe/nv30/nv30_context.c
src/mesa/pipe/nv30/nv30_state.c
src/mesa/pipe/nv30/nv30_vertprog.c

index c56f918..eef49fb 100644 (file)
@@ -255,7 +255,7 @@ nv30_init_hwctx(struct nv30_context *nv30, int rankine_class)
        int w=4096;
        int h=4096;
        int pitch=4096*4;
-       BEGIN_RING(rankine, NV34TCL_VIEWPORT_HORIZ, 5);
+       BEGIN_RING(rankine, NV34TCL_RT_HORIZ, 5);
        OUT_RING  (w<<16);
        OUT_RING  (h<<16);
        OUT_RING  (0x148); /* format */
index c29a644..abc22ea 100644 (file)
@@ -604,7 +604,7 @@ nv30_set_framebuffer_state(struct pipe_context *pipe,
 
        if (rt_enable & NV34TCL_RT_ENABLE_COLOR0) {
                BEGIN_RING(rankine, NV34TCL_COLOR0_PITCH, 1);
-               OUT_RING  (rt[0]->pitch * rt[0]->cpp);
+               OUT_RING  ( (rt[0]->pitch * rt[0]->cpp) | ( (zeta->pitch * zeta->cpp) << 16) );
                nv30->rt[0] = rt[0]->buffer;
        }
 
@@ -615,6 +615,9 @@ nv30_set_framebuffer_state(struct pipe_context *pipe,
        }
 
        if (zeta_format) {
+               /* XXX allocate LMA */
+/*             BEGIN_RING(rankine, NV34TCL_LMA_DEPTH_OFFSET, 1);
+               OUT_RING(0);*/
                BEGIN_RING(rankine, NV34TCL_ZETA_PITCH, 1);
                OUT_RING  (zeta->pitch * zeta->cpp);
                nv30->zeta = zeta->buffer;
index b712049..41957b6 100644 (file)
@@ -751,7 +751,7 @@ nv30_vertprog_bind(struct nv30_context *nv30, struct nv30_vertex_program *vp)
                }
 #endif
                BEGIN_RING(rankine, NV34TCL_VP_UPLOAD_FROM_ID, 1);
-               OUT_RING  (vp->exec->start);
+               OUT_RING  (/*vp->exec->start*/0);
                for (i = 0; i < vp->nr_insns; i++) {
                        BEGIN_RING(rankine, NV34TCL_VP_UPLOAD_INST(0), 4);
                        OUT_RINGp (vp->insns[i].data, 4);
@@ -759,10 +759,8 @@ nv30_vertprog_bind(struct nv30_context *nv30, struct nv30_vertex_program *vp)
        }
 
        BEGIN_RING(rankine, NV34TCL_VP_START_FROM_ID, 1);
-       OUT_RING  (vp->exec->start);
-       BEGIN_RING(rankine, NV34TCL_VP_ATTRIB_EN, 2);
-       OUT_RING  (vp->ir);
-       OUT_RING  (vp->or);
+//     OUT_RING  (vp->exec->start);
+       OUT_RING  (0);
 
        nv30->vertprog.active = vp;
 }