From 7fc3d21646ca1ad37eae61363b418bdab55cb599 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 18 Apr 2019 17:01:52 -0400 Subject: [PATCH] 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 384e0ac..27f51e0 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 f2fa785..57554d0 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 eddb383..bbaf6fe 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 27118db..672a2ea 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, }; /** -- 2.7.4