aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/00-mesa-defaults.conf
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2019-05-27 16:31:17 +0200
committerGert Wollny <[email protected]>2019-06-20 08:50:38 +0200
commitb79366344929c6e477c64a63f246c6db0766a71c (patch)
treede30a029eddea8e99a5b8d2726ddb7a2ea8f2dc7 /src/util/00-mesa-defaults.conf
parent13d4a34c4463c8c68553b8ce18cb1aa76d567ecb (diff)
virgl: Add driconf tweak for emulating BGRA surfaces on GLES
These tweaks are used to fix rendering issues with Valve games and at least also "The Raven Remastered" when run on a GLES host. v2: Fix type in define and remove virgl from driconf option (Emil) v3: Encode tweak binary instead of using strings (Gurchetan) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Gurchetan Singh <[email protected]>
Diffstat (limited to 'src/util/00-mesa-defaults.conf')
-rw-r--r--src/util/00-mesa-defaults.conf28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf
index e36190f61c8..ae29d8837d5 100644
--- a/src/util/00-mesa-defaults.conf
+++ b/src/util/00-mesa-defaults.conf
@@ -490,4 +490,30 @@ TODO: document the other workarounds.
<option name="radeonsi_prim_restart_tri_strips_only" value="true"/>
</application>
</device>
- </driconf>
+ <device driver="virtio_gpu">
+ <!-- Some Valve games do a final blit to a BRGA_sRGB surface. On a GLES
+ host this format is not supported and the blit will go to BGRA_UNORM
+ resulting in an unintended linearization and the final output being
+ too dark. -->
+ <application name="Half Life 2" executable="hl2_linux">
+ <option name="gles_emulate_bgra" value="true" />
+ </application>
+ <application name="Portal" executable="hl2_linux">
+ <option name="gles_emulate_bgra" value="true" />
+ </application>
+ <application name="Left 4 Dead 2" executable="hl2_linux">
+ <option name="gles_emulate_bgra" value="true" />
+ </application>
+ <application name="Dota 2" executable="dota2">
+ <option name="gles_emulate_bgra" value="true" />
+ </application>
+ <!-- The Raven Remastered expects a BGRA_sRGB surface and a BGRA_sRGB
+ surface that is capable to do texture views, since on GLES the BGRA
+ format provided by EXT_texture_BGRA8888 has no sRGB counterpart and
+ is not in the list of suppoerted TextureView formats we need to
+ emulate this -->
+ <application name="The Raven Remastered" executable="Raven">
+ <option name="gles_emulate_bgra" value="true" />
+ </application>
+ </device>
+</driconf>