summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/imports.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa: #define fprintf to be __mingw_fprintf() on Mingw32Brian Paul2012-06-221-0/+10
| | | | | | So that formats such as "%llx" are understood. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: reimplement IROUND(), add F_TO_I()Brian Paul2012-05-191-21/+36
| | | | | | | | | | | | | | The different implementations of IROUND() behaved differently and in the case of fistp, depended on the current x86 FPU rounding mode. This caused some tests like piglit roundmode-pixelstore and roundmode-getintegerv to fail on 32-bit x86 but pass on 64-bit x86. Now IROUND() always rounds to the nearest integer (away from zero). The new F_TO_I function converts a float to an int by whatever means is fastest. We'll use this where we're more concerned with performance and not too worried to how the conversion is done. Reviewed-by: José Fonseca <[email protected]>
* mesa: split error handling into its own filenobled2012-03-101-14/+3
| | | | Also add _mesa_vsnprintf.
* mesa/gallium: add FFS_DEFINED to protect ffs() from multiple definitionsBrian Paul2012-01-121-0/+4
| | | | | | | | We include both imports.h and u_math.h in the state tracker. This leads to multiple, conflicting definitions of ffs() with MSVC. Use FFS_DEFINED to skip the ffs() in u_math.h. Reviewed-by: José Fonseca <[email protected]>
* mesa: remove _mesa_ffs(), implement ffs() for non-GNU platformsBrian Paul2012-01-121-13/+8
| | | | | | | | | | | Call ffs() and ffsll() everywhere. Define our own ffs(), ffsll() functions when the platform doesn't have them. v2: remove #ifdef _WIN32, __IBMC__, __IBMCPP_ tests inside ffs() implementation. The #else clause was recursive. Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: Alexander von Gluck <[email protected]>
* mesa: Use __builtin_ffsll on Mac OS X.Vinson Lee2011-12-281-1/+1
| | | | | | | | | Fixes this GCC warning. arrayobj.c: In function '_mesa_update_array_object_max_element': arrayobj.c:310: warning: implicit declaration of function 'ffsll' Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Fix compilation on cygwin after commit 762c9766c93697af8d7fbaa729aed118789dbe8eJon TURNEY2011-12-201-1/+1
| | | | | | | | | | | | | Fix compilation on cygwin after commit 762c9766c93697af8d7fbaa729aed118789dbe8e "Use VERT_ATTRIB_* indexed array in gl_array_object" added the first non-driver use of ffsll(), which exposes the fact that this isn't provided on cygwin. Found by tinderbox, see [1] [1] http://tinderbox.freedesktop.org/builds/2011-11-30-0017/logs/libGL/#build Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Convert additional GNUC_MINOR checks to multiplied versionAlan Coopersmith2011-10-211-3/+3
| | | | | | Signed-off-by: Alan Coopersmith <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* Fix gcc version checks for _mesa_bitcountAlan Coopersmith2011-10-211-1/+1
| | | | | | | | | | | | | | - Fix _GNUC__ typo in both checks - Fix logic error in check for gcc < 3.4 that breaks for gcc 2.x & older Without this fix, builds with gcc 3.4.x end up depending on undefined _mesa_bitcount instead of gcc's __builtin_popcount. NOTE: This is a candidate for the stable branches. Signed-off-by: Alan Coopersmith <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Create _mesa_bitcount_64() to replace i965's brw_count_bits()Paul Berry2011-10-061-0/+3
| | | | | | | | | | | | | | | | The i965 driver already had a function to count bits in a 64-bit uint (brw_count_bits()), but it was buggy (it only counted the bottom 32 bits) and it was clumsy (it had a strange and broken fallback for non-GCC-like compilers, which fortunately was never used). Since Mesa already has a _mesa_bitcount() function, it seems better to just create a _mesa_bitcount_64() function rather than special-case this in the i965 driver. This patch creates the new _mesa_bitcount_64() function and rewrites all of the old brw_count_bits() calls to refer to it. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: s/INLINE/inline/Brian Paul2011-10-011-24/+24
| | | | | | | INLINE is still seen in some files (some generated files, etc) but this is a good start. Acked-by: Kenneth Graunke <[email protected]>
* mesa: android has no log2f nor ffsChia-I Wu2011-08-211-1/+7
| | | | | | Define log2f(v) to be logf(v) / M_LN2 and ffs to __builtin_ffs. Reviewed-by: Chad Versace <[email protected]>
* mesa: use __builtin_clz for logbase2 when availableRoland Scheidegger2011-06-091-0/+21
| | | | | Also rename to _mesa_logbase2 and move to imports.h to keep the ugly ifdef GNUC stuff outside other files (also to allow reuse).
* mesa: Avoid undeclared ffs function warning on mingw.José Fonseca2011-02-221-0/+6
|
* i965: Use compiler builtins when availableChris Wilson2011-02-211-0/+13
| | | | Signed-off-by: Chris Wilson <[email protected]>
* mesa: Add definitions for inverse hyperbolic function on MSVC.Vinson Lee2010-11-151-0/+3
|
* mesa: add more work-arounds for acoshf(), asinhf(), atahf()Brian Paul2010-11-151-0/+3
|
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-5/+5
|
* Get rid of GL/internal/glcore.hKristian Høgsberg2010-10-131-4/+6
| | | | | | | __GLcontextModes is always only used as an implementation internal struct at this point and we shouldn't install glcore.h anymore. Anything that needs __GLcontextModes should just include the struct in its headers files directly.
* mesa: Add __printf__ attribute to printf-like functions to get warnings.Eric Anholt2010-09-011-5/+5
|
* glsl/mesa: fixes for MSVCAras Pranckevicius2010-08-251-0/+1
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: added isblank() for MSVCBrian Paul2010-08-241-0/+1
|
* glsl2: Include imports.h to get snprintf wrapper for MSVCIan Romanick2010-08-231-0/+6
| | | | Signed-off-by: José Fonseca <[email protected]>
* mesa: Fix msvc build of glsl.Aras Pranckevicius2010-08-231-2/+7
| | | | Signed-off-by: José Fonseca <[email protected]>
* mesa: Check that _XOPEN_SOURCE is defined before using it.Vinson Lee2010-08-151-1/+1
|
* mesa: Recent versions of MSVC define the single precision functions already.José Fonseca2010-08-141-1/+2
|
* mesa: atan2f and powf need two args.José Fonseca2010-08-141-2/+2
|
* mesa: Work-arounds for platforms that lack C99 math functionsIan Romanick2010-08-131-0/+28
|
* mesa: Move [UN]CLAMPED_FLOAT_TO_UBYTE from imports.h to macros.h.Vinson Lee2010-07-091-36/+0
| | | | The other similar integer/float conversion macros are in macros.h.
* mesa: Remove no-op wrappers around trig functions.Eric Anholt2010-05-131-15/+0
|
* mesa: Remove _mesa_pow(), which is always just pow().Eric Anholt2010-05-131-3/+0
|
* mesa: Fix build with gcc 3.3.Matthieu Herrb2010-04-191-2/+4
| | | | Signed-off-by: Brian Paul <[email protected]>
* Replace _mesa_strtod with _mesa_strtof.Marcin Baczyński2010-03-151-2/+2
| | | | Reviewed-by: Ian Romanick <[email protected]>
* Remove support for GCC older than 3.3.0Ian Romanick2010-03-031-3/+1
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa: restore _mesa_snprintf() - it's needed for WindowsBrian Paul2010-02-191-0/+3
| | | | This reverts part of commit 298be2b028263b2c343a707662c6fbfa18293cb2
* Drop macro wrappers for the aligned memory functionsKristian Høgsberg2010-02-191-11/+0
|
* Replace the _mesa_*printf() wrappers with the plain libc versionsKristian Høgsberg2010-02-191-16/+0
|
* Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versionsKristian Høgsberg2010-02-191-14/+5
|
* mesa: replace _mesa_bzero() with memset()Brian Paul2010-02-191-3/+0
|
* mesa: replace old MEMSET macro with memsetBrian Paul2010-02-191-3/+0
|
* mesa: replace old MEMCPY macro with memcpyBrian Paul2010-02-191-2/+0
|
* Remove _mesa_memcmp in favor of plain memcmp.Kenneth Graunke2010-02-191-3/+0
| | | | This may break the SUNOS4 build, but it's no longer relevant.
* Remove _mesa_memset in favor of plain memset.Kenneth Graunke2010-02-191-4/+1
| | | | This may break the SUNOS4 build, but it's no longer relevant.
* Remove _mesa_memcpy in favor of plain memcpy.Kenneth Graunke2010-02-191-4/+1
| | | | This may break the SUNOS4 build, but it's no longer relevant.
* Remove _mesa_atoi in favor of plain atoi.Kenneth Graunke2010-02-191-3/+0
|
* Remove _mesa_strncmp in favor of plain strncmp.Kenneth Graunke2010-02-191-3/+0
|
* Remove _mesa_strcmp in favor of plain strcmp.Kenneth Graunke2010-02-191-3/+0
|
* Remove _mesa_strlen in favor of plain strlen.Kenneth Graunke2010-02-191-3/+0
|
* Remove _mesa_strncpy in favor of plain strncpy.Kenneth Graunke2010-02-191-3/+0
|
* Remove _mesa_strcpy in favor of plain strcpy.Kenneth Graunke2010-02-191-3/+0
|