summaryrefslogtreecommitdiffstats
path: root/src/mesa/math
Commit message (Collapse)AuthorAgeFilesLines
* tree-wide: remove trailing backslashEric Engestrom2017-06-071-1/+1
| | | | | | | | | Simple search for a backslash followed by two newlines. If one of the newlines were to be removed, this would cause issues, so let's just remove these trailing backslashes. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Remove every double semi-colonJakob Sinclair2016-04-261-1/+1
| | | | | | Signed-off-by: Jakob Sinclair <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa: Mark Identity as constIan Romanick2016-01-111-1/+1
| | | | | | | | | | | | | | | I was going to send this as review for dce1e1a8, but I missed that window. This saves 64 bytes of unshared data and prelaces it with 96 bytes shared text. My guess is that some of the calls to memcpy get optimized to something else. text data bss dec hex filename 7847613 220208 27432 8095253 7b8615 i965_dri.so before 7847709 220144 27432 8095285 7b8635 i965_dri.so after Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Cc: Brian Paul <[email protected]>
* mesa: minor clean-up of some memcpy/sizeof() calls in m_matrix.cBrian Paul2016-01-051-7/+7
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* mesa/math: Avoid double promotion.Matt Turner2015-07-293-46/+46
| | | | Reviewed-by: Iago Toral Quiroga <[email protected]>
* mesa: Use floats for viewport bounds.Matt Turner2015-07-292-4/+4
| | | | | | | | | | | | | | | | | | ARB_viewport_array specifies that DEPTH_RANGE consists of double- precision parameters (corresponding commit d4dc35987), and a preparatory commit (6340e609a) added _mesa_get_viewport_xform() which returned double-precision scale[3] and translate[3] vectors, even though X, Y, Width, and Height were still floats. All users of _mesa_get_viewport_xform() immediately convert the double scale and translation vectors into floats (which were floats originally, but were converted to doubles in _mesa_get_viewport_xform(), sigh). i965 at least cannot consume doubles (see SF_CLIP_VIEWPORT). If we want to pass doubles to hardware, we should have a different function that does that. Acked-by: Mathias Froehlich <[email protected]>
* doxygen: Link GLvector4f struct members properly, avoiding invalid XML/HTML ↵Rhys Kidd2015-07-231-1/+1
| | | | | | | | warning Signed-off-by: Rhys Kidd <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* doxygen: Correct grammatical typo in math/m_vector.hRhys Kidd2015-07-231-1/+1
| | | | | | Signed-off-by: Rhys Kidd <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Fix a few typosZoë Blade2015-04-271-1/+1
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* mesa: remove _XFORMAPIBrian Paul2015-03-124-64/+56
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: include stdio.h where neededBrian Paul2015-03-051-0/+1
| | | | | | | Instead of relying on glapi.h or some other header to provide it. Acked-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mesa: trim down includes of compiler.hBrian Paul2015-03-021-1/+0
| | | | | | | In some cases, glheader.h is the right #include. Also remove some instances of struct _glapi_table declarations. Acked-by: Matt Turner <[email protected]>
* mesa: remove _NORMAPI, _NORMAPIP macrosBrian Paul2015-02-281-1/+1
| | | | | | Was only used in one place. Use equivalent _XFORMAPIP there instead. Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove DEG2RAD macroBrian Paul2015-02-241-2/+2
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove INV_SQRTF() macroBrian Paul2015-02-243-5/+7
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: replace FABSF with fabsfBrian Paul2015-02-241-8/+9
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: replace FREXPF, LDEXPF with frexpf, ldexpfBrian Paul2015-02-241-3/+6
| | | | | | Start getting rid of some imports.h macros. Use the c99 functions instead. Reviewed-by: Matt Turner <[email protected]>
* mesa: Use assert() instead of ASSERT wrapper.Matt Turner2015-02-232-6/+6
| | | | Acked-by: Eric Anholt <[email protected]>
* mesa: Remove CHECK macro.Matt Turner2015-02-232-52/+30
| | | | | | | There's some commentary about how it's defined by other "modules", and maybe that was true in 2000 when the code was added. Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove unused _math_trans_4chan()Brian Paul2015-02-192-31/+0
| | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Refactor viewport transform computation.Mathias Fröhlich2014-10-242-11/+10
| | | | | | | | | | This is for preparation of ARB_clip_control. v3: Add comments. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]>
* mesa: Drop _mesa_getenv() wrapper.Matt Turner2014-09-243-3/+3
| | | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: Converty gl_viewport_attrib::X, ::Y, ::Width, and ::Height to floatCourtney Goeltzenleuchter2014-01-202-4/+5
| | | | | | | | | | v4: Split out from a single megapatch. Suggested by Ken. Also make meta's save_state::ViewportX, ::ViewportY, ::ViewportW, and ::ViewportH to match gl_viewport_attrib. Signed-off-by: Courtney Goeltzenleuchter <[email protected]> Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Convert gl_viewport_attrib::Near and ::Far to doubleCourtney Goeltzenleuchter2014-01-202-4/+4
| | | | | | | v4: Split out from a single megapatch. Suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: modified _mesa_align_free() to accept NULL pointerSiavash Eliasi2013-12-041-8/+5
| | | | | | | | | | | So that it acts like ordinary free(). This lets us remove a bunch of if statements where the function is called. v2: - Avoiding compile error on MSVC and possible warnings on other compilers. - Added comment regards passing NULL pointer being safe. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove macintosh preprocessor stuffBrian Paul2013-11-041-6/+6
| | | | | | IIRC, this is MacOS 9.x stuff. Reviewed-by: Matt Turner <[email protected]>
* mesa: remove Watcom C supportBrian Paul2013-11-041-2/+0
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-0521-21/+0
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke2013-04-2321-63/+84
| | | | | | | | | | | | | | 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-2321-21/+21
| | | | | | | | | | | | | | | 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-2321-21/+21
| | | | | | | | | | | | | | | | 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]>
* Remove OpenVMS supportMatt Turner2012-11-161-47/+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]>
* Don't cast the return value of malloc/reallocMatt Turner2012-09-053-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has been generated by the following Coccinelle semantic patch: // Don't cast the return value of malloc/realloc. // // Casting the return value of malloc/realloc only stands to hide // errors. @@ type T; expression E1, E2; @@ - (T) ( _mesa_align_calloc(E1, E2) | _mesa_align_malloc(E1, E2) | calloc(E1, E2) | malloc(E1) | realloc(E1, E2) )
* mesa: s/CONST/const/ in math/ filesBrian Paul2012-09-054-42/+42
| | | | | | The CONST macro hack will go away soon. Reviewed-by: Matt Turner <[email protected]>
* mesa: remove SQRTF, use sqrtf. Convert INV_SQRT() to inline function.Brian Paul2012-09-031-1/+1
| | | | | | | 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: fix _math_matrix_copy(), againBrian Paul2012-07-301-1/+1
| | | | | The matrix is 16 GLfloats in size. Since from->inv is just a pointer (not an array), sizeof(*from->inv) wasn't right.
* mesa: Fix wrong sizeof argument in _math_matrix_copy.Vinson Lee2012-07-301-1/+1
| | | | | | | Fixes Coverity wrong sizeof argument defect. Signed-off-by: Vinson Lee <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: remove obsolete matrix commentBrian Paul2012-07-261-1/+0
|
* mesa: fix comment typo: s/pointer/point/Brian Paul2012-07-261-1/+1
|
* mesa: remove _math_matrix_alloc_inv()Brian Paul2012-07-262-44/+12
| | | | | | | Always allocate space for the inverse matrix in _math_matrix_ctr() since we were always calling _math_matrix_alloc_inv() anyway. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: loosen small matrix determinant checkBrian Paul2012-07-261-1/+1
| | | | | | | | | | | | | When computing a matrix inverse, if the determinant is too small we could hit a divide by zero. There's a check to prevent this (we basically give up on computing the inverse and return the identity matrix.) This patch loosens this test to fix a lighting bug reported by Lars Henning Wendt. v2: use abs(det) to handle negative values NOTE: This is a candidate for the 8.0 branch. Tested-by: Lars Henning Wendt <[email protected]>
* Use INV_SQRT instead of 1/SQRTFMatt Turner2012-07-211-2/+2
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Remove src/mesa/ppcMatt Turner2012-01-211-6/+0
| | | | It didn't actually do anything except modify the GL_RENDERER string.
* mesa,glsl,mapi: Put extern "C" { ... } where appropriate.José Fonseca2011-11-091-0/+9
| | | | | Probably a several places missing, but enough to cover all headers (in)directly included by uniform_query.cpp, and fix the MSVC build.
* mesa: move last bits of GLchan stuff into swrastBrian Paul2011-09-201-1/+1
| | | | | This removes the last remnants of the GLchan datatype and associated macros out of core Mesa and into swrast.
* mesa: add error margin to clip mask debug/check codeBrian Paul2010-12-061-2/+29
| | | | | | | | When X or Y or Z is close to W the outcome of the floating point clip test comparision may be different between the C and x86 asm paths. That's OK; don't report an error. See fd.o bug 32093
* math: remove duplicated includesNicolas Kaiser2010-09-302-2/+0
| | | | | | Remove duplicated includes. Signed-off-by: Brian Paul <[email protected]>
* mesa: Fix printf format warning.Vinson Lee2010-09-291-1/+1
| | | | | | Fixes this GCC warning. math/m_debug_xform.c: In function '_math_test_all_transform_functions': math/m_debug_xform.c:320: warning: format not a string literal and no format arguments
* mesa: Fix printf format warning.Vinson Lee2010-09-291-1/+1
| | | | | | Fixes this GCC warning. math/m_debug_norm.c: In function '_math_test_all_normal_transform_functions': math/m_debug_norm.c:365: warning: format not a string literal and no format arguments
* mesa: Fix printf format warning.Vinson Lee2010-09-291-1/+1
| | | | | | Fixes this GCC warning. math/m_debug_clip.c: In function '_math_test_all_cliptest_functions': math/m_debug_clip.c:363: warning: format not a string literal and no format arguments