I am trying to build Mesa for x86 using Scons on Windows 8.1 x64 with MSVC11, and I am getting a message stating that 'roundf' is undeclared in the file textparam.c (in the function _mesa_GetTexParameteriv). I tried adding math.h to the included headers for that file, but that didn't work. I don't do much native development (I am building Mesa for use in a Game Development Studio I am working on using SharpGL) so I have no other idea on what could be causing this error.
MSVC has bad C99 support. roundf was introduced by C99. You can easily implement roundf yourself, though. Calling floorf or ceilf according to sign of the number should do it.
The stable branches and hence the tarballs are missing commit bba8f10598866776ae198b363b3752c2e3bbb126 from master at the moment which fixes this. You can just manually replace *params = (GLint) roundf(obj->Sampler.LodBias); with *params = IROUND(obj->Sampler.LodBias); to fix this.
(In reply to comment #2) > The stable branches and hence the tarballs are missing commit > bba8f10598866776ae198b363b3752c2e3bbb126 from master at the moment which > fixes this. You can just manually replace > *params = (GLint) roundf(obj->Sampler.LodBias); > with > *params = IROUND(obj->Sampler.LodBias); > to fix this. Cherry-pick it to the stable branch since you use MSVC?
AFAICS the fix is part of the latest two branches (10.2 and 10.3) + master. commit bba8f10598866776ae198b363b3752c2e3bbb126 Author: José Fonseca <jfonseca@vmware.com> Date: Thu Nov 21 13:56:00 2013 +0000 mesa: Use IROUND instead of roundf. roundf is not available on MSVC.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.