diff options
author | James Xiong <[email protected]> | 2020-01-22 15:52:25 -0800 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-06 00:43:58 +0000 |
commit | 205ce0bea5e14a855a86f8b9662ba34cdd372280 (patch) | |
tree | 6fd4ca7e8454a820a4a83b41b5339ac9cb150406 | |
parent | d8569baaed1a38cf3da9e45375fa2267d9a1eeb0 (diff) |
gallium: let the pipe drivers decide the supported modifiers
fixes: ac0219cc5b ("gallium: dmabuf support for yuv formats that are not natively supported")
Signed-off-by: James Xiong <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3527>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3527>
-rw-r--r-- | src/gallium/state_trackers/dri/dri2.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 05ebb4ef1d7..8b4402a74aa 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/gallium/state_trackers/dri/dri2.c @@ -1395,15 +1395,11 @@ dri2_query_dma_buf_modifiers(__DRIscreen *_screen, int fourcc, int max, (pscreen->is_format_supported(pscreen, format, screen->target, 0, 0, PIPE_BIND_RENDER_TARGET) || pscreen->is_format_supported(pscreen, format, screen->target, 0, 0, - PIPE_BIND_SAMPLER_VIEW))) { + PIPE_BIND_SAMPLER_VIEW) || + dri2_yuv_dma_buf_supported(screen, map))) { pscreen->query_dmabuf_modifiers(pscreen, format, max, modifiers, external_only, count); return true; - } else if (dri2_yuv_dma_buf_supported(screen, map)) { - *count = 1; - if (modifiers) - modifiers[0] = DRM_FORMAT_MOD_NONE; - return true; } return false; } |