From: George Kyriazis Date: Fri, 11 Nov 2016 18:09:36 +0000 (-0600) Subject: gallium: Add support for SWR compilation X-Git-Tag: upstream/17.1.0~4508 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9aae167e9474b7c220cbc3f172a27c0b6bf9b20a;p=platform%2Fupstream%2Fmesa.git gallium: Add support for SWR compilation Include swr library and include -DHAVE_SWR in the compile line. v3: split to a separate commit Reviewed-by: Emil Velikov --- diff --git a/src/gallium/targets/libgl-gdi/SConscript b/src/gallium/targets/libgl-gdi/SConscript index 2a52363..d3251ca 100644 --- a/src/gallium/targets/libgl-gdi/SConscript +++ b/src/gallium/targets/libgl-gdi/SConscript @@ -30,6 +30,10 @@ if env['llvm']: env.Append(CPPDEFINES = 'HAVE_LLVMPIPE') drivers += [llvmpipe] + if env['swr']: + env.Append(CPPDEFINES = 'HAVE_SWR') + drivers += [swr] + if env['gcc'] and env['machine'] != 'x86_64': # DEF parser in certain versions of MinGW is busted, as does not behave as # MSVC. mingw-w64 works fine. diff --git a/src/gallium/targets/libgl-xlib/SConscript b/src/gallium/targets/libgl-xlib/SConscript index 0a4f31b..d01bb3c 100644 --- a/src/gallium/targets/libgl-xlib/SConscript +++ b/src/gallium/targets/libgl-xlib/SConscript @@ -48,6 +48,10 @@ if env['llvm']: env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE']) env.Prepend(LIBS = [llvmpipe]) + if env['swr']: + env.Append(CPPDEFINES = 'HAVE_SWR') + env.Prepend(LIBS = [swr]) + if env['platform'] != 'darwin': # Disallow undefined symbols, except with Address Sanitizer, since libasan # is not linked on shared libs, as it should be LD_PRELOAD'ed instead diff --git a/src/gallium/targets/osmesa/SConscript b/src/gallium/targets/osmesa/SConscript index 7a2a00c..47937a2 100644 --- a/src/gallium/targets/osmesa/SConscript +++ b/src/gallium/targets/osmesa/SConscript @@ -30,6 +30,10 @@ if env['llvm']: env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE') env.Prepend(LIBS = [llvmpipe]) + if env['swr']: + env.Append(CPPDEFINES = 'HAVE_SWR') + env.Prepend(LIBS = [swr]) + if env['platform'] == 'windows': if env['gcc'] and env['machine'] != 'x86_64': sources += ['osmesa.mingw.def']