summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvfx/nvfx_push.c
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-08-19 22:36:00 +0200
committerLuca Barbieri <[email protected]>2010-08-21 20:42:15 +0200
commit1dea9bc369dea1215c9e10bf6d52507e618d11ca (patch)
tree8521088a81e554267300b39662afec1db22bcb58 /src/gallium/drivers/nvfx/nvfx_push.c
parented232adc80867a424978396e047f146cb94a1cc5 (diff)
nvfx: mostly fix inline corruption magically
Not sure why this mostly works.
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_push.c')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_push.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_push.c b/src/gallium/drivers/nvfx/nvfx_push.c
index 52e891c6678..49d518e2eb9 100644
--- a/src/gallium/drivers/nvfx/nvfx_push.c
+++ b/src/gallium/drivers/nvfx/nvfx_push.c
@@ -246,7 +246,7 @@ nvfx_push_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
uint8_t* map;
unsigned step;
} per_instance[16];
- unsigned p_overhead = 0
+ unsigned p_overhead = 64 /* magic fix */
+ 4 /* begin/end */
+ 4; /* potential edgeflag enable/disable */
@@ -367,6 +367,14 @@ nvfx_push_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
if(max_verts >= 16)
{
+ /* XXX: any command a lot of times seems to (mostly) fix corruption that would otherwise happen */
+ int i;
+ for(i = 0; i < 32; ++i)
+ {
+ OUT_RING(chan, RING_3D(0x1dac, 1));
+ OUT_RING(chan, 0);
+ }
+
OUT_RING(chan, RING_3D(NV34TCL_VERTEX_BEGIN_END, 1));
OUT_RING(chan, hw_mode);
done = util_split_prim_next(&s, max_verts);