summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_accum.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-05-11 13:57:11 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-05-11 14:00:01 +0100
commitb0427bedde80e3189524651a327235bdfddbc613 (patch)
treec41db798d6d4bbcbb7e07f20a39f828baa6df8d4 /src/mesa/state_tracker/st_cb_accum.c
parentd99a7497ed383e0d7872b95f2aa63eff916680ea (diff)
mesa/st: Remove internal flushes from Mesa state tracker.
Now that transfers are context operations it is the driver's responsibility to ensure that transfers happen in order with all other context operations, so flushes and finishes inside Mesa should be no longer necessary. The attached patch implements that. This should proportionate significant improvements for hardware drivers which are able to stream transfers in the command buffers. You can use the softpipe/llvmpipe_flush_resource() as reference implementation of the worst case scenario, where the driver is not able to streamline transfers. But the expectation is that driver implementators will want to avoid flushing as much as possible.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_accum.c')
-rw-r--r--src/mesa/state_tracker/st_cb_accum.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_cb_accum.c b/src/mesa/state_tracker/st_cb_accum.c
index 0101837f99..ded0ba9c6a 100644
--- a/src/mesa/state_tracker/st_cb_accum.c
+++ b/src/mesa/state_tracker/st_cb_accum.c
@@ -39,7 +39,6 @@
#include "st_cb_accum.h"
#include "st_cb_fbo.h"
#include "st_texture.h"
-#include "st_inlines.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "util/u_inlines.h"
@@ -136,7 +135,7 @@ accum_accum(struct st_context *st, GLfloat value,
if (ST_DEBUG & DEBUG_FALLBACK)
debug_printf("%s: fallback processing\n", __FUNCTION__);
- color_trans = st_cond_flush_get_tex_transfer(st,
+ color_trans = pipe_get_transfer(st->pipe,
color_strb->texture,
0, 0, 0,
PIPE_TRANSFER_READ, xpos, ypos,
@@ -185,7 +184,7 @@ accum_load(struct st_context *st, GLfloat value,
if (ST_DEBUG & DEBUG_FALLBACK)
debug_printf("%s: fallback processing\n", __FUNCTION__);
- color_trans = st_cond_flush_get_tex_transfer(st, color_strb->texture,
+ color_trans = pipe_get_transfer(st->pipe, color_strb->texture,
0, 0, 0,
PIPE_TRANSFER_READ, xpos, ypos,
width, height);
@@ -241,7 +240,7 @@ accum_return(GLcontext *ctx, GLfloat value,
else
usage = PIPE_TRANSFER_WRITE;
- color_trans = st_cond_flush_get_tex_transfer(st_context(ctx),
+ color_trans = pipe_get_transfer(st_context(ctx)->pipe,
color_strb->texture, 0, 0, 0,
usage,
xpos, ypos,
@@ -301,9 +300,6 @@ st_Accum(GLcontext *ctx, GLenum op, GLfloat value)
if(!acc_strb->data)
return;
- /* make sure color bufs aren't cached */
- st_flush( st, PIPE_FLUSH_RENDER_CACHE, NULL );
-
switch (op) {
case GL_ADD:
if (value != 0.0F) {