From 42fe45b45161e9c9d714436923e88e46fdb3614a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 3 May 2017 01:23:54 +0200 Subject: [PATCH] gallium/radeon: require both WRITE and FLUSH_EXPLICIT in buffer_flush_region MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit spotted randomly. Reviewed-by: Nicolai Hähnle Tested-by: Dieter Nützel --- src/gallium/drivers/radeon/r600_buffer_common.c | 6 ++++-- 1 file 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); -- 2.30.2