disable inline mmx for clang builds
authorGood Guy <good1.2guy@gmail.com>
Mon, 16 Sep 2019 01:07:51 +0000 (19:07 -0600)
committerGood Guy <good1.2guy@gmail.com>
Mon, 16 Sep 2019 01:07:51 +0000 (19:07 -0600)
cinelerra-5.1/guicast/bcwindowbase.C
cinelerra-5.1/libzmpeg3/Makefile
cinelerra-5.1/libzmpeg3/video/reconstruct.C
cinelerra-5.1/libzmpeg3/video/slice.C

index 1ff149285aa2d2c297cf48b2ead4c708d8b23852..1f1d0d30c151581dfbe51cc2ff90ec67ab71e1e0 100644 (file)
@@ -460,8 +460,16 @@ int BC_WindowBase::create_window(BC_WindowBase *parent_window, const char *title
                vis = get_glx_visual(display);
                if( !vis )
 #endif
+               {
+                       int mask = VisualDepthMask | VisualClassMask;
+                       static XVisualInfo vinfo = { .depth = 24, .c_class = DirectColor, };
+                       int nitems = 0;
+                       XVisualInfo *vis_info = XGetVisualInfo(display, mask, &vinfo, &nitems);
+                       vis = vis_info && nitems>0 ? vis_info[0].visual : 0;
+                       if( vis_info ) XFree(vis_info);
+               }
+               if( !vis )
                        vis = DefaultVisual(display, screen);
-
                default_depth = DefaultDepth(display, screen);
 
                client_byte_order = (*(const u_int32_t*)"a   ") & 0x00000001;
index b256c73686cad8864236fcab6c5cdab6739a20f3..aeade023cd978bcc2238ef28d39787678d6d90b5 100644 (file)
@@ -3,7 +3,8 @@ include $(TOPDIR)/global_config
 
 ifneq ($(WANT_LIBZMPEG),no)
 
-CC = gcc
+# for mmx inlines
+#CC = gcc
 NASM = nasm
 USE_MMX ?= 0
 DYNAMIC_FONTS ?= 1
index 9cc819fc76a155a583ad8636710a205a24416578..1977d3be96db1f486e925fa017f706cc2de034a9 100644 (file)
@@ -1,8 +1,10 @@
 #include "../libzmpeg3.h"
 
+#ifndef __clang__
 #ifdef __x86_64__
 #define USE_MMX
 #endif
+#endif
 #define MMX_ACCURATE
 
 #ifdef USE_MMX
index b880f7ffdc021f08789e684d44c4d7abea849f74..8bb238ebf3076f71f4d5f1728123835dc2fc395b 100644 (file)
@@ -1,8 +1,10 @@
 #include "../libzmpeg3.h"
 
+#ifndef __clang__
 #ifdef __x86_64__
 #define USE_MMX
 #endif
+#endif
 #ifdef USE_MMX
 #include "mmx.h"
 #if defined(__x86_64__)