aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_screen.c
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2019-05-27 16:32:40 +0200
committerGert Wollny <[email protected]>2019-06-20 08:50:38 +0200
commit59757dbad68ae51c63bff61277ffdd24a7e85839 (patch)
treef28d768e6cbc765310903f776dec23347ce573f1 /src/gallium/drivers/virgl/virgl_screen.c
parentb79366344929c6e477c64a63f246c6db0766a71c (diff)
virgl: Add tweak to apply a swizzle when drawing/blitting to a emulated BGRA texture
With Qemu this final swizzle is not needed, but with vtest it is, i.e. it depends on how a program using virglrenderer uses the surface that is rendered to, hence a tweak is added. v2: Update description and fix spelling (Emil) v3: Send tweak as binary value instead of using strings (Gurchetan) Reviewed-by: Gurchetan Singh <[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, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c
index 54bde6f1237..e96a10ffbc7 100644
--- a/src/gallium/drivers/virgl/virgl_screen.c
+++ b/src/gallium/drivers/virgl/virgl_screen.c
@@ -855,6 +855,7 @@ virgl_create_screen(struct virgl_winsys *vws, const struct pipe_screen_config *c
struct virgl_screen *screen = CALLOC_STRUCT(virgl_screen);
const char *VIRGL_GLES_EMULATE_BGRA = "gles_emulate_bgra";
+ const char *VIRGL_GLES_APPLY_BGRA_DEST_SWIZZLE = "gles_apply_bgra_dest_swizzle";
if (!screen)
return NULL;
@@ -863,6 +864,8 @@ virgl_create_screen(struct virgl_winsys *vws, const struct pipe_screen_config *c
if (config && config->options) {
screen->tweak_gles_emulate_bgra =
driQueryOptionb(config->options, VIRGL_GLES_EMULATE_BGRA);
+ screen->tweak_gles_apply_bgra_dest_swizzle =
+ driQueryOptionb(config->options, VIRGL_GLES_APPLY_BGRA_DEST_SWIZZLE);
}
screen->vws = vws;
screen->base.get_name = virgl_get_name;