summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_screen.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@collabora.com>2022-10-28 22:46:19 -0400
committerAlyssa Rosenzweig <alyssa@collabora.com>2022-10-31 23:35:33 -0400
commitfda7d17e81e91d75e6bd10b633d4c767d13fc6c0 (patch)
tree0179000a7e905010eeb63bf875646c7f5342f0da /src/gallium/auxiliary/util/u_screen.c
parent614a8502a85010012cb199c853adc356a8eb7770 (diff)
gallium: Default to PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT
Supported in all hardware and software drivers. Only that don't support are virgl and svga, depending on host capabilities. I don't think there's anything to be done there. This does give fewer places to screw up the CAPs, though, because everyone wants ARB_buffer_storage. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Emma Anholt <emma@anholt.net> Reviewed-by: Marek Ol<C5><A1><C3><A1>k <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19392>
Diffstat (limited to 'src/gallium/auxiliary/util/u_screen.c')
-rw-r--r--src/gallium/auxiliary/util/u_screen.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c
index 063651fa530..1d40692bd26 100644
--- a/src/gallium/auxiliary/util/u_screen.c
+++ b/src/gallium/auxiliary/util/u_screen.c
@@ -185,7 +185,15 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS:
case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS: /* Enables ARB_texture_gather */
case PIPE_CAP_TEXTURE_GATHER_SM5:
+ return 0;
+
+ /* All new drivers should support persistent/coherent mappings. This CAP
+ * should only be unset by layered drivers whose host drivers cannot support
+ * coherent mappings.
+ */
case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
+ return 1;
+
case PIPE_CAP_FAKE_SW_MSAA:
case PIPE_CAP_TEXTURE_QUERY_LOD:
return 0;