summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texenv.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Rename CoordReplaceBits back to CoordReplace.Mathias Fröhlich2016-06-161-6/+6
| | | | | | | | It used to be called like that and fits better with 80 columns. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
* mesa: Remove the now unused CoordsReplace array.Mathias Fröhlich2016-06-161-2/+0
| | | | | | | | Now that all users are converted, remove the array. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
* mesa: Add gl_point_attrib::CoordReplaceBits bitfield.Mathias Fröhlich2016-06-161-12/+22
| | | | | | | | | | | | | The aim is to replace the CoordReplace array by a bitfield. Until all drivers are converted, establish the bitfield in parallel to the CoordReplace array. v2: Fix bitmask logic. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
* mesa: update some old-style (K&R?) function pointer callsBrian Paul2015-11-201-1/+1
| | | | Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* mesa: Rename _mesa_lookup_enum_by_nr() to _mesa_enum_to_string().Kenneth Graunke2015-07-201-5/+5
| | | | | | | Generated by sed; no manual changes. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com>
* main: Refactor _mesa_[update|get]_clamp_fragment_color.Laura Ekstrand2015-05-141-1/+1
| | | | | Reviewed-by: Fredrik Höglund <fredrik@kde.org> Signed-off-by: Fredrik Höglund <fredrik@kde.org>
* Remove the ATI_envmap_bumpmap extensionJason Ekstrand2014-06-301-198/+0
| | | | | | | | | | | As far as I can tell, the Intel mesa driver is the only driver in the world still supporting this legacy extension. If someone wants to do bump mapping, they can use shaders. Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> [v1] Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> [v2] Reviewed-by: Ian Romanick <idr@freedesktop.org> [v3]
* mesa: replace ctx->Const.{Vertex,Fragment,Geomtery}Program with an array.Paul Berry2014-01-091-4/+4
| | | | | | | | | | | | | | | | | | | | These are replaced with ctx->Const.Program[MESA_SHADER_{VERTEX,FRAGMENT,GEOMETRY}]. In patches to follow, this will allow us to replace a lot of ad-hoc logic with a variable index into the array. With the exception of the changes to mtypes.h, this patch was generated entirely by the command: find src -type f '(' -iname '*.c' -o -iname '*.cpp' -o -iname '*.py' \ -o -iname '*.y' ')' -print0 | xargs -0 sed -i \ -e 's/Const\.VertexProgram/Const.Program[MESA_SHADER_VERTEX]/g' \ -e 's/Const\.GeometryProgram/Const.Program[MESA_SHADER_GEOMETRY]/g' \ -e 's/Const\.FragmentProgram/Const.Program[MESA_SHADER_FRAGMENT]/g' Suggested-by: Brian Paul <brianp@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <brianp@vmware.com>
* mesa: move max texture image unit constants to gl_program_constantsMarek Olšák2013-05-111-4/+4
| | | | | | | | | | Const.MaxTextureImageUnits -> Const.FragmentProgram.MaxTextureImageUnits Const.MaxVertexTextureImageUnits -> Const.VertexProgram.MaxTextureImageUnits etc. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* 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 <brianp@vmware.com>
* 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 <brianp@vmware.com>
* 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 <brianp@vmware.com>
* mesa: don't set _ClampFragmentColor to TRUE if it has no effectMarek Olšák2013-04-061-1/+2
| | | | | | | | This should reduce shader recompilations with drivers that emulate fragment color clamping, because we want the clamping to be enabled only if there is a signed normalized or floating-point colorbuffer. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Drop manual checks for outside begin/end.Eric Anholt2013-01-211-8/+0
| | | | | | | | | | | We now have a separate dispatch table for begin/end that prevent these functions from being entered during that time. The ASSERT_OUTSIDE_BEGIN_END_WITH_RETVALs are left because I don't want to change any return values or introduce new error-only stubs at this point. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: Improve a glTexEnv error message by looking up the enum.Eric Anholt2013-01-211-1/+2
| | | | | Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: Rename API_OPENGL to API_OPENGL_COMPAT.Paul Berry2012-11-291-13/+13
| | | | | | | | | | This should help avoid confusion now that we're using the gl_api enum to distinguishing between core and compatibility API's. The corresponding enum value for core API's is API_OPENGL_CORE. Acked-by: Eric Anholt <eric@anholt.net> Acked-by: Matt Turner <mattst88@gmail.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa/es: Validate glGetTexEnv parameters in Mesa code rather than the ES wrapperIan Romanick2012-08-291-5/+5
| | | | Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa/es: Validate glTexEnv parameters in Mesa code rather than the ES wrapperIan Romanick2012-08-291-12/+19
| | | | Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: Remove EXT_texture_lod_bias extension enable flagIan Romanick2011-09-291-15/+0
| | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. This extension was previously not supported on mach64, mga, or r128. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: Remove EXT_texture_env_combine extension enable flagIan Romanick2011-09-291-100/+21
| | | | | | | | | | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. The existing support is already partially broken in Mesa (e.g., querying GL_TEXTURE_ENV_MODE in OpenGL ES 2.x). This patch does not change the situation in any way. It looks like the only hardware supported by Mesa that cannot do ARB_texture_env_combine is pre-NV10 NVIDA chips. It appears that these chips cannot do the GL_SUBTRACT mode. Based on looking at older copies of nvOpenGLspecs.pdf found on the net, NVIDIA never supported ARB_texture_env_combine on those chips either. This extension was previously not supported on mach64, mga (G200), r128, savage, sis, and tdfx (Voodoo Banshee and Voodoo3). Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: Remove EXT_texture_env_add extension enable flagIan Romanick2011-09-291-3/+1
| | | | | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. The existing support is already partially broken in Mesa (e.g., querying GL_TEXTURE_ENV_MODE in OpenGL ES 2.x). This patch does not change the situation in any way. This extension was previously not supported on mach64, mga (G200), savage (Savage3D and other pre-Savage4), sis, and tdfx (Voodoo Banshee). Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: fix error handling for glTexEnvYuanhan Liu2011-09-191-1/+2
| | | | | | | | Fix error handling while calling glTexEnv with invalid texture environment parameters. Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Signed-off-by: Brian Paul <brianp@vmware.com>
* mesa: Fix a couple of TexEnv unit limits.Henri Verbeet2011-07-071-3/+3
| | | | | | | | NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Henri Verbeet <hverbeet@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: implement clamping controls (ARB_color_buffer_float)Marek Olšák2011-03-291-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: Author: Marek Olšák <maraeo@gmail.com> mesa: fix getteximage so that it doesn't clamp values mesa: update the compute_version function mesa: add display list support for ARB_color_buffer_float mesa: fix glGet query with GL_ALPHA_TEST_REF and ARB_color_buffer_float commit b2f6ddf907935b2594d2831ddab38cf57a1729ce Author: Luca Barbieri <luca@luca-barbieri.com> Date: Tue Aug 31 16:50:57 2010 +0200 mesa: document known possible deviations from ARB_color_buffer_float commit 5458935be800c1b19d1c9d1569dc4fa30a97e8b8 Author: Luca Barbieri <luca@luca-barbieri.com> Date: Tue Aug 24 21:54:56 2010 +0200 mesa: expose GL_ARB_color_buffer_float commit aef5c3c6be6edd076e955e37c80905bc447f8a82 Author: Luca Barbieri <luca@luca-barbieri.com> Date: Thu Aug 26 18:12:34 2010 +0200 mesa, mesa/st: handle read color clamping properly (I'll squash the st/mesa part to a separate commit. -Marek) We set IMAGE_CLAMP_BIT in the caller based on _ClampReadColor, where the operation mandates it. TODO: did I get the set of operations mandating it right? commit 3a9cb5e59b676b6148c50907ce6eef5441677e36 Author: Luca Barbieri <luca@luca-barbieri.com> Date: Thu Aug 26 18:09:41 2010 +0200 mesa: respect color clamping in texenv programs (v2) Changes in v2: - Fix attributes other than vertex color sometimes getting clamped commit de26f9e47e886e176aab6e5a2c3d4481efb64362 Author: Luca Barbieri <luca@luca-barbieri.com> Date: Thu Aug 26 18:05:53 2010 +0200 mesa: restore color clamps on glPopAttrib commit a55ac3c300c189616627c05d924c40a8b55bfafa Author: Luca Barbieri <luca@luca-barbieri.com> Date: Thu Aug 26 18:04:26 2010 +0200 mesa: clamp color queries if and only if fragment clamping is enabled commit 9940a3e31c2fb76cc3d28b15ea78dde369825107 Author: Luca Barbieri <luca@luca-barbieri.com> Date: Wed Aug 25 00:00:16 2010 +0200 mesa: introduce derived _ClampXxxColor state resolving FIXED_ONLY To do this, we make ClampColor call FLUSH_VERTICES with the appropriate _NEW flag. We introduce _NEW_FRAG_CLAMP since fragment clamping has wide-ranging effects, despite being in the Color attrib group. This may be easily changed by s/_NEW_FRAG_CLAMP/_NEW_COLOR/g commit 6244c446e3beed5473b4e811d10787e4019f59d6 Author: Luca Barbieri <luca@luca-barbieri.com> Date: Thu Aug 26 17:58:24 2010 +0200 mesa: add unclamped color parameters
* mesa: minor improvements in glTexEnvfv()Brian Paul2011-03-171-16/+17
|
* mesa: Include mtypes.h in files that use gl_context struct.Vinson Lee2011-01-051-0/+1
| | | | | | Directly include mtypes.h if a file uses a gl_context struct. This allows future removal of headers that are not strictly necessary but indirectly include mtypes.h for a file.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-7/+7
|
* mesa: Refactor parameter processing in set_combiner_(operand|source)Ian Romanick2010-09-081-68/+22
| | | | | The enum values were chosen to have sequential values for a reason. Use that to compact and simplify the code.
* mesa: Fix handling of texenv operands for EXT vs ARB versionIan Romanick2010-09-081-18/+19
| | | | | | | | | | GL_EXT_texture_env_combine has slightly more restrictive limits on the valid sources for some operands. This wasn't caught before because almost every driver in Mesa that supports the EXT version also supports the ARB version. Inspired by a patch posted the the mesa-dev mailing list by Andrew Randrianasulu.
* mesa: Fix array out-of-bounds access in _mesa_TexEnvf.Vinson Lee2009-11-281-1/+4
| | | | | _mesa_TexEnvf calls _mesa_TexEnvfv, which uses the param argument as an array.
* mesa: minor clean-ups in bumpmap functionsBrian Paul2009-08-131-14/+39
|
* mesa: use _mesa_get_current_tex_unit() in more placesBrian Paul2009-08-131-6/+10
|
* mesa: Use integer type with appropriate sign.José Fonseca2009-06-151-2/+2
|
* mesa: texture combine clean-upsBrian Paul2009-04-011-25/+25
| | | | | | Use MAX_COMBINER_TERMS instead of 4. Rename some vars. Update comments.
* mesa: add support for ATI_envmap_bumpmapRoland Scheidegger2009-03-121-1/+173
| | | | | | | | add new entrypoints, new texture format, etc translate in texenvprogram.c for drivers using the mesa-generated tex env fragment program also handled in swrast, but not tested (cannot work due to negative texel results not handled correctly)
* mesa: don't include m_xform.h where not neededBrian Paul2009-02-121-1/+0
|
* mesa: update glTexEnv(), glGetTexEnv() for GL_NV_texture_env_combine4Brian Paul2009-01-231-2/+83
|
* mesa: consolidate glGetTexEnvi/f() code with new get_texenvi() helperBrian Paul2009-01-231-214/+125
|
* mesa: refactor _mesa_TexEnvfv() code with helper functionsBrian Paul2009-01-231-348/+373
|
* mesa: refactor: move various ENUM_TO_x macros into macros.hBrian Paul2008-09-211-2/+0
|
* mesa: refactor: move glTexEnv-related functions into new texenv.c fileBrian Paul2008-09-211-0/+863
(cherry picked from commit 7ecac78ab53016ae3db3dd601b187cb050037463)