[Mesa-dev] Build mesa-dev on Windows with AVX instruction set problem

Roland Scheidegger sroland at vmware.com
Tue Oct 24 17:50:07 UTC 2017


Am 24.10.2017 um 18:26 schrieb Fabrício Ceolin:
> Hi,
> 
> I am trying to build mesa-dev on windows.
> 
> I am learning how to do it, through the
> project https://github.com/pal1000/mesa-dist-win/tree/master/buildscript
> <https://github.com/pal1000/mesa-dist-win/tree/master/buildscript>
> 
> I tried to use the binaries from pal1000, but I got an illegal
> instruction problem in opengl32.dll when I tried to run my application
> (VTK based).
> 
> 00007FF96252B0CF  cmp         qword ptr [rdx+18h],10h  
> 00007FF96252B0D4  mov         rbp,qword ptr [rdx+10h]  
> 00007FF96252B0D8  jb         
> std::basic_string<char,std::char_traits<char>,std::allocator<char>
>>::basic_string<char,std::char_traits<char>,std::allocator<char> >+2Dh
> (07FF96252B0DDh)  
> 00007FF96252B0DA  mov         rsi,qword ptr [rdx]  
> 00007FF96252B0DD  cmp         rbp,10h  
> 00007FF96252B0E1  jae       
>  std::basic_string<char,std::char_traits<char>,std::allocator<char>
>>::basic_string<char,std::char_traits<char>,std::allocator<char> >+5Ah
> (07FF96252B10Ah)  
> *00007FF96252B0E3  vmovups     xmm0,xmmword ptr [rsi]  *
> 00007FF96252B0E7  vmovups     xmmword ptr [rcx],xmm0  
> 00007FF96252B0EB  mov         qword ptr [rcx+10h],rbp  
> 
> I tried to build everything on a target machine, but the problem was not
> solved.
> 
> I saw here that movups is in avx instruction set here
> http://www.felixcloutier.com/x86/MOVUPS.html
> <http://www.felixcloutier.com/x86/MOVUPS.html>
> 
> My target machine has the following cpuinfo (inside msys64):
> 
> cat /proc/cpuinfo
> processor       : 0
> vendor_id       : GenuineIntel
> cpu family      : 6
> model           : 6
> model name      : QEMU Virtual CPU version 2.0.0
> stepping        : 3
> cpu MHz         : 2993.000
> cache size      : 4096 KB
> fpu             : yes
> fpu_exception   : yes
> cpuid level     : 4
> wp              : yes
> flags           : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca
> cmov pat pse36 clflush mmx fxsr sse sse2 pni vmx cx16 x2apic popcnt
> hypervisor lahf_lm epb dtherm fsgsbase tsc_adjust bmi1 hle avx2 clflushopt
> clflush size    : 64
> cache_alignment : 64
> address sizes   : 40 bits physical, 48 bits virtual
> power management:
> 
> How can I compile opengl32.dll without use the avx instruction set?
> 
> My compilation command was (from mesa-dist-win):
> 
> python c:\Python27\Scripts\scons.py build=release platform=windows
> machine=x86_64 swr=1 libgl-gdi osmesa graw-gdi

Generally, generic x86_64 target should only use sse2.
If you're running llvmpipe though, the code will use runtime detection
of features for generated code. I have no idea if that code there
causing the crash was runtime-compiled by llvm or not. If yes, it could
mean there's still bugs with llvm and cpu detection features (detecting
this is quite a mess due to the OS having to support it). Albeit your
cpu features make no sense at all, you cannot have avx2 but not avx (and
you don't have the newer sse flags neither, even for a virtual cpu that
is pretty odd supporting avx2 but not these...).
Interestingly, xsave isn't listed neither, which is necessary for avx to
indicate the OS supports it, suggesting your OS does not. No idea why...

Roland



> 
> Thanks
> 
> 
> MiningMath Associates
> <http://www.miningmath.com/component/content/article/4.html?src=ass&mdm=email&cpn=FAC#Fabr%C3%ADcio+Ceolin>
> *Fabrício Ceolin*
> +55 (31) 98675-1359
> MiningMath Associates <http://www.miningmath.com/?src=ass&mdm=email&cpn=FAC>
> www.miningmath.com <http://www.miningmath.com/?src=ass&mdm=email&cpn=FAC>
> 
> 
> 
> 
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 



More information about the mesa-dev mailing list