From: Stephane Marchesin Date: Fri, 15 Feb 2008 02:48:32 +0000 (+0100) Subject: nouveau: nv30 fixes. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=01fccea190cf07b41a675e95d82af8ab5228b176;p=mesa.git nouveau: nv30 fixes. --- diff --git a/src/mesa/pipe/nv30/nv30_context.c b/src/mesa/pipe/nv30/nv30_context.c index c56f918ad9d..eef49fbcc2b 100644 --- a/src/mesa/pipe/nv30/nv30_context.c +++ b/src/mesa/pipe/nv30/nv30_context.c @@ -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 */ diff --git a/src/mesa/pipe/nv30/nv30_state.c b/src/mesa/pipe/nv30/nv30_state.c index c29a6448093..abc22eacae9 100644 --- a/src/mesa/pipe/nv30/nv30_state.c +++ b/src/mesa/pipe/nv30/nv30_state.c @@ -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; diff --git a/src/mesa/pipe/nv30/nv30_vertprog.c b/src/mesa/pipe/nv30/nv30_vertprog.c index b712049fa7c..41957b67c4e 100644 --- a/src/mesa/pipe/nv30/nv30_vertprog.c +++ b/src/mesa/pipe/nv30/nv30_vertprog.c @@ -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; }