From e041a0d1e6dd662331a8cb277f6d23436ca89c92 Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Thu, 15 Jul 2021 14:30:53 +1200 Subject: [PATCH] nine: Only enable thread_submit by default on x86 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 Part-of: --- src/gallium/targets/d3dadapter9/drm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gallium/targets/d3dadapter9/drm.c b/src/gallium/targets/d3dadapter9/drm.c index ced9d5bac2d..a5e9c5606fd 100644 --- a/src/gallium/targets/d3dadapter9/drm.c +++ b/src/gallium/targets/d3dadapter9/drm.c @@ -47,6 +47,13 @@ #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)