Attached several small patches; review appreciated. 1. i915g: fix llvm build (typo) 2. st/xorg: fix use-after-free 3. scons: Allow explicitly selecting MSVC version 10.0 4. u_cpu_detect was using PIPE_OS_DARWIN instead of *_APPLE 5. fix copy/paste error in the debug output 6. scons: wrap abspath to executables in quotes (already an attachment to http://bugs.freedesktop.org/28894) 7. scons/llvm.py: Detect more directory layouts on Windows (LLVM's directory hierarchy compiled with Visual Studio 2010 [and earlier verisons?] is bin/Debug, not Debug/bin, so check for that, too, before failing).
From f169f7eb6f800766ab1841ce26988ee84d2e8ca7 Mon Sep 17 00:00:00 2001 From: nobled <nob...@dreamwidth.org> Date: Sat, 24 Jul 2010 12:04:29 +0000 Subject: [PATCH] i915g: fix llvm build
--- src/gallium/targets/dri-i915/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/gallium/targets/dri-i915/Makefile b/src/gallium/targets/dri-i915/Makefile index e88c3c9..9c10d71 100644 --- a/src/gallium/targets/dri-i915/Makefile +++ b/src/gallium/targets/dri-i915/Makefile @@ -22,7 +22,7 @@ DRIVER_DEFINES = \ -DGALLIUM_RBUG -DGALLIUM_TRACE -DGALLIUM_GALAHAD -DGALLIUM_SOFTPIPE ifeq ($(MESA_LLVM),1) -DRIVER_DEFINS += -DGALLIUM_LLVMPIPE +DRIVER_DEFINES += -DGALLIUM_LLVMPIPE endif include ../Makefile.dri -- 1.5.4.3
From 0cb25e0877f4e4d5438783fd40203776e31c29bb Mon Sep 17 00:00:00 2001 From: nobled <nob...@dreamwidth.org> Date: Sat, 24 Jul 2010 12:05:30 +0000 Subject: [PATCH] st/xorg: fix use-after-free --- src/gallium/state_trackers/xorg/xorg_driver.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c index e993ccc..e10ff2f 100644 --- a/src/gallium/state_trackers/xorg/xorg_driver.c +++ b/src/gallium/state_trackers/xorg/xorg_driver.c @@ -472,7 +472,6 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags) max_height = max < max_height ? max : max_height; } - drmModeFreeResources(res); xf86CrtcSetSizeRange(pScrn, res->min_width, res->min_height, max_width, max_height); xf86DrvMsg(pScrn->scrnIndex, X_PROBED, @@ -481,6 +480,7 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags) xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Min height %d, Max Height %d.\n", res->min_height, max_height); + drmModeFreeResources(res); } -- 1.5.4.3
From c59b574142b8091b50e4bb452190d66a25f543a4 Mon Sep 17 00:00:00 2001 From: nobled <nob...@dreamwidth.org> Date: Sat, 24 Jul 2010 12:55:47 +0000 Subject: [PATCH] scons: Add MSVC 10.0 --- SConstruct | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/SConstruct b/SConstruct index a187d8d..6eb180a 100644 --- a/SConstruct +++ b/SConstruct @@ -78,7 +78,8 @@ opts.Add(ListVariable('targets', 'driver targets to build', default_targets, 'xorg-radeon', 'xorg-vmwgfx'])) -opts.Add(EnumVariable('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0'))) +opts.Add(EnumVariable('MSVS_VERSION', 'MS Visual C++ version', None, + allowed_values=('7.1', '8.0', '9.0', '10.0'))) env = Environment( options = opts, -- 1.5.4.3
From 22cbc8f5ad1edf068ba6e505986165946a06269e Mon Sep 17 00:00:00 2001 From: nobled <nob...@dreamwidth.org> Date: Sat, 24 Jul 2010 12:59:40 +0000 Subject: [PATCH] util: fix CPU detection on OS X s/PIPE_OS_DARWIN/PIPE_OS_APPLE, since there is no PIPE_OS_DARWIN. --- src/gallium/auxiliary/util/u_cpu_detect.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gallium/auxiliary/util/u_cpu_detect.c b/src/gallium/auxiliary/util/u_cpu_detect.c index a082419..23d33af 100644 --- a/src/gallium/auxiliary/util/u_cpu_detect.c +++ b/src/gallium/auxiliary/util/u_cpu_detect.c @@ -38,7 +38,7 @@ #include "u_cpu_detect.h" #if defined(PIPE_ARCH_PPC) -#if defined(PIPE_OS_DARWIN) +#if defined(PIPE_OS_APPLE) #include <sys/sysctl.h> #else #include <signal.h> @@ -132,7 +132,7 @@ win32_sig_handler_sse(EXCEPTION_POINTERS* ep) #endif /* PIPE_ARCH_X86 */ -#if defined(PIPE_ARCH_PPC) && !defined(PIPE_OS_DARWIN) +#if defined(PIPE_ARCH_PPC) && !defined(PIPE_OS_APPLE) static jmp_buf __lv_powerpc_jmpbuf; static volatile sig_atomic_t __lv_powerpc_canjump = 0; @@ -153,7 +153,7 @@ sigill_handler(int sig) static void check_os_altivec_support(void) { -#if defined(PIPE_OS_DARWIN) +#if defined(PIPE_OS_APPLE) int sels[2] = {CTL_HW, HW_VECTORUNIT}; int has_vu = 0; int len = sizeof (has_vu); @@ -166,8 +166,8 @@ check_os_altivec_support(void) util_cpu_caps.has_altivec = 1; } } -#else /* !PIPE_OS_DARWIN */ - /* no Darwin, do it the brute-force way */ +#else /* !PIPE_OS_APPLE */ + /* not on Apple/Darwin, do it the brute-force way */ /* this is borrowed from the libmpeg2 library */ signal(SIGILL, sigill_handler); if (setjmp(__lv_powerpc_jmpbuf)) { @@ -184,7 +184,7 @@ check_os_altivec_support(void) signal(SIGILL, SIG_DFL); util_cpu_caps.has_altivec = 1; } -#endif /* PIPE_OS_DARWIN */ +#endif /* !PIPE_OS_APPLE */ } #endif /* PIPE_ARCH_PPC */ -- 1.5.4.3
From 33ce67b43dc78b982d39565bb2fe6d9d24335b90 Mon Sep 17 00:00:00 2001 From: nobled <nob...@dreamwidth.org> Date: Tue, 8 Jun 2010 13:00:17 +0000 Subject: [PATCH] st/egl: Fix debug line --- .../state_trackers/egl/common/egl_g3d_image.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_image.c b/src/gallium/state_trackers/egl/common/egl_g3d_image.c index b1fe30a..1e13cfc 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d_image.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d_image.c @@ -78,7 +78,7 @@ egl_g3d_create_image(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx, gimg = CALLOC_STRUCT(egl_g3d_image); if (!gimg) { - _eglError(EGL_BAD_ALLOC, "eglCreatePbufferSurface"); + _eglError(EGL_BAD_ALLOC, "eglCreateEGLImageKHR"); return NULL; } -- 1.5.4.3
From c7ef1a559032af82b9150c9f4b8f6e239a50e015 Mon Sep 17 00:00:00 2001 From: nobled <nob...@dreamwidth.org> Date: Thu, 15 Jul 2010 19:39:33 +0000 Subject: [PATCH] scons: wrap abspath to executables in quotes Fixes: "slang build fails if absolute path contains spaces" http://bugs.freedesktop.org/28894 (introduced in 3371f7e5025e5288eaba78973a2c81ec5d5b1e4d) --- src/mesa/SConscript | 2 +- src/mesa/slang/library/SConscript | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mesa/SConscript b/src/mesa/SConscript index 62e96ad..9908e64 100644 --- a/src/mesa/SConscript +++ b/src/mesa/SConscript @@ -322,7 +322,7 @@ if env['platform'] != 'winddk': matypes = env.Command( 'matypes.h', gen_matypes, - gen_matypes[0].abspath + ' > $TARGET', + '"%s" > $TARGET' % gen_matypes[0].abspath, ) # Add the dir containing the generated header (somewhere inside the # build dir) to the include path diff --git a/src/mesa/slang/library/SConscript b/src/mesa/slang/library/SConscript index 5112cef..73c7237 100644 --- a/src/mesa/slang/library/SConscript +++ b/src/mesa/slang/library/SConscript @@ -12,19 +12,25 @@ def glsl_compile_emitter(target, source, env): return (target, source) bld_frag = Builder( - action = Action(glsl_compile[0].abspath + ' fragment $SOURCE $TARGET', '$CODEGENCODESTR'), + action = Action( + '"%s" fragment $SOURCE $TARGET' % glsl_compile[0].abspath, + '$CODEGENCODESTR'), emitter = glsl_compile_emitter, suffix = '.gc', src_suffix = '_gc.h') bld_vert = Builder( - action = Action(glsl_compile[0].abspath + ' vertex $SOURCE $TARGET', '$CODEGENCODESTR'), + action = Action( + '"%s" vertex $SOURCE $TARGET' % glsl_compile[0].abspath, + '$CODEGENCODESTR'), emitter = glsl_compile_emitter, suffix = '.gc', src_suffix = '_gc.h') bld_geom = Builder( - action = Action(glsl_compile[0].abspath + ' geometry $SOURCE $TARGET', '$CODEGENCODESTR'), + action = Action( + '"%s" geometry $SOURCE $TARGET' % glsl_compile[0].abspath, + '$CODEGENCODESTR'), emitter = glsl_compile_emitter, suffix = '.gc', src_suffix = '_gc.h') -- 1.5.4.3
From ebe5b4e28bf0f68b4e48f40b6c01cfe1862a2f59 Mon Sep 17 00:00:00 2001 From: nobled <nob...@dreamwidth.org> Date: Sun, 25 Jul 2010 19:58:29 +0000 Subject: [PATCH] scons/llvm: Detect more directory layouts on Windows Compiling LLVM with Visual Studio 2010, it creates directories with the layout bin/Debug, not Debug/bin. --- scons/llvm.py | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/scons/llvm.py b/scons/llvm.py index d88d6e3..21b28d6 100644 --- a/scons/llvm.py +++ b/scons/llvm.py @@ -54,9 +54,12 @@ def generate(env): llvm_bin_dir = os.path.join(llvm_dir, llvm_subdir, 'bin') if not os.path.isdir(llvm_bin_dir): + # MSVC 10.0-style layout + llvm_bin_dir = os.path.join(llvm_dir, 'bin', llvm_subdir) + if not os.path.isdir(llvm_bin_dir): llvm_bin_dir = os.path.join(llvm_dir, 'bin') - if not os.path.isdir(llvm_bin_dir): - raise SCons.Errors.InternalError, "LLVM binary directory not found" + if not os.path.isdir(llvm_bin_dir): + raise SCons.Errors.InternalError, "LLVM binary directory not found" env.PrependENVPath('PATH', llvm_bin_dir) @@ -89,7 +92,15 @@ def generate(env): '__STDC_CONSTANT_MACROS', 'HAVE_STDINT_H', ]) - env.Prepend(LIBPATH = [os.path.join(llvm_dir, 'lib')]) + + # Check for a MSVC 10.0-style layout first + llvm_lib_dir = os.path.join(llvm_dir, 'lib', llvm_subdir) + if not os.path.isdir(llvm_lib_dir): + llvm_lib_dir = os.path.join(llvm_dir, 'lib') + if not os.path.isdir(llvm_lib_dir): + raise SCons.Errors.InternalError, "LLVM libs directory not found" + env.Prepend(LIBPATH = [llvm_lib_dir]) + if llvm_version >= distutils.version.LooseVersion('2.7'): # 2.7 env.Prepend(LIBS = [ -- 1.5.4.3
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev