aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/imports.h
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Generalize MSVC fix for strcasecmp().Paul Berry2013-10-291-0/+1
| | | | | | | | This will let us use strcasecmp() from anywhere inside Mesa without having to worry about the fact that it doesn't exist in MSVC. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke2013-04-231-3/+4
| | | | | | | | | | | | | | The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <[email protected]>
* mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <[email protected]>
* mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | | Generated automatically be the following shell command: $ git grep 'BRIAN PAUL BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/BRIAN PAUL/THE AUTHORS/' {} The intention here is to protect all authors, not just Brian Paul. I believe that was already the sensible interpretation, but spelling it out is probably better. More practically, it also prevents people from accidentally copy & pasting the license into a new file which says Brian is not liable when he isn't even one of the authors. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove platform checks around __builtin_ffs, __builtin_ffsllBrian Paul2013-04-011-6/+0
| | | | | | | | | | | Use the __builtin_ffs, __builtin_ffsll functions whenever we have GCC, not just for specific platforms. Fixes Solaris build. Note: This is a candidate for the stable branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62868 Signed-off-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa,glsl: Move round_to_even() from glsl to mesa/main (v2)Chad Versace2013-01-241-0/+3
| | | | | | | | | | | | | Move round_to_even's definition to mesa/main so that _mesa_float_to_half() can use it in order to eliminate rounding bias. In additon to moving the fuction definition, prefix its name with "_mesa", just as all other functions in mesa/main are prefixed. v2: Fix Android build. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* Remove OpenVMS supportMatt Turner2012-11-161-2/+0
| | | | | | | | | | Not maintained since 2008. Doubtful that it's worked in quite a while. Also see commit 32ac8cb05 which removed VMS stuff from Makefile in 2009. Cc: Jouk Jansen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Andreas Boll <[email protected]>
* vbo: fix glVertexAttribI* functionsMarek Olšák2012-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | The functions were broken, because they converted ints to floats. Now we can finally advertise OpenGL 3.0. ;) In this commit, the vbo module also tracks the type for each attrib in addition to the size. It can be one of FLOAT, INT, UNSIGNED_INT. The little ugliness is the vertex attribs are declared as floats even though there may be integer values. The code just copies integer values into them without any conversion. This implementation passes the glVertexAttribI piglit test which I am going to commit in piglit soon. The test covers vertex arrays, immediate mode and display lists. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> v2: cosmetic changes as suggested by Brian
* mesa: add signbit() macroBrian Paul2012-09-241-0/+7
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: Add a _mesa_fls() function to find the last bit set in a word.Kenneth Graunke2012-09-121-0/+22
| | | | | | | | | | | ffs() finds the least significant bit set; _mesa_fls() finds the /most/ significant bit. v2: Make it an inline function in imports.h, per Brian's suggestion. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: remove SQRTF, use sqrtf. Convert INV_SQRT() to inline function.Brian Paul2012-09-031-12/+10
| | | | | | | We were already defining sqrtf where we don't have the C99 version. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: remove accidentally committed __SUNPRO_C sqrtf() codeBrian Paul2012-09-031-4/+0
|
* mesa: clean-up LOG2() functionBrian Paul2012-09-011-18/+16
|
* mesa: move IS_NEGATIVE() and DIFFERENT_SIGNS() to macros.hBrian Paul2012-09-011-29/+0
|
* mesa: clean up F_TO_I, IFLOOR, ICEIL functionsBrian Paul2012-09-011-60/+30
| | | | Put all the #ifdef stuff inside the function bodies instead of outside.
* imports.h: Correct ceilf typo.Matt Turner2012-07-221-1/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* Remove unused _mesa_memset16Matt Turner2012-07-211-3/+0
| | | | | | | Unused since commit fd104a845. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Remove _mesa_inv_sqrtf in favor of 1/SQRTFMatt Turner2012-07-211-8/+1
| | | | | | | | Except for a couple of explicit uses, _mesa_inv_sqrtf was disabled since its addition in 2003 (see f9b1e524). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Remove _mesa_sqrt* in favor of plain sqrtMatt Turner2012-07-211-14/+1
| | | | | | | | | | Temporarily disabled since 2003 (see 386578c5b). This saves us from calling sqrt() 128 times to generate the sqrttab in one_time_init(). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Revert "mesa: #define fprintf to be __mingw_fprintf() on Mingw32"Brian Paul2012-07-051-10/+0
| | | | | | | | | This reverts commit cbffaf20e9e6154310ba68bb2b44adc37ba83bcd. Use the PRIx64 macro in the fprintf() call instead, as suggested by Dylan Noblesmith. Reviewed-by: José Fonseca <[email protected]>
* 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.