summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_screen.c
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2019-05-27 16:38:14 +0200
committerGert Wollny <[email protected]>2019-06-20 08:50:38 +0200
commit5dbecf7863d4f29277773bd07ba68e1c858494b0 (patch)
treeeddeb4b96a5336ce23c93031bb00496f77077800 /src/gallium/drivers/virgl/virgl_screen.c
parent59757dbad68ae51c63bff61277ffdd24a7e85839 (diff)
virgl: Add a tweak to set the value for emulated queries of GL_SAMPLES_PASSED
On GLES hosts GL_SAMPLES_PASSED is emulated by GL_ANY_SAMPLES_PASSED which returns a boolen. With this tweak the value that is returned if any sample passed can be set. This may be of iterest when an application decides whether some geometry is rendered based on an amount of visibility and not just a binary desicion. virgelrenderer sets a default of 1024 on th host. v2: Remove reference from virgl and correct description (Emil) v3: Send the tweak binary encoded instead of using strings (Gurchetan) Signed-off-by: Gert Wollny <[email protected]> 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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c
index e96a10ffbc7..be684dbf3c1 100644
--- a/src/gallium/drivers/virgl/virgl_screen.c
+++ b/src/gallium/drivers/virgl/virgl_screen.c
@@ -856,6 +856,8 @@ virgl_create_screen(struct virgl_winsys *vws, const struct pipe_screen_config *c
const char *VIRGL_GLES_EMULATE_BGRA = "gles_emulate_bgra";
const char *VIRGL_GLES_APPLY_BGRA_DEST_SWIZZLE = "gles_apply_bgra_dest_swizzle";
+ const char *VIRGL_GLES_SAMPLES_PASSED_VALUE = "gles_samples_passed_value";
+
if (!screen)
return NULL;
@@ -866,7 +868,10 @@ virgl_create_screen(struct virgl_winsys *vws, const struct pipe_screen_config *c
driQueryOptionb(config->options, VIRGL_GLES_EMULATE_BGRA);
screen->tweak_gles_apply_bgra_dest_swizzle =
driQueryOptionb(config->options, VIRGL_GLES_APPLY_BGRA_DEST_SWIZZLE);
+ screen->tweak_gles_tf3_value =
+ driQueryOptioni(config->options, VIRGL_GLES_SAMPLES_PASSED_VALUE);
}
+
screen->vws = vws;
screen->base.get_name = virgl_get_name;
screen->base.get_vendor = virgl_get_vendor;