From 7e02303497237cde958c28608477d0c355a8038b Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 8 Mar 2011 00:57:48 +0100 Subject: gallium: remove flags from the flush function The drivers have been changed so that they behave as if all of the flags were set. This is already implicit in most hardware drivers and required for multiple contexts. Some state trackers were also abusing the PIPE_FLUSH_RENDER_CACHE flag to decide whether flush_frontbuffer should be called. New flag ST_FLUSH_FRONT has been added to st_api.h as a replacement. --- src/gallium/drivers/nvfx/nvfx_context.c | 7 ++++--- src/gallium/drivers/nvfx/nvfx_state_emit.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/gallium/drivers/nvfx') diff --git a/src/gallium/drivers/nvfx/nvfx_context.c b/src/gallium/drivers/nvfx/nvfx_context.c index 6c8934d3a4..2bcb93d93e 100644 --- a/src/gallium/drivers/nvfx/nvfx_context.c +++ b/src/gallium/drivers/nvfx/nvfx_context.c @@ -7,7 +7,7 @@ #include "nvfx_resource.h" static void -nvfx_flush(struct pipe_context *pipe, unsigned flags, +nvfx_flush(struct pipe_context *pipe, struct pipe_fence_handle **fence) { struct nvfx_context *nvfx = nvfx_context(pipe); @@ -16,12 +16,13 @@ nvfx_flush(struct pipe_context *pipe, unsigned flags, struct nouveau_grobj *eng3d = screen->eng3d; /* XXX: we need to actually be intelligent here */ - if (flags & PIPE_FLUSH_TEXTURE_CACHE) { + /* XXX This flag wasn't set by the state tracker anyway. */ + /*if (flags & PIPE_FLUSH_TEXTURE_CACHE) { BEGIN_RING(chan, eng3d, 0x1fd8, 1); OUT_RING(chan, 2); BEGIN_RING(chan, eng3d, 0x1fd8, 1); OUT_RING(chan, 1); - } + }*/ FIRE_RING(chan); if (fence) diff --git a/src/gallium/drivers/nvfx/nvfx_state_emit.c b/src/gallium/drivers/nvfx/nvfx_state_emit.c index 40ae4f5bd2..ae9c31418c 100644 --- a/src/gallium/drivers/nvfx/nvfx_state_emit.c +++ b/src/gallium/drivers/nvfx/nvfx_state_emit.c @@ -426,7 +426,7 @@ nvfx_state_validate_swtnl(struct nvfx_context *nvfx) NOUVEAU_ERR("hw->swtnl 0x%08x\n", nvfx->fallback_swtnl); warned = TRUE; } - nvfx->pipe.flush(&nvfx->pipe, 0, NULL); + nvfx->pipe.flush(&nvfx->pipe, NULL); nvfx->dirty |= (NVFX_NEW_VIEWPORT | NVFX_NEW_VERTPROG | NVFX_NEW_ARRAYS); -- cgit v1.2.3