summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-05-03 01:23:54 +0200
committerMarek Olšák <[email protected]>2017-05-15 13:01:33 +0200
commit42fe45b45161e9c9d714436923e88e46fdb3614a (patch)
treeecb4724c841e1a2c553f0ab6eb88c20394403e56 /src/gallium
parentb8e552424eed58d95671da3191c7199cf171b3f0 (diff)
gallium/radeon: require both WRITE and FLUSH_EXPLICIT in buffer_flush_region
spotted randomly. Reviewed-by: Nicolai Hähnle <[email protected]> Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeon/r600_buffer_common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
index b2289e26f72..6a4846add78 100644
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/src/gallium/drivers/radeon/r600_buffer_common.c
@@ -482,8 +482,10 @@ static void r600_buffer_flush_region(struct pipe_context *ctx,
struct pipe_transfer *transfer,
const struct pipe_box *rel_box)
{
- if (transfer->usage & (PIPE_TRANSFER_WRITE |
- PIPE_TRANSFER_FLUSH_EXPLICIT)) {
+ unsigned required_usage = PIPE_TRANSFER_WRITE |
+ PIPE_TRANSFER_FLUSH_EXPLICIT;
+
+ if ((transfer->usage & required_usage) == required_usage) {
struct pipe_box box;
u_box_1d(transfer->box.x + rel_box->x, rel_box->width, &box);