From: Marek Olšák Date: Tue, 2 May 2017 23:23:54 +0000 (+0200) Subject: gallium/radeon: require both WRITE and FLUSH_EXPLICIT in buffer_flush_region X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=42fe45b45161e9c9d714436923e88e46fdb3614a;p=mesa.git gallium/radeon: require both WRITE and FLUSH_EXPLICIT in buffer_flush_region spotted randomly. Reviewed-by: Nicolai Hähnle Tested-by: Dieter Nützel --- 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);