diff options
author | Marek Olšák <[email protected]> | 2017-09-27 16:53:26 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-09-27 17:59:50 +0200 |
commit | a65db0ad1c3ace58fbc81b6860e28c0a7645257c (patch) | |
tree | 5238972b80b64a68c2a7b446ce0d9d5a9126bdc6 /src/gallium/state_trackers | |
parent | 4fe3913b9699ac929715b16ecbf5b93fe87ce4ee (diff) |
st/dri: don't expose modifiers in EGL if the driver doesn't implement them
This unbreaks waffle/gbm (piglit/gbm) which fails initialization.
v2: also don't set queryDmaBufFormats
Reviewed-by: Daniel Stone <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/dri/dri2.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 1e8bb481044..86721747878 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/gallium/state_trackers/dri/dri2.c @@ -1996,9 +1996,11 @@ dri2_init_screen(__DRIscreen * sPriv) dri2ImageExtension.createImageFromFds = dri2_from_fds; dri2ImageExtension.createImageFromDmaBufs = dri2_from_dma_bufs; dri2ImageExtension.createImageFromDmaBufs2 = dri2_from_dma_bufs2; - dri2ImageExtension.queryDmaBufFormats = dri2_query_dma_buf_formats; - dri2ImageExtension.queryDmaBufModifiers = - dri2_query_dma_buf_modifiers; + if (pscreen->query_dmabuf_modifiers) { + dri2ImageExtension.queryDmaBufFormats = dri2_query_dma_buf_formats; + dri2ImageExtension.queryDmaBufModifiers = + dri2_query_dma_buf_modifiers; + } } } |