Summary: | Function roundf undeclared in textparam.c when building with MSVC11 | ||
---|---|---|---|
Product: | Mesa | Reporter: | Zachary Greve <ztgreve> |
Component: | Mesa core | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | 10.0 | ||
Hardware: | x86 (IA32) | ||
OS: | Windows (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Zachary Greve
2014-01-22 15:21:07 UTC
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.