Module: Mesa Branch: master Commit: 42fe45b45161e9c9d714436923e88e46fdb3614a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=42fe45b45161e9c9d714436923e88e46fdb3614a
Author: Marek Olšák <[email protected]> Date: Wed May 3 01:23:54 2017 +0200 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]> --- 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 b2289e26f7..6a4846add7 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); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
