virgl: Assume sRGB write control for older guest kernels or virglrenderer hosts
authorGert Wollny <gert.wollny@collabora.com>
Mon, 17 Jun 2019 06:44:14 +0000 (08:44 +0200)
committerGert Wollny <gw.fossdev@gmail.com>
Mon, 17 Jun 2019 21:16:11 +0000 (21:16 +0000)
commit2b87753a84da7a1bd8a84f26f3cd0e03cc52c930
tree99b0b6c30b258694f3db3b953c351b2ca95278df
parent21c795ab0723cf0595768ea3f2165c10e89fd8c1
virgl: Assume sRGB write control for older guest kernels or virglrenderer hosts

When the host virglrenderer is an older version that doesn't check the sRGB write
control feature, or when the guest kernel doesn't support CAPS v2, then the guest
will only report support for GL 2.1 on a GL 3.3 host, even though it was supporting
3.3 with earlier guest mesa versions.

By also checking the host feature check version this regression can be avoided.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110921
Fixes: 2845939d6a72
   virgl: Set sRGB write control CAP based on host capabilities

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
src/gallium/drivers/virgl/virgl_screen.c