From e721f4c8f1474371cb408cc7c14b659afc6be165 Mon Sep 17 00:00:00 2001 From: Ryan Neph Date: Sat, 23 Jan 2021 01:02:06 +0000 Subject: [PATCH] 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 Reviewed-by: Gert Wollny Part-of: (cherry picked from commit 6fb66d18bea060151eb0483ae7135489245da910) --- .pick_status.json | 2 +- src/gallium/drivers/virgl/virgl_screen.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 903c2613b39..cfa948022f8 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -481,7 +481,7 @@ "description": "Revert \"virgl: fix BGRA emulation artifacts during window resize\"", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "accc2222174a90fd24ee56ce751feb6022ecc0c7" }, 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);