summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nv20/nv20_clear.c1
-rw-r--r--src/gallium/drivers/nv20/nv20_context.c24
-rw-r--r--src/gallium/drivers/nv20/nv20_state_emit.c13
-rw-r--r--src/gallium/drivers/nv20/nv20_vbo.c1
4 files changed, 21 insertions, 18 deletions
diff --git a/src/gallium/drivers/nv20/nv20_clear.c b/src/gallium/drivers/nv20/nv20_clear.c
index 81b6f3e78a..29f4afd87c 100644
--- a/src/gallium/drivers/nv20/nv20_clear.c
+++ b/src/gallium/drivers/nv20/nv20_clear.c
@@ -9,4 +9,5 @@ nv20_clear(struct pipe_context *pipe, struct pipe_surface *ps,
unsigned clearValue)
{
pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, clearValue);
+ ps->status = PIPE_SURFACE_STATUS_CLEAR;
}
diff --git a/src/gallium/drivers/nv20/nv20_context.c b/src/gallium/drivers/nv20/nv20_context.c
index d3aca8d937..1659aec8fa 100644
--- a/src/gallium/drivers/nv20/nv20_context.c
+++ b/src/gallium/drivers/nv20/nv20_context.c
@@ -263,7 +263,7 @@ static void nv20_init_hwctx(struct nv20_context *nv20)
BEGIN_RING(kelvin, NV20TCL_DEPTH_FUNC, 1);
OUT_RING (NV20TCL_DEPTH_FUNC_LESS);
BEGIN_RING(kelvin, NV20TCL_DEPTH_WRITE_ENABLE, 1);
- OUT_RING (1);
+ OUT_RING (0);
BEGIN_RING(kelvin, NV20TCL_DEPTH_TEST_ENABLE, 1);
OUT_RING (0);
BEGIN_RING(kelvin, NV20TCL_POLYGON_OFFSET_FACTOR, 2);
@@ -349,7 +349,7 @@ static void nv20_init_hwctx(struct nv20_context *nv20)
memset(projectionmatrix, 0, sizeof(projectionmatrix));
projectionmatrix[0*4+0] = 1.0;
projectionmatrix[1*4+1] = 1.0;
- projectionmatrix[2*4+2] = 1.0;
+ projectionmatrix[2*4+2] = 16777215.0;
projectionmatrix[3*4+3] = 1.0;
BEGIN_RING(kelvin, NV20TCL_PROJECTION_MATRIX(0), 16);
for (i = 0; i < 16; i++) {
@@ -357,20 +357,20 @@ static void nv20_init_hwctx(struct nv20_context *nv20)
}
BEGIN_RING(kelvin, NV20TCL_DEPTH_RANGE_NEAR, 2);
- OUT_RINGf (0.0);
- OUT_RINGf (16777216.0); /* bpp dependant? */
+ OUT_RINGf (0.0);
+ OUT_RINGf (16777216.0); /* [0, 1] scaled approx to [0, 2^24] */
BEGIN_RING(kelvin, NV20TCL_VIEWPORT_SCALE0_X, 4);
- OUT_RINGf (0.0); /* x-offset */
- OUT_RINGf (0.0); /* y-offset */
- OUT_RINGf (16777215.0 * 0.5);
- OUT_RING (0);
+ OUT_RINGf (0.0); /* x-offset, w/2 + 1.031250 */
+ OUT_RINGf (0.0); /* y-offset, h/2 + 0.030762 */
+ OUT_RINGf (0.0);
+ OUT_RINGf (16777215.0);
BEGIN_RING(kelvin, NV20TCL_VIEWPORT_SCALE1_X, 4);
- OUT_RINGf (0.0); /* no effect? */
- OUT_RINGf (0.0); /* no effect? */
- OUT_RINGf (16777215.0 * 0.5);
- OUT_RINGf (65535.0);
+ OUT_RINGf (0.0); /* no effect?, w/2 */
+ OUT_RINGf (0.0); /* no effect?, h/2 */
+ OUT_RINGf (16777215.0 * 0.5);
+ OUT_RINGf (65535.0);
FIRE_RING (NULL);
}
diff --git a/src/gallium/drivers/nv20/nv20_state_emit.c b/src/gallium/drivers/nv20/nv20_state_emit.c
index cbdc674b09..ea20078a50 100644
--- a/src/gallium/drivers/nv20/nv20_state_emit.c
+++ b/src/gallium/drivers/nv20/nv20_state_emit.c
@@ -73,6 +73,9 @@ static void nv20_state_emit_dsa(struct nv20_context* nv20)
BEGIN_RING(kelvin, NV20TCL_DEPTH_TEST_ENABLE, 1);
OUT_RING (d->depth.test_enable);
+ BEGIN_RING(kelvin, NV20TCL_DEPTH_UNK17D8, 1);
+ OUT_RING (1);
+
#if 0
BEGIN_RING(kelvin, NV20TCL_STENCIL_ENABLE, 1);
OUT_RING (d->stencil.enable);
@@ -352,16 +355,14 @@ nv20_emit_hw_state(struct nv20_context *nv20)
*/
/* Render target */
-/* XXX figre out who's who for NV10TCL_DMA_* and fill accordingly
- * BEGIN_RING(kelvin, NV20TCL_DMA_COLOR0, 1);
- * OUT_RELOCo(nv20->rt[0], NOUVEAU_BO_VRAM | NOUVEAU_BO_WR); */
+ BEGIN_RING(kelvin, NV20TCL_DMA_COLOR, 1);
+ OUT_RELOCo(nv20->rt[0], NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
BEGIN_RING(kelvin, NV20TCL_COLOR_OFFSET, 1);
OUT_RELOCl(nv20->rt[0], 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
if (nv20->zeta) {
-/* XXX
- * BEGIN_RING(kelvin, NV20TCL_DMA_ZETA, 1);
- * OUT_RELOCo(nv20->zeta, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR); */
+ BEGIN_RING(kelvin, NV20TCL_DMA_ZETA, 1);
+ OUT_RELOCo(nv20->zeta, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
BEGIN_RING(kelvin, NV20TCL_ZETA_OFFSET, 1);
OUT_RELOCl(nv20->zeta, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
/* XXX for when we allocate LMA on nv17 */
diff --git a/src/gallium/drivers/nv20/nv20_vbo.c b/src/gallium/drivers/nv20/nv20_vbo.c
index 4edc4efebd..24d8f4bef0 100644
--- a/src/gallium/drivers/nv20/nv20_vbo.c
+++ b/src/gallium/drivers/nv20/nv20_vbo.c
@@ -64,6 +64,7 @@ boolean nv20_draw_elements( struct pipe_context *pipe,
draw_set_mapped_element_buffer(draw, 0, NULL);
}
+ draw_flush(nv20->draw);
return TRUE;
}