summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_screen.c
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2019-03-27 09:07:36 +0100
committerGert Wollny <[email protected]>2019-03-29 07:55:31 +0000
commita0edceb00dbe4771267615593f416a0dc9ccd52a (patch)
treed3646bfecb542b9c53353c234f2c645c714b9bfb /src/gallium/drivers/virgl/virgl_screen.c
parent62a9d757e6074215c145c9637014d9acb16d865d (diff)
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 <[email protected]> Reviewed-by: Pohsien Wang <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_screen.c')
-rw-r--r--src/gallium/drivers/virgl/virgl_screen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c
index 1ad8863bfca..33ebd9324f5 100644
--- a/src/gallium/drivers/virgl/virgl_screen.c
+++ b/src/gallium/drivers/virgl/virgl_screen.c
@@ -144,7 +144,8 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_VERTEX_COLOR_CLAMPED:
return vscreen->caps.caps.v1.bset.color_clamping;
case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
- return vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_FBO_MIXED_COLOR_FORMATS;
+ return (vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_FBO_MIXED_COLOR_FORMATS) ||
+ (vscreen->caps.caps.v2.host_feature_check_version < 1);
case PIPE_CAP_GLSL_FEATURE_LEVEL:
return vscreen->caps.caps.v1.glsl_level;
case PIPE_CAP_GLSL_FEATURE_LEVEL_COMPATIBILITY: