]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: force software x11 renderer for SDL when GL is not in use
authorAlexander Kanavin <alex.kanavin@gmail.com>
Fri, 8 May 2020 20:21:10 +0000 (22:21 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 12 May 2020 14:19:56 +0000 (15:19 +0100)
If libsdl is configured with opengl enabled, it will try to use GL
renderers to open a window even if qemu doesn't use virgl. Setting
the environment variable forces a software X11 renderer, which is the
same one used when libsdl has opengl switched off. This avoids
needlessly loading the GL libraries and drivers from the host.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index 7eb7a9c7b4818ffd58112d1793b228c773038ee9..21680b49d25acfcfee4212fa97e9293982d83020 100755 (executable)
@@ -448,6 +448,9 @@ class BaseConfig(object):
                 logger.setLevel(logging.ERROR)
                 sys.argv.remove(quiet)
 
+        if 'gl' not in sys.argv[1:] and 'gl-es' not in sys.argv[1:]:
+            os.environ['SDL_RENDER_DRIVER'] = 'software'
+
         unknown_arg = ""
         for arg in sys.argv[1:]:
             if arg in self.fstypes + self.vmtypes + self.wictypes: