diff options
author | Marek Olšák <[email protected]> | 2017-08-25 15:34:17 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-08-28 21:45:32 +0200 |
commit | 28c4c55810bea494c94e02c6a54757803985655d (patch) | |
tree | 869d6318efb7db01430be07c8ebadc29a9a2e413 /src/gallium/auxiliary/util | |
parent | 63e79a8a777b36ecb30a1f6900e6b638cb32fc5f (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_threaded_context.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index cbcd4056b29..8e3cc34f104 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 | |