summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2009-10-02 18:13:26 +0200
committerMichel Dänzer <[email protected]>2009-10-02 18:13:26 +0200
commit47e41b024e325f69ed514e551a6824afa58f1db6 (patch)
tree5b98f65f5d67e2a1a450ad681bc64bf229a198d2 /src/mesa/state_tracker
parent7d4b348c67dbc2eff1d7dd0c043a76bc0eae57ab (diff)
gallium: Preparations for adding more PIPE_TRANSFER_* usage flags.
Always test for PIPE_TRANSFER_READ/WRITE using the bit-wise and operator, and add a pipe_transfer_buffer_flags() helper for getting the buffer usage flags corresponding to them.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_accum.c2
-rw-r--r--src/mesa/state_tracker/st_texture.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_cb_accum.c b/src/mesa/state_tracker/st_cb_accum.c
index 95181578f63..3d1d0f71d53 100644
--- a/src/mesa/state_tracker/st_cb_accum.c
+++ b/src/mesa/state_tracker/st_cb_accum.c
@@ -241,7 +241,7 @@ accum_return(GLcontext *ctx, GLfloat value,
xpos, ypos,
width, height);
- if (usage != PIPE_TRANSFER_WRITE)
+ if (usage & PIPE_TRANSFER_READ)
pipe_get_tile_rgba(color_trans, 0, 0, width, height, buf);
switch (acc_strb->format) {
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index bbc2830e694..ba8d1e8cc16 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -577,7 +577,6 @@ st_teximage_flush_before_map(struct st_context *st,
pipe->is_texture_referenced(pipe, pt, face, level);
if (referenced && ((referenced & PIPE_REFERENCED_FOR_WRITE) ||
- usage == PIPE_TRANSFER_WRITE ||
- usage == PIPE_TRANSFER_READ_WRITE))
+ (usage & PIPE_TRANSFER_WRITE)))
st_flush(st, PIPE_FLUSH_RENDER_CACHE, NULL);
}