Mesa (master): gallium: add PIPE_CAP_PREFER_COMPUTE_BLIT_FOR_MULTIMEDIA

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 24 19:48:07 UTC 2019


Module: Mesa
Branch: master
Commit: 7fc3d21646ca1ad37eae61363b418bdab55cb599
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7fc3d21646ca1ad37eae61363b418bdab55cb599

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Thu Apr 18 17:01:52 2019 -0400

gallium: add PIPE_CAP_PREFER_COMPUTE_BLIT_FOR_MULTIMEDIA

---

 src/gallium/auxiliary/util/u_screen.c | 1 +
 src/gallium/docs/source/screen.rst    | 2 ++
 src/gallium/drivers/radeonsi/si_get.c | 1 +
 src/gallium/include/pipe/p_defines.h  | 1 +
 4 files changed, 5 insertions(+)

diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c
index 384e0ac5db6..27f51e0898e 100644
--- a/src/gallium/auxiliary/util/u_screen.c
+++ b/src/gallium/auxiliary/util/u_screen.c
@@ -325,6 +325,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
    case PIPE_CAP_TGSI_ATOMFADD:
    case PIPE_CAP_TGSI_SKIP_SHRINK_IO_ARRAYS:
    case PIPE_CAP_IMAGE_LOAD_FORMATTED:
+   case PIPE_CAP_PREFER_COMPUTE_BLIT_FOR_MULTIMEDIA:
       return 0;
 
    case PIPE_CAP_MAX_GS_INVOCATIONS:
diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
index f2fa7856ad2..57554d0681d 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -521,6 +521,8 @@ The integer capabilities:
   execution. 0 = throttling is disabled.
 * ``PIPE_CAP_DMABUF``: Whether Linux DMABUF handles are supported by
   resource_from_handle and resource_get_handle.
+* ``PIPE_CAP_PREFER_COMPUTE_BLIT_FOR_MULTIMEDIA``: Whether VDPAU, VAAPI, and
+  OpenMAX should use a compute-based blit instead of pipe_context::blit.
 
 .. _pipe_capf:
 
diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c
index eddb383c270..bbaf6fee09c 100644
--- a/src/gallium/drivers/radeonsi/si_get.c
+++ b/src/gallium/drivers/radeonsi/si_get.c
@@ -155,6 +155,7 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
 	case PIPE_CAP_TGSI_FS_FBFETCH:
 	case PIPE_CAP_COMPUTE_GRID_INFO_LAST_BLOCK:
 	case PIPE_CAP_IMAGE_LOAD_FORMATTED:
+	case PIPE_CAP_PREFER_COMPUTE_BLIT_FOR_MULTIMEDIA:
 		return 1;
 
 	case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 27118dbe4e8..672a2ea7378 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -882,6 +882,7 @@ enum pipe_cap
    PIPE_CAP_IMAGE_LOAD_FORMATTED,
    PIPE_CAP_MAX_FRAMES_IN_FLIGHT,
    PIPE_CAP_DMABUF,
+   PIPE_CAP_PREFER_COMPUTE_BLIT_FOR_MULTIMEDIA,
 };
 
 /**




More information about the mesa-commit mailing list