diff options
author | Thomas Hellstrom <[email protected]> | 2018-04-12 14:41:47 +0200 |
---|---|---|
committer | Juan A. Suarez Romero <[email protected]> | 2018-04-23 09:56:53 +0000 |
commit | 279c6285607f2a02b29ed73b98fd20a6829acbde (patch) | |
tree | 36c49dd317928e3e03c0fbe04ee2c1326867bb05 | |
parent | e7709adf7a7d4118263b0185502a52be51982618 (diff) |
svga: Fix incorrect advertizing of EGL_KHR_gl_colorspace
When advertizing this extension, egl_dri2 uses the DRI2_RENDERER_QUERY
extension to query whether an sRGB format is supported. That extension will
query our driver with the BIND flag PIPE_BIND_RENDER_TARGET rather than
PIPE_BIND_DISPLAY_TARGET which is used when building the configs.
We only return the correct value for PIPE_BIND_DISPLAY_TARGET.
The inconsistency causes EGL to crash at surface initialization if sRGB is
not supported. Fix this by supporting both bind flags.
Testing done:
piglit egl_gl_colorspace srgb
Cc: <[email protected]>
Signed-off-by: Thomas Hellstrom <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Charmaine Lee <[email protected]>
(cherry picked from commit e0c08183fb20399128ff363467e00aa1e8767886)
-rw-r--r-- | src/gallium/drivers/svga/svga_format.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_format.c b/src/gallium/drivers/svga/svga_format.c index 964923f084e..eb56de7cfd5 100644 --- a/src/gallium/drivers/svga/svga_format.c +++ b/src/gallium/drivers/svga/svga_format.c @@ -2106,7 +2106,7 @@ svga_is_format_supported(struct pipe_screen *screen, if (!ss->sws->have_vgpu10 && util_format_is_srgb(format) && - (bindings & PIPE_BIND_DISPLAY_TARGET)) { + (bindings & (PIPE_BIND_DISPLAY_TARGET | PIPE_BIND_RENDER_TARGET))) { /* We only support sRGB rendering with vgpu10 */ return FALSE; } |