From b4d4a9b2eb1dbbf57793897357d9e88a1797d85f Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 5 Feb 2019 11:12:20 +0100 Subject: [PATCH] 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 Reviewed-by: Elie Tournier Reviewed-by: Gurchetan Singh Signed-off-by: Dave Airlie --- src/virglrenderer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/virglrenderer.c b/src/virglrenderer.c index f7a0899..3695e76 100644 --- a/src/virglrenderer.c +++ b/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); }