From 2ee197d6e84aa37638d423363aca183952816067 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Thu, 14 Feb 2019 15:21:30 +0100 Subject: virgl: Enable mixed color FBO attachemnets only when the host supports it Signed-off-by: Gert Wollny Reviewed-by: Elie Tournier --- src/gallium/drivers/virgl/virgl_hw.h | 1 + src/gallium/drivers/virgl/virgl_screen.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gallium') diff --git a/src/gallium/drivers/virgl/virgl_hw.h b/src/gallium/drivers/virgl/virgl_hw.h index fec9ce857d7..741b0f2e8ec 100644 --- a/src/gallium/drivers/virgl/virgl_hw.h +++ b/src/gallium/drivers/virgl/virgl_hw.h @@ -235,6 +235,7 @@ enum virgl_formats { #define VIRGL_CAP_SRGB_WRITE_CONTROL (1 << 15) #define VIRGL_CAP_QBO (1 << 16) #define VIRGL_CAP_TRANSFER (1 << 17) +#define VIRGL_CAP_FBO_MIXED_COLOR_FORMATS (1 << 18) /* virgl bind flags - these are compatible with mesa 10.5 gallium. * but are fixed, no other should be passed to virgl either. diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c index 6cc73538a36..b290d7d149f 100644 --- a/src/gallium/drivers/virgl/virgl_screen.c +++ b/src/gallium/drivers/virgl/virgl_screen.c @@ -144,7 +144,7 @@ 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 1; + return vscreen->caps.caps.v2.capability_bits & VIRGL_CAP_FBO_MIXED_COLOR_FORMATS; case PIPE_CAP_GLSL_FEATURE_LEVEL: return vscreen->caps.caps.v1.glsl_level; case PIPE_CAP_GLSL_FEATURE_LEVEL_COMPATIBILITY: -- cgit v1.2.3