summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/virgl/virgl_context.c4
-rw-r--r--src/gallium/drivers/virgl/virgl_driinfo.h.in2
-rw-r--r--src/gallium/drivers/virgl/virgl_protocol.h1
-rw-r--r--src/gallium/drivers/virgl/virgl_screen.c5
-rw-r--r--src/gallium/drivers/virgl/virgl_screen.h1
5 files changed, 12 insertions, 1 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,
diff --git a/src/gallium/drivers/virgl/virgl_driinfo.h.in b/src/gallium/drivers/virgl/virgl_driinfo.h.in
index d6162b3f39a..cbb0bc5a77b 100644
--- a/src/gallium/drivers/virgl/virgl_driinfo.h.in
+++ b/src/gallium/drivers/virgl/virgl_driinfo.h.in
@@ -9,5 +9,5 @@
DRI_CONF_SECTION_MISCELLANEOUS
DRI_CONF_GLES_EMULATE_BGRA("false")
DRI_CONF_GLES_APPLY_BGRA_DEST_SWIZZLE("false")
+ DRI_CONF_GLES_SAMPLES_PASSED_VALUE(int, 1024, "1:400000000")
DRI_CONF_SECTION_END
-
diff --git a/src/gallium/drivers/virgl/virgl_protocol.h b/src/gallium/drivers/virgl/virgl_protocol.h
index 73795a8a7cd..d14caa292b3 100644
--- a/src/gallium/drivers/virgl/virgl_protocol.h
+++ b/src/gallium/drivers/virgl/virgl_protocol.h
@@ -594,6 +594,7 @@ enum virgl_context_cmd {
enum vrend_tweak_type {
virgl_tweak_gles_brga_emulate,
virgl_tweak_gles_brga_apply_dest_swizzle,
+ virgl_tweak_gles_tf3_samples_passes_multiplier,
virgl_tweak_undefined
};
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;
diff --git a/src/gallium/drivers/virgl/virgl_screen.h b/src/gallium/drivers/virgl/virgl_screen.h
index 89b06a25e35..089402d576d 100644
--- a/src/gallium/drivers/virgl/virgl_screen.h
+++ b/src/gallium/drivers/virgl/virgl_screen.h
@@ -48,6 +48,7 @@ struct virgl_screen {
uint32_t sub_ctx_id;
bool tweak_gles_emulate_bgra;
bool tweak_gles_apply_bgra_dest_swizzle;
+ int32_t tweak_gles_tf3_value;
};