summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2019-02-14 15:21:30 +0100
committerGert Wollny <[email protected]>2019-02-22 10:44:08 +0100
commit2ee197d6e84aa37638d423363aca183952816067 (patch)
tree66fac25178bc4ba52255b26f5d71c11fe51d771f /src
parent338dacc3415dc6a11040aa68c17db1213738d911 (diff)
virgl: Enable mixed color FBO attachemnets only when the host supports
it Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Elie Tournier <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/virgl/virgl_hw.h1
-rw-r--r--src/gallium/drivers/virgl/virgl_screen.c2
2 files changed, 2 insertions, 1 deletions
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: