diff options
author | Ben Skeggs <[email protected]> | 2011-06-21 12:55:01 +1000 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2011-06-21 12:59:53 +1000 |
commit | 4112ca54e3769ca2ceeb4d82a4e2bc3dc52cc134 (patch) | |
tree | 32b94eb00e1231e54c5eef13973afdaded64be7d /src/gallium/drivers/nvfx/nvfx_context.c | |
parent | 75be6b76eef00352195220a4beefbc7ca0b76453 (diff) |
nvfx: nasty hack to make glFinish() actually finish..
Signed-off-by: Ben Skeggs <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_context.c')
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_context.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_context.c b/src/gallium/drivers/nvfx/nvfx_context.c index 2b1510264a1..98603bedde1 100644 --- a/src/gallium/drivers/nvfx/nvfx_context.c +++ b/src/gallium/drivers/nvfx/nvfx_context.c @@ -24,9 +24,21 @@ nvfx_flush(struct pipe_context *pipe, OUT_RING(chan, 1); }*/ - FIRE_RING(chan); - if (fence) + if (fence) { + /* horrific hack to make glFinish() work in the absence of + * having proper fences in nvfx. a pending rewrite will + * fix this properly, but may be a while off. + */ + MARK_RING(chan, 1, 1); + OUT_RELOC(chan, screen->fence, 0, NOUVEAU_BO_WR | + NOUVEAU_BO_DUMMY, 0, 0); + FIRE_RING(chan); + nouveau_bo_map(screen->fence, NOUVEAU_BO_RDWR); + nouveau_bo_unmap(screen->fence); *fence = NULL; + } else { + FIRE_RING(chan); + } } static void |