Mesa (nvfx-next-7j): nvfx: mostly fix inline corruption magically
Luca Barbieri
lb at kemper.freedesktop.org
Thu Aug 19 21:53:01 UTC 2010
Module: Mesa
Branch: nvfx-next-7j
Commit: 50c1c5bcd7999be8e4ae5ac0e61f492c9ee29971
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=50c1c5bcd7999be8e4ae5ac0e61f492c9ee29971
Author: Luca Barbieri <luca at luca-barbieri.com>
Date: Thu Aug 19 22:36:00 2010 +0200
nvfx: mostly fix inline corruption magically
Not sure why this mostly works.
---
src/gallium/drivers/nvfx/nvfx_push.c | 10 +++++++++-
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 46e6242..a6e9d16 100644
--- a/src/gallium/drivers/nvfx/nvfx_push.c
+++ b/src/gallium/drivers/nvfx/nvfx_push.c
@@ -278,7 +278,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 */
@@ -399,6 +399,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);
More information about the mesa-commit
mailing list