diff options
author | Gert Wollny <[email protected]> | 2019-05-27 16:38:14 +0200 |
---|---|---|
committer | Gert Wollny <[email protected]> | 2019-06-20 08:50:38 +0200 |
commit | 5dbecf7863d4f29277773bd07ba68e1c858494b0 (patch) | |
tree | eddeb4b96a5336ce23c93031bb00496f77077800 /src/gallium/drivers/virgl/virgl_context.c | |
parent | 59757dbad68ae51c63bff61277ffdd24a7e85839 (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_context.c')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_context.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c index 5f643788664..987cdc38be2 100644 --- a/src/gallium/drivers/virgl/virgl_context.c +++ b/src/gallium/drivers/virgl/virgl_context.c @@ -1409,6 +1409,10 @@ static void virgl_send_tweaks(struct virgl_context *vctx, struct virgl_screen *r if (rs->tweak_gles_apply_bgra_dest_swizzle) virgl_encode_tweak(vctx, virgl_tweak_gles_brga_apply_dest_swizzle, 1); + + if (rs->tweak_gles_tf3_value > 0) + virgl_encode_tweak(vctx, virgl_tweak_gles_tf3_samples_passes_multiplier, + rs->tweak_gles_tf3_value); } struct pipe_context *virgl_context_create(struct pipe_screen *pscreen, |