From: Marek Olšák Date: Thu, 18 Apr 2019 21:01:52 +0000 (-0400) Subject: gallium: add PIPE_CAP_PREFER_COMPUTE_BLIT_FOR_MULTIMEDIA X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7fc3d21646ca1ad37eae61363b418bdab55cb599;p=mesa.git gallium: add PIPE_CAP_PREFER_COMPUTE_BLIT_FOR_MULTIMEDIA --- 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, }; /**