Module: Mesa Branch: master Commit: 28c4c55810bea494c94e02c6a54757803985655d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=28c4c55810bea494c94e02c6a54757803985655d
Author: Marek Olšák <marek.ol...@amd.com> Date: Fri Aug 25 15:34:17 2017 +0200 gallium/u_threaded: disallow discard_range if map_buffer is unsynchronized The discard range codepath takes precedence, so if we get both unsynchronized and discard_range, choose unsynchronized. Reviewed-by: Nicolai Hähnle <nicolai.haeh...@amd.com> --- src/gallium/auxiliary/util/u_threaded_context.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index cbcd4056b2..8e3cc34f10 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -1337,8 +1337,10 @@ tc_improve_map_buffer_flags(struct threaded_context *tc, usage &= ~PIPE_TRANSFER_DISCARD_RANGE; /* Unsychronized buffer mappings don't have to synchronize the thread. */ - if (usage & PIPE_TRANSFER_UNSYNCHRONIZED) + if (usage & PIPE_TRANSFER_UNSYNCHRONIZED) { + usage &= ~PIPE_TRANSFER_DISCARD_RANGE; usage |= TC_TRANSFER_MAP_THREADED_UNSYNC; /* notify the driver */ + } /* Never invalidate inside the driver and never infer "unsynchronized". */ return usage | _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit