Mesa (master): Revert "virgl: fix BGRA emulation artifacts during window resize"

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 25 18:08:35 UTC 2021


Module: Mesa
Branch: master
Commit: 6fb66d18bea060151eb0483ae7135489245da910
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6fb66d18bea060151eb0483ae7135489245da910

Author: Ryan Neph <ryanneph at google.com>
Date:   Sat Jan 23 01:02:06 2021 +0000

Revert "virgl: fix BGRA emulation artifacts during window resize"

This reverts commit accc2222174a90fd24ee56ce751feb6022ecc0c7.

The change in accc2222 caused a regression in gameplay for a few valve
games such as Portal 2 where textures were rendered darker than
expected.

Reverting to restore normal gameplay at the smaller cost of
re-introducing the issue described in !8119.

Fixes: accc2222 ("virgl: fix BGRA emulation artifacts during window resize")
Signed-off-by: Ryan Neph <ryanneph at google.com>
Reviewed-by: Gert Wollny <gert.wollny at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8664>

---

 src/gallium/drivers/virgl/virgl_screen.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c
index 20d5ac2c759..67fedb7126b 100644
--- a/src/gallium/drivers/virgl/virgl_screen.c
+++ b/src/gallium/drivers/virgl/virgl_screen.c
@@ -874,9 +874,7 @@ virgl_create_screen(struct virgl_winsys *vws, const struct pipe_screen_config *c
    fixup_formats(&screen->caps.caps, &screen->caps.caps.v2.scanout);
 
    union virgl_caps *caps = &screen->caps.caps;
-   bool may_emulate_bgra = (caps->v2.capability_bits & VIRGL_CAP_APP_TWEAK_SUPPORT);
-   screen->tweak_gles_emulate_bgra &= !virgl_format_check_bitmask(
-       PIPE_FORMAT_B8G8R8A8_SRGB, caps->v1.render.bitmask, may_emulate_bgra);
+   screen->tweak_gles_emulate_bgra &= !virgl_format_check_bitmask(PIPE_FORMAT_B8G8R8A8_SRGB, caps->v1.render.bitmask, false);
    screen->refcnt = 1;
 
    slab_create_parent(&screen->transfer_pool, sizeof(struct virgl_transfer), 16);



More information about the mesa-commit mailing list