vrend: assume gl_colorspace also when no context type is set

when virgl_renderer_init is called from qemu for initializing D-GL
no context type flags are set and the context remains at NONE.
Assume in this case that gl_colorspace is true, otherwise the
feat_srgb_write_control flag will be cleared and the guest only
gets OpenGL 2.1 compatibility.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Gert Wollny 6 years ago committed by Dave Airlie
parent acc261b06b
commit b4d4a9b2eb
  1. 3
      src/virglrenderer.c

@ -208,7 +208,8 @@ int virgl_has_gl_colorspace(void)
if (egl_info)
egl_colorspace = virgl_has_egl_khr_gl_colorspace(egl_info);
#endif
return use_context == CONTEXT_GLX ||
return use_context == CONTEXT_NONE ||
use_context == CONTEXT_GLX ||
(use_context == CONTEXT_EGL && egl_colorspace);
}

Loading…
Cancel
Save