gallium: add PIPE_CAP_SYSTEM_SVM
authorKarol Herbst <kherbst@redhat.com>
Thu, 13 Dec 2018 23:33:04 +0000 (00:33 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 15 Apr 2020 11:08:13 +0000 (11:08 +0000)
v2: split enum in specific caps to abstract the CL enum
v3: remove BUFFER_SVM caps

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2076>

src/gallium/auxiliary/util/u_screen.c
src/gallium/docs/source/screen.rst
src/gallium/include/pipe/p_defines.h

index c6795ac260e4aba99c9dc35ac398f65ab0d5e38e..98418b32e09e70b8934eb8134e17f1e89b6686d6 100644 (file)
@@ -426,6 +426,9 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
    case PIPE_CAP_GL_BEGIN_END_BUFFER_SIZE:
       return 512 * 1024;
 
+   case PIPE_CAP_SYSTEM_SVM:
+      return 0;
+
    default:
       unreachable("bad PIPE_CAP_*");
    }
index 520563a6a33d32e9a2199193e22a6071d037659a..567e76cfd802e9787cadacaeffb50793c3391394 100644 (file)
@@ -574,6 +574,7 @@ The integer capabilities:
 * ``PIPE_CAP_DRAW_INFO_START_WITH_USER_INDICES``: pipe_draw_info::start can be non-zero with user indices.
 * ``PIPE_CAP_GL_BEGIN_END_BUFFER_SIZE``: Buffer size used to upload vertices for glBegin/glEnd.
 * ``PIPE_CAP_VIEWPORT_SWIZZLE``: Whether pipe_viewport_state::swizzle can be used to specify pre-clipping swizzling of coordinates (see GL_NV_viewport_swizzle).
+* ``PIPE_CAP_SYSTEM_SVM``: True if all application memory can be shared with the GPU without explicit mapping.
 
 .. _pipe_capf:
 
index 5fb6fcf3ebd444e26c0090c38f537e264b9b2f8b..477e12175aefbac74b7f4c4cfc1aa0db4c8f3a03 100644 (file)
@@ -935,6 +935,7 @@ enum pipe_cap
    PIPE_CAP_DRAW_INFO_START_WITH_USER_INDICES,
    PIPE_CAP_GL_BEGIN_END_BUFFER_SIZE,
    PIPE_CAP_VIEWPORT_SWIZZLE,
+   PIPE_CAP_SYSTEM_SVM,
 };
 
 /**