virgl: Add a caps feature check version
authorGert Wollny <gert.wollny@collabora.com>
Wed, 27 Mar 2019 08:07:36 +0000 (09:07 +0100)
committerGert Wollny <gw.fossdev@gmail.com>
Fri, 29 Mar 2019 07:55:31 +0000 (07:55 +0000)
commita0edceb00dbe4771267615593f416a0dc9ccd52a
treed3646bfecb542b9c53353c234f2c645c714b9bfb
parent62a9d757e6074215c145c9637014d9acb16d865d
virgl: Add a caps feature check version

When we add new feature checks on the host side that is used to
enable a cap conditionally that was enabled unconditionally before
we might end up with a feature regression when a new mesa version
is used with an old virglrenderer version that doesn't check for
that cap.

To work around this problem add a version id to the caps that corresponds
to the features that are actually checked on the host and check that
version too when enabling the cap.

Fixes: 2ee197d6e84aa37638d423363aca183952816067
    virgl: Enable mixed color FBO attachemnets only when the host supports it

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Pohsien Wang <pwang@chromium.org>
src/gallium/drivers/virgl/virgl_hw.h
src/gallium/drivers/virgl/virgl_screen.c
src/gallium/drivers/virgl/virgl_winsys.h