diff options
author | Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> | 2020-10-22 15:46:08 +0200 |
---|---|---|
committer | Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> | 2020-11-17 10:53:06 +0100 |
commit | 68f152cb9a65ab20f03d5efb21d6f7ad3cb16e25 (patch) | |
tree | 4d3265bcac602aa2768a448005db4f9f1baf0b39 /src/gallium/include | |
parent | addfe49fdde0402055b5b9d6f2846cb2f37954af (diff) |
mesa/gallium: add MESA_MAP_ONCE / PIPE_MAP_ONCE
If set, this bit tells the driver that the buffer will only be
mapped once.
radeonsi uses it to disable its "never unmap buffers" optimisations.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3660
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7428>
Diffstat (limited to 'src/gallium/include')
-rw-r--r-- | src/gallium/include/pipe/p_defines.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index efc5bec9740..38bc6fb3cfb 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -363,6 +363,11 @@ enum pipe_map_flags PIPE_MAP_STENCIL_ONLY = 1 << 17, /** + * Mapping will be used only once (never remapped). + */ + PIPE_MAP_ONCE = 1 << 18, + + /** * This and higher bits are reserved for private use by drivers. Drivers * should use this as (PIPE_MAP_DRV_PRV << i). */ |