nine: Only enable thread_submit by default on x86
authorIcecream95 <ixn@disroot.org>
Thu, 15 Jul 2021 02:30:53 +0000 (14:30 +1200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 27 Jul 2022 21:36:23 +0000 (21:36 +0000)
Possibly the bug breaking this is in box86, but given that there
aren't a whole lot of other reasons to be using Nine with a non-x86
Mesa, disable the feature unless we are running on x86.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17698>

src/gallium/targets/d3dadapter9/drm.c

index ced9d5b..a5e9c56 100644 (file)
 
 #define DBG_CHANNEL DBG_ADAPTER
 
+/* On non-x86 archs, Box86 has issues with thread_submit. */
+#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
+#define DEFAULT_THREADSUBMIT true
+#else
+#define DEFAULT_THREADSUBMIT false
+#endif
+
 const driOptionDescription __driConfigOptionsNine[] = {
     DRI_CONF_SECTION_PERFORMANCE
          DRI_CONF_VBLANK_MODE(DRI_CONF_VBLANK_DEF_INTERVAL_1)
@@ -54,7 +61,7 @@ const driOptionDescription __driConfigOptionsNine[] = {
     DRI_CONF_SECTION_NINE
         DRI_CONF_NINE_OVERRIDEVENDOR(-1)
         DRI_CONF_NINE_THROTTLE(-2)
-        DRI_CONF_NINE_THREADSUBMIT(true)
+        DRI_CONF_NINE_THREADSUBMIT(DEFAULT_THREADSUBMIT)
         DRI_CONF_NINE_ALLOWDISCARDDELAYEDRELEASE(true)
         DRI_CONF_NINE_TEARFREEDISCARD(true)
         DRI_CONF_NINE_CSMT(-1)