summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Dergachev <volodya@freedesktop.org>2005-01-02 05:57:15 +0000
committerVladimir Dergachev <volodya@freedesktop.org>2005-01-02 05:57:15 +0000
commitd6be8dd651dc9d57a85aa408bfd572bc142bb6a1 (patch)
treecb3272a70dbe8c14a3b10785d720fb2d0910df1f
parent9a04b25c60a2dd18839f5e69ae5c9abee9635d84 (diff)
I think I fixed the lockups issue.
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index f1b2fae139..30093a389b 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -274,6 +274,12 @@ static GLboolean r300_run_flat_render(GLcontext *ctx,
r300_render_flat_primitive(rmesa, ctx, start, start + length, prim);
}
+ reg_start(R300_RB3D_DSTCACHE_CTLSTAT,0);
+ e32(0x0000000a);
+
+ reg_start(0x4f18,0);
+ e32(0x00000003);
+
sync_VAP(PASS_PREFIX_VOID);
end_3d(PASS_PREFIX_VOID);
@@ -424,6 +430,12 @@ static GLboolean r300_run_vb_flat_render(GLcontext *ctx,
r300_render_vb_flat_primitive(rmesa, ctx, start, start + length, prim);
}
+ reg_start(R300_RB3D_DSTCACHE_CTLSTAT,0);
+ e32(0x0000000a);
+
+ reg_start(0x4f18,0);
+ e32(0x00000003);
+
end_3d(PASS_PREFIX_VOID);
/* Flush state - we are done drawing.. */
@@ -454,6 +466,8 @@ static void r300_render_tex_primitive(r300ContextPtr rmesa,
VB->ObjPtr->size, VB->ObjPtr->stride);
fprintf(stderr,"ColorPtr[0]: size=%d stride=%d\n",
VB->ColorPtr[0]->size, VB->ColorPtr[0]->stride);
+ fprintf(stderr,"TexCoordPtr[0]: size=%d stride=%d\n",
+ VB->TexCoordPtr[0]->size, VB->TexCoordPtr[0]->stride);
if(type<0)return;
@@ -539,7 +553,9 @@ static GLboolean r300_run_tex_render(GLcontext *ctx,
vb_arrays[2].ncomponents=4;
vb_arrays[2].reg=REG_TEX0;
-
+ /* Fill texture with some random data */
+// for(i=0;i<1000;i++)((int *)(rsp->gartTextures.map))[i]=rand();
+
/* needed before starting 3d operation .. */
reg_start(R300_RB3D_DSTCACHE_CTLSTAT,0);
e32(0x0000000a);
@@ -569,8 +585,6 @@ static GLboolean r300_run_tex_render(GLcontext *ctx,
/* Put it in the beginning of texture memory */
SINGLE_TEXTURE_PIPELINE.texture_unit[0].offset=rsp->gartTextures.handle;
- /* Fill texture with some random data */
- for(i=0;i<1000;i++)((int *)(rsp->gartTextures.map))[i]=rand();
/* Upload texture, a hack, really we can do a lot better */
#if 0
@@ -628,6 +642,12 @@ reg_start(R300_RS_INTERP_0,7);
r300_render_tex_primitive(rmesa, ctx, start, start + length, prim);
}
+ reg_start(R300_RB3D_DSTCACHE_CTLSTAT,0);
+ e32(0x0000000a);
+
+ reg_start(0x4f18,0);
+ e32(0x00000003);
+
sync_VAP(PASS_PREFIX_VOID);
end_3d(PASS_PREFIX_VOID);