Announcement

Collapse
No announcement yet.

Compiling Mesa with LLVM on x86_64 in Windows 7

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Compiling Mesa with LLVM on x86_64 in Windows 7

    Hi guys

    I'm trying to compile Mesa with LLVM on Windows 7 (at work). We'd like to use it when running our software over remote desktop. The 32 bit build seems to work, but for some reason I can't get the 64 bit version to build. Any Mesa developers here that can lend me a hand? I'm able to build Mesa without LLVM support by running:
    Code:
    scons.bat build=release llvm=no machine=x86_64
    but if I change llvm=no to llvm=yes I get lots of linker errors. I've built LLVM 3.0 from their git repository, and it should be build in release mode for x86_64. The Mesa I'm using is also from git (head/master).

    The linker errors I get is
    Code:
    Installing build\windows-x86_64\bin\u_cache_test.exe ...
    Installing build\windows-x86_64\bin\u_cache_test.pdb ...
    link /nologo /LTCG /fixed:no /incremental:no /OUT:build\windows-x86_64\gallium\drivers\llvmpipe\lp_test_format.exe /LIBPATH:D:\mesa2\llvm_bin\lib build\windows-x86_64\gallium\drivers\llvmpipe\llvmpipe.lib build\windows-x86_64\gallium\auxiliary\gallium.lib LLVMObject.lib LLVMMCJIT.lib LLVMMCDisassemb
    ler.lib LLVMLinker.lib LLVMipo.lib LLVMInterpreter.lib LLVMInstrumentation.lib LLVMJIT.lib LLVMExecutionEngine.lib LLVMBitWriter.lib LLVMX86Disassembler.lib LLVMX86AsmParser.lib LLVMMCParser.lib LLVMX86AsmPrinter.lib LLVMX86CodeGen.lib LLVMSelectionDAG.lib LLVMX86Utils.lib LLVMX86Info.lib LLVMAsmPri
    nter.lib LLVMCodeGen.lib LLVMScalarOpts.lib LLVMInstCombine.lib LLVMTransformUtils.lib LLVMipa.lib LLVMAsmParser.lib LLVMArchive.lib LLVMBitReader.lib LLVMAnalysis.lib LLVMTarget.lib LLVMCore.lib LLVMMC.lib LLVMSupport.lib imagehlp.lib psapi.lib shell32.lib advapi32.lib /PDB:build\windows-x86_64\gal
    lium\drivers\llvmpipe\lp_test_format.pdb /DEBUG build\windows-x86_64\gallium\drivers\llvmpipe\lp_test_format.obj build\windows-x86_64\gallium\drivers\llvmpipe\lp_test_main.obj
    Installing build\windows-x86_64\bin\pipe_barrier_test.pdb ...
    Installing build\windows-x86_64\bin\pipe_barrier_test.exe ...
    link /nologo /LTCG /fixed:no /incremental:no /OUT:build\windows-x86_64\gallium\drivers\llvmpipe\lp_test_printf.exe /LIBPATH:D:\mesa2\llvm_bin\lib build\windows-x86_64\gallium\drivers\llvmpipe\llvmpipe.lib build\windows-x86_64\gallium\auxiliary\gallium.lib LLVMObject.lib LLVMMCJIT.lib LLVMMCDisassemb
    ler.lib LLVMLinker.lib LLVMipo.lib LLVMInterpreter.lib LLVMInstrumentation.lib LLVMJIT.lib LLVMExecutionEngine.lib LLVMBitWriter.lib LLVMX86Disassembler.lib LLVMX86AsmParser.lib LLVMMCParser.lib LLVMX86AsmPrinter.lib LLVMX86CodeGen.lib LLVMSelectionDAG.lib LLVMX86Utils.lib LLVMX86Info.lib LLVMAsmPri
    nter.lib LLVMCodeGen.lib LLVMScalarOpts.lib LLVMInstCombine.lib LLVMTransformUtils.lib LLVMipa.lib LLVMAsmParser.lib LLVMArchive.lib LLVMBitReader.lib LLVMAnalysis.lib LLVMTarget.lib LLVMCore.lib LLVMMC.lib LLVMSupport.lib imagehlp.lib psapi.lib shell32.lib advapi32.lib /PDB:build\windows-x86_64\gal
    lium\drivers\llvmpipe\lp_test_printf.pdb /DEBUG build\windows-x86_64\gallium\drivers\llvmpipe\lp_test_printf.obj build\windows-x86_64\gallium\drivers\llvmpipe\lp_test_main.obj
    msvcprt.lib(MSVCP100.dll) : error LNK2005: "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@std@@YAXPEBD@Z) already defined in libcpmt.lib(xthrow.obj)
    msvcprt.lib(MSVCP100.dll) : error LNK2005: "void __cdecl std::_Xout_of_range(char const *)" (?_Xout_of_range@std@@YAXPEBD@Z) already defined in libcpmt.lib(xthrow.obj)
    msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: virtual __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::~basic_streambuf<char,struct std::char_traits<char> >(void)" (??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ) already defined in libcpmt.lib(cout.obj)
    msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::basic_streambuf<char,struct std::char_traits<char> >(void)" (??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ) already defined in libcpmt.lib(cout.obj)
    msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: void __cdecl std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z) already defined in libcpmt.lib(cout.obj)
    msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: char * __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::_Pninc(void)" (?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ) already defined in libcpmt.lib(cout.obj)
    msvcprt.lib(MSVCP100.dll) : error LNK2005: "private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" (?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z) already defined in libcpmt.lib(ios.obj)
    msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: __cdecl std::basic_ostream<char,struct std::char_traits<char> >::basic_ostream<char,struct std::char_traits<char> >(class std::basic_streambuf<char,struct std::char_traits<char> > *,bool)" (??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?
    $basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z) already defined in libcpmt.lib(cout.obj)
    msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: __cdecl std::basic_ios<char,struct std::char_traits<char> >::basic_ios<char,struct std::char_traits<char> >(void)" (??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ) already defined in libcpmt.lib(cout.obj)
    msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: virtual __cdecl std::basic_ios<char,struct std::char_traits<char> >::~basic_ios<char,struct std::char_traits<char> >(void)" (??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ) already defined in libcpmt.lib(cout.obj)
    msvcprt.lib(MSVCP100.dll) : error LNK2005: "protected: void __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::setg(char *,char *,char *)" (?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z) already defined in libcpmt.lib(cout.obj)
    msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: __cdecl std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QEAA@XZ) already defined in libcpmt.lib(xlock.obj)
    msvcprt.lib(MSVCP100.dll) : error LNK2005: "public: __cdecl std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QEAA@H@Z) already defined in libcpmt.lib(xlock.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: _invoke_watson already defined in LIBCMT.lib(invarg.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: memmove already defined in LIBCMT.lib(memcpy.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: malloc already defined in LIBCMT.lib(malloc.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: free already defined in LIBCMT.lib(free.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: exit already defined in LIBCMT.lib(crt0dat.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: tolower already defined in LIBCMT.lib(tolower.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: isdigit already defined in LIBCMT.lib(_ctype.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: atoi already defined in LIBCMT.lib(atox.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: abort already defined in LIBCMT.lib(abort.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: getenv already defined in LIBCMT.lib(getenv.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: realloc already defined in LIBCMT.lib(realloc.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: strcspn already defined in LIBCMT.lib(strcspn.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: _errno already defined in LIBCMT.lib(dosmap.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: fclose already defined in LIBCMT.lib(fclose.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: fwrite already defined in LIBCMT.lib(fwrite.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: fopen already defined in LIBCMT.lib(fopen.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: isspace already defined in LIBCMT.lib(_ctype.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: strncmp already defined in LIBCMT.lib(strncmp.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: isprint already defined in LIBCMT.lib(_ctype.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: isalnum already defined in LIBCMT.lib(_ctype.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: isalpha already defined in LIBCMT.lib(_ctype.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: isupper already defined in LIBCMT.lib(_ctype.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: _stricmp already defined in LIBCMT.lib(stricmp.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: _strdup already defined in LIBCMT.lib(strdup.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: calloc already defined in LIBCMT.lib(calloc.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: strchr already defined in LIBCMT.lib(strchr.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: _exit already defined in LIBCMT.lib(crt0dat.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: fputs already defined in LIBCMT.lib(fputs.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: fprintf already defined in LIBCMT.lib(fprintf.obj)
    MSVCRT.lib(MSVCR100.dll) : error LNK2005: __iob_func maslvrcepardty. ldiebf(iMnSeVdC Pi1n0 0L.IdBlClM)T .:l iebr(r_ofri lLeN.Ko2b0j0)5
    :MSVCR T".vloiibd( M_S_VcCdRe1c0l0 .sdtldl:): _:X leernrgotrh _LeNrKr2o0r0(5c:h a_rg ecto_nosstf h*a)n"d l(e? _aXllreenagdtyh _deerfrionre@ds tidn@ @LYIABXCPMETB.Dl@iZb)( oaslfrienafdoy. odbejf)i
    nedM SiVnC RlTi.blcipbm(tM.SlViCbR(1x0t0h.rdolwl.)o b:j )e
    rromrs vLcNpKr2t0.0l5i:b (sMStVrCpPb1r0k0 .adllrle)a d:y  edrerfoirn eLdN Ki2n0 0L5I:B C"MvTo.ildi b_(_sctdrepcblr ks.todb:j:)_
    XoMuStV_CoRfT_.rlainbg(eM(ScVhCaRr1 0c0o.ndsltl )* ):"  e(r?r_oXro uLtN_Ko2f0_0r5a:n g_es@esttmdo@d@eY AaXlPrEeBaDd@yZ )d eaflirneeadd yi nd eLfIiBnCeMdT .ilni bl(isbectpmmotd.el.iobb(jx)t
    hrMoSwV.CoRbTj.)l
    ib(MSVCR10m0s.vdclplr)t .:l iebr(rMoSrV CLPN1K0200.0d5l:l )_ f:i leernroo ra lLrNeKa2d0y0 5d:e f"mipsnuvebcdlp irictn:.  lLviIibBr(CtMMuSTaV.lCl Pi_1b_0(c0fd.iedlclelln )os .t:od b:ej:r)br
    aosMriS cVL_CNsRKtT2r.0el0ai5mb:b(uMfS<V cC"hRva1or0i,0ds. td_rl_ulcc)dt e :cs lte drs:rt:odcr:h :aL_rNX_Klt2er0na0gi5tt:hs _<fecfrhlrauorsr>h(  c>ah:la:rr~e bacadosyni scdt_e sf*ti)rn"ee ad(m ?bi_unXf l<LecInhBgaCtrMh,T_s.etlrriruboc(rtf@ fsslttudds@:h@:.YcoAhbXajPr)E_
    BtDr@MaZSi)Vt CsaR<lTcr.helaairdb>y(  M>dS(eVvfCoiRin1de0)d0" . id(nl? l?l)1i ?b:$c bpeamrstri.oclr_i sbLt(NrxKet2ah0mr0bo5uw:f. @o_DbcUjh?)s$
    iczhema_srsv_ ctaprlrartie.talsdi@ybD (@dMseStfVdiC@nP@e1@d0s 0ti.dnd@ l@LlUI)EB AC:AM @TeX.rZlr)io bra( lcLrhNesKai2dz0ye0 .5do:eb fj"i)vn
    oeiddM  Si_Vn_C cRldTie.bclclip bms(ttM.dSl:Vi:Cb_R(X1co0ou0ut.t_d.oloflb_)jr )a:
    ...
    ...
    ...
    More weird output (I think several threads are writing to standard output at the same time).
    ...
    ...
    ...
    eeng.ll.ilbi(bX(8e6gSluabptia.rogbejt). o:b jw)a r:n ienrgr oLrN KL4N1K9270:0 1e:x puonrrte s'oelgvleIdn ietxitaelrinzael'  ssypmebcoilf i"ebdo omlu l_t_icpdleec lt ilmlevsm;: :uXs8i6n_gM Cf:i:rGsett CsppueIcDiAfnidcIantfioo(nu
    nesgilg.nleidb (iengtl,aupnis.iogbnje)d  :i nwta r*n,iunngs iLgNnKe4d1 9i7n:t  e*x,puonrsti g'neegdl GienttD i*s,pulnasyi'g nsepde ciinfti e*d) "m u(l?tGieptlCep utIiDmAensd;I nufsoi@nXg8 6f_iMrCs@tl lsvpme@c@iYfAi_cNaItPiEoAnI
    000@Z)
    build\windows-x86_64\gallium\drivers\llvmpipe\lp_test_format.exe : fatal error LNK1120: 11 unresolved externals
    scons: *** [build\windows-x86_64\gallium\drivers\llvmpipe\lp_test_format.exe] Error 1120
       Creating library build\windows-x86_64\gallium\targets\egl-static\libEGL.lib and object build\windows-x86_64\gallium\targets\egl-static\libEGL.exp
    LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
    gallium.lib(lp_bld_init.obj) : error LNK2001: unresolved external symbol LLVMInitializeX86TargetMC
    LLVMX86CodeGen.lib(X86InstrInfo.obj) : error LNK2001: unresolved external symbol "class llvm::MCInstrDesc * llvm::X86Insts" (?X86Insts@llvm@@3PAVMCInstrDesc@1@A)
    LLVMX86CodeGen.lib(X86RegisterInfo.obj) : error LNK2001: unresolved external symbol "class llvm::MCRegisterClass * llvm::X86MCRegisterClasses" (?X86MCRegisterClasses@llvm@@3PAVMCRegisterClass@1@A)
    LLVMX86CodeGen.lib(X86RegisterInfo.obj) : error LNK2001: unresolved external symbol "unsigned int __cdecl llvm::X86_MC::getX86RegNum(unsigned int)" (?getX86RegNum@X86_MC@llvm@@YAII@Z)
    LLVMX86CodeGen.lib(X86CodeEmitter.obj) : error LNK2001: unresolved external symbol "unsigned int __cdecl llvm::X86_MC::getX86RegNum(unsigned int)" (?getX86RegNum@X86_MC@llvm@@YAII@Z)
    LLVMX86CodeGen.lib(X86ISelLowering.obj) : error LNK2001: unresolved external symbol "unsigned int __cdecl llvm::X86_MC::getX86RegNum(unsigned int)" (?getX86RegNum@X86_MC@llvm@@YAII@Z)
    LLVMX86CodeGen.lib(X86RegisterInfo.obj) : error LNK2001: unresolved external symbol "struct llvm::MCRegisterDesc * llvm::X86RegDesc" (?X86RegDesc@llvm@@3PAUMCRegisterDesc@1@A)
    LLVMX86CodeGen.lib(X86RegisterInfo.obj) : error LNK2001: unresolved external symbol "void __cdecl llvm::X86_MC::InitLLVM2SEHRegisterMapping(class llvm::MCRegisterInfo *)" (?InitLLVM2SEHRegisterMapping@X86_MC@llvm@@YAXPEAVMCRegisterInfo@2@@Z)
    LLVMX86CodeGen.lib(X86RegisterInfo.obj) : error LNK2001: unresolved external symbol "unsigned int __cdecl llvm::X86_MC::getDwarfRegFlavour(class llvm::StringRef,bool)" (?getDwarfRegFlavour@X86_MC@llvm@@YAIVStringRef@2@_N@Z)
    LLVMX86CodeGen.lib(X86Subtarget.obj) : error LNK2001: unresolved external symbol "struct llvm::SubtargetFeatureKV * llvm::X86FeatureKV" (?X86FeatureKV@llvm@@3PAUSubtargetFeatureKV@1@A)
    LLVMX86CodeGen.lib(X86Subtarget.obj) : error LNK2001: unresolved external symbol "struct llvm::SubtargetFeatureKV * llvm::X86SubTypeKV" (?X86SubTypeKV@llvm@@3PAUSubtargetFeatureKV@1@A)
    LLVMX86CodeGen.lib(X86Subtarget.obj) : error LNK2001: unresolved external symbol "void __cdecl llvm::X86_MC::DetectFamilyModel(unsigned int,unsigned int &,unsigned int &)" (?DetectFamilyModel@X86_MC@llvm@@YAXIAEAI0@Z)
    LLVMX86CodeGen.lib(X86Subtarget.obj) : error LNK2001: unresolved external symbol "bool __cdecl llvm::X86_MC::GetCpuIDAndInfo(unsigned int,unsigned int *,unsigned int *,unsigned int *,unsigned int *)" (?GetCpuIDAndInfo@X86_MC@llvm@@YA_NIPEAI000@Z)
    build\windows-x86_64\gallium\targets\egl-static\libEGL.dll : fatal error LNK1120: 11 unresolved externals
    scons: *** [build\windows-x86_64\gallium\targets\egl-static\libEGL.dll] Error 1120
    Finished generating code
    Finished generating code
    scons: building terminated because of errors.

  • #2
    No info/help from any mesa devs? Pleeeeeaaaseeeee...

    Comment


    • #3
      I found out how to get it working with LLVM3.2 and Mesa 9.1, and have a script with patches for it, etc. There's a batch script which does most of the job, including getting repositories via git, etc.. Just copy the script, the config.py and the patch (pasted into a file called patches_against_mesa_9.1git.patch) into some directory, and it "should" build everything for you. Then find the file called opengl32.dll and copy it to where you need it to be.

      Code:
      @echo off
      setlocal enabledelayedexpansion
      
      rem Get and build needed parts of Mesa stack (X11 drivers)
      set HOME=%cd%
      set MSBUILD=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
      rem multi-core compile
      set MAKEFLAGS=-j7 
      call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat"
      
      set USE_LLVM="yes"
      set USE_CLANG="no"
      
      if %USE_LLVM%=="yes" (
      	rem Get and Build LLVM
      	cd %HOME%
      	mkdir llvm
      	cd llvm
      	mkdir build
      	if not exist !cd!\llvm (
      		call git clone http://llvm.org/git/llvm.git
      		cd llvm
      	) else (
      		cd llvm
      		call git pull --rebase
      	)
      	cd tools
      	if %USE_CLANG%=="yes" (
      		if not exist !cd!\clang (
      			call git clone http://llvm.org/git/clang.git
      			cd ..\..\build
      		) else (
      			cd clang
      			call git pull
      			cd ..\..\..\build
      		)
      	) else (
      		cd ..\..\build
      	)
      	call cmake -G "Visual Studio 10 Win64" ..\llvm
      	set MSBUILD="%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"
      	call !MSBUILD! LLVM.sln /nologo /m:7 /property:Configuration=Release
      	set LLVM_TARGET=llvm_bin
      	set LLVM=%HOME%\!LLVM_TARGET!
      	mkdir !LLVM!
      	mkdir !LLVM!\bin
      	mkdir !LLVM!\lib
      	mkdir !LLVM!\include\llvm
      	xcopy /Y bin\Release\*.* !LLVM!\bin\
      	xcopy /Y lib\Release\*.* !LLVM!\lib\
      	xcopy /Y /S include\llvm !LLVM!\include\llvm\
      	cd %HOME%\llvm
      	xcopy /Y /S build\!LLVM_TARGET! !LLVM!
      	xcopy /Y /S llvm\include !LLVM!\include\
      	echo LLVM set to !LLVM!
      )
      
      rem Build mesa
      if (%USE_LLVM%=="yes") (
      	if not exist !LLVM! (
      		echo "LLVM environment variable not set!"
      		goto fail
      	)
      )
      cd %HOME%
      rem git:// doesn't work (probably because of firewall. Use http for now (or forever)
      if not exist %HOME%\mesa\.git\ (
      	call git clone http://anongit.freedesktop.org/git/mesa/mesa.git
      	xcopy /Y *.patch mesa\
      	xcopy /Y config.py mesa\
      	cd mesa
      ) else (
      	xcopy /Y *.patch mesa\
      	cd mesa
      	call git pull origin master
      )
      call git apply patches_against_mesa_9.1git.patch
      echo LLVM environment variable set to !LLVM!
      call scons.bat -j 8 build=release llvm=%USE_LLVM% machine=x86_64 mesa gallium opengl32
      goto:EOF
      
      :fail
      echo "Script finished with an error"
      and here's the config.py that needs to be copied into the build directory (which the script does):
      Code:
      # config.py
      build='release'
      llvm=True
      machine='x86_64'
      platform='windows'
      texture_float=True
      msvc=True
      MSVC_VERSION='10.0',
      targets="mesa gallium opengl32"
      and here's the patch we need to get it to build with LLVM (since the CCFLAG needs to be changed to /MD). Only the "gallium.py" patch is really needed for getting it to build, so you can do that by hand and disregard the other parts if you want to:
      Code:
      diff --git a/scons/gallium.py b/scons/gallium.py
      index c3f33a0..bbd423b 100755
      --- a/scons/gallium.py
      +++ b/scons/gallium.py
      @@ -439,10 +439,10 @@ def generate(env):
               # Choose the appropriate MSVC CRT
               # http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
               if env['build'] in ('debug', 'checked'):
      -            env.Append(CCFLAGS = ['/MTd'])
      +            env.Append(CCFLAGS = ['/MDd'])
                   env.Append(SHCCFLAGS = ['/LDd'])
               else:
      -            env.Append(CCFLAGS = ['/MT'])
      +            env.Append(CCFLAGS = ['/MD'])
                   env.Append(SHCCFLAGS = ['/LD'])
           
           # Assembler options
      diff --git a/src/gallium/drivers/llvmpipe/lp_limits.h b/src/gallium/drivers/llvmpipe/lp_limits.h
      index 3be24d6..051859b 100644
      --- a/src/gallium/drivers/llvmpipe/lp_limits.h
      +++ b/src/gallium/drivers/llvmpipe/lp_limits.h
      @@ -45,7 +45,7 @@
        */
       #define LP_MAX_TEXTURE_SIZE (1 * 1024 * 1024 * 1024ULL)  /* 1GB for now */
       #define LP_MAX_TEXTURE_2D_LEVELS 14  /* 8K x 8K for now */
      -#define LP_MAX_TEXTURE_3D_LEVELS 11  /* 1K x 1K x 1K for now */
      +#define LP_MAX_TEXTURE_3D_LEVELS 15  /* 1K x 1K x 1K for now */
       #define LP_MAX_TEXTURE_CUBE_LEVELS 13  /* 4K x 4K for now */
       
       
      diff --git a/src/gallium/drivers/softpipe/sp_limits.h b/src/gallium/drivers/softpipe/sp_limits.h
      index 9dd2be1..0c07ea7 100644
      --- a/src/gallium/drivers/softpipe/sp_limits.h
      +++ b/src/gallium/drivers/softpipe/sp_limits.h
      @@ -31,7 +31,7 @@
       
       #define SP_MAX_TEXTURE_SIZE (1 * 1024 * 1024 * 1024ULL)  /* 1GB for now */
       #define SP_MAX_TEXTURE_2D_LEVELS 15  /* 16K x 16K */
      -#define SP_MAX_TEXTURE_3D_LEVELS 9   /* 256 x 256 x 256 */
      +#define SP_MAX_TEXTURE_3D_LEVELS 15  /* 16K x 16K */
       #define SP_MAX_TEXTURE_CUBE_LEVELS 13  /* 4K x 4K */
       
       
      diff --git a/src/mesa/program/prog_instruction.h b/src/mesa/program/prog_instruction.h
      index 656556d..34d6540 100644
      --- a/src/mesa/program/prog_instruction.h
      +++ b/src/mesa/program/prog_instruction.h
      @@ -247,7 +247,7 @@ typedef enum prog_opcode {
        * Number of bits for the src/dst register Index field.
        * This limits the size of temp/uniform register files.
        */
      -#define INST_INDEX_BITS 12
      +#define INST_INDEX_BITS 15
       
       
       /**

      Comment

      Working...
      X