summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/getstring.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: add support for GLSL ES 3.20 version stringIlia Mirkin2016-05-261-0/+2
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* mesa: Move robustness code to main/robustness.cKristian Høgsberg Kristensen2016-05-261-136/+0
| | | | | | Signed-off-by: Kristian Høgsberg Kristensen <krh@bitplanet.net> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: 80-column wrapping for _context_lost_GetSynciv()Brian Paul2016-05-251-2/+2
| | | | Reviewed-by: Kristian Høgsberg Kristensen <krh@bitplanet.net>
* mesa: add GLAPIENTRY to new _context_lost_X functionsBrian Paul2016-05-251-2/+2
| | | | | | | To fix MSVC build. Any function which goes into the dispatch table needs to have the GLAPIENTRY (__stdcall) tag. Reviewed-by: Kristian Høgsberg Kristensen <krh@bitplanet.net>
* i965: Enable GL_KHR_robustnessKristian Høgsberg Kristensen2016-05-251-1/+81
| | | | | | | | | | | | | | | GL_KHR_robustness adds the GL_CONTEXT_LOST error and five new entry points that we already implement. This patch adds a new dispatch table that returns GL_CONTEXT_LOST from all entry points and implements the GL_LOSE_CONTEXT_ON_RESET strategy by setting that table when we learn that we've lost the context. With the GL_CONTEXT_LOST reporting in place and dispatch for the new entry points we can turn on GL_KHR_robustness. Signed-off-by: Kristian Høgsberg Kristensen <krh@bitplanet.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
* mesa: move GL_ARB_debug_output code into new debug_output.c fileBrian Paul2016-02-081-0/+1
| | | | | | | | The errors.c file had grown quite large so split off this extension code into its own file. This involved making a handful of functions non-static. Acked-by: Timothy Arceri <timothy.arceri@collabora.com>
* mesa: update some old-style (K&R?) function pointer callsBrian Paul2015-11-201-1/+1
| | | | Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* main: Don't restrict several KHR_debug enum to desktop GLBoyan Ding2015-11-201-4/+1
| | | | | | | | | In preparation for supporting GL_KHR_debug in OpenGL ES v2: add a missing hunk in _mesa_IsEnabled (Emil) Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* mesa: use the correct string for the ES GL_KHR_debug functionsEmil Velikov2015-11-201-2/+8
| | | | | | | | | As defined in the spec when implemented in an OpenGL ES context, all entry points defined by this extension must have a "KHR" suffix. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* mesa: Rename _mesa_lookup_enum_by_nr() to _mesa_enum_to_string().Kenneth Graunke2015-07-201-2/+2
| | | | | | | Generated by sed; no manual changes. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa/es3.1: Enable ES 3.1 API and shading language versionIan Romanick2015-05-281-4/+12
| | | | | | | | | | | This is a bit of a hack for now. Several of the extensions required for OpenGL ES 3.1 have no support, at all, in Mesa. However, with this patch and a patch to allow MESA_GL_VERSION_OVERRIDE to work with ES contexts, people can begin testing the ES "version" of the functionality that is supported. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* main: return two minor digits for ES shading language versionSamuel Iglesias Gonsalvez2014-12-091-1/+1
| | | | | | | | | | | | | | | For OpenGL ES 3.0 spec, the minor number for SHADING_LANGUAGE_VERSION is always two digits, matching the OpenGL ES Shading Language Specification release number. For example, this query might return the string "3.00". This patch fixes the following dEQP test: dEQP-GLES3.functional.state_query.string.shading_language_version No piglit regression observed. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* main, glsl: Bump max known desktop glsl version to 4.50Jordan Justen2014-12-011-0/+6
| | | | | Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* mesa: use accessors for struct gl_debug_stateChia-I Wu2014-04-271-14/+3
| | | | | | | | | | | | | | | | When GL_DEBUG_OUTPUT_SYNCHRONOUS is GL_TRUE, drivers are allowed to log debug messages from other threads. That requires gl_debug_state to be protected by a mutex, even when it is a context state. While we do not spawn threads in Mesa yet, this commit makes it easier to do when we want to. Since the definition of struct gl_debug_state is no longer needed by the rest of the driver, move it to main/errors.c. This should make it even harder to use the struct incorrectly. v2: add comments for the accessors Signed-off-by: Chia-I Wu <olv@lunarg.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: fix GetStringi error message with correct function nameBenjamin Bellec2014-04-211-1/+1
| | | | | | Signed-off-by: Benjamin Bellec <b.bellec@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Cc: <mesa-stable@lists.freedesktop.org>
* mesa: switch to c11 mutex functionsBrian Paul2014-03-031-2/+2
| | | | Reviewed-by: José Fonseca <jfonseca@vmware.com>
* mesa: allocate gl_debug_state on demandBrian Paul2014-02-081-4/+12
| | | | | | | | | | | | We don't need to allocate all the state related to GL_ARB_debug_output until some aspect of that extension is actually needed. The sizeof(gl_debug_state) is huge (~285KB on 64-bit systems), not even counting the 54(!) hash tables and lists that it contains. This change reduces the size of gl_context alone from 431KB bytes to 145KB bytes on 64-bit systems and from 277KB bytes to 78KB bytes on 32-bit systems. Reviewed-by: Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: Rename ArrayObj to VAO and DefaultArrayObj to DefaultVAO.Kenneth Graunke2014-02-031-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When reading through the Mesa drawing code, it's not immediately obvious to me that "ArrayObj" (gl_array_object) is the Vertex Array Object (VAO) state. The comment above the structure explains this, but readers still have to remember this and translate accordingly. Out of context, "array object" is a fairly vague. Even in context, "array" has a lot of meanings: glDrawArrays, vertex data stored in user arrays, gl_client_arrays, gl_vertex_attrib_arrays, and so on. Using the term "VAO" immediately associates these fields with the OpenGL concept, clarifying the situation and aiding programmer sanity. Completely generated by: $ find . -type f -print0 | xargs -0 sed -i \ -e 's/ArrayObj;/VAO;/g' \ -e 's/->ArrayObj/->VAO/g' \ -e 's/Array\.ArrayObj/Array.VAO/g' \ -e 's/Array\.DefaultArrayObj/Array.DefaultVAO/g' v2: Rerun command to resolve conflicts with Ian's meta patches. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: It is not possible to have GLSL < 1.20Ian Romanick2013-12-201-2/+0
| | | | | | | This hasn't been possible for a long time. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Implement proper tracking logic for glGetGraphicsResetStatusARBIan Romanick2013-11-071-4/+43
| | | | | | | Drivers still have to implement dd_function_table::GetGraphicsResetStatus. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Remove gl_context::ResetStatusIan Romanick2013-11-071-1/+1
| | | | | | | | This isn't going to be used in the actual implemenation of glGetGraphicsResetStatus. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Add ARB_vertex_attrib_bindingFredrik Höglund2013-11-071-9/+9
| | | | | | | update_array() and update_array_format() are changed to update the new attrib and binding states, and the client arrays become derived state. Reviewed-by: Eric Anholt <eric@anholt.net>
* mesa: Rename gl_array_object::VertexAttrib to _VertexAttribFredrik Höglund2013-11-071-9/+9
| | | | | | | | This will become derived state as part of the ARB_vertex_attrib_binding support. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: update glext.h to version 20130708Brian Paul2013-07-121-1/+1
| | | | | | | | | | | | | This update fixes the problem with duplicated typedefs for GLclampf and GLclampd in the previous version. It also changes some parameter types for glDebugMessageCallbackARB() and glTransformFeedbackVaryingsEXT(). Note we should someday update the glapi-gen code so that it understands void pointer parameters. Currently, the Python code only understands "GLvoid *" but not "void *". Luckily, the compilers don't seem to complain about mixing GLvoid and void.
* mesa: GL_ARB_shader_objects is not optionalIan Romanick2013-06-281-5/+0
| | | | | | | | | | | | | | This extension just provides some of the most basic software framework for GLSL. Without GL_ARB_vertex_shader or GL_ARB_fragment_shader, applications still cannot use GLSL. There's no value in conditionalizing support for this extension. NOTE: This has the side effect of enabling the extension in the radeon, r200, and nouveau drivers. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <brianp@vmware.com>
* 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: remove #include "mfeatures.h" from numerous source filesBrian Paul2013-04-171-1/+0
| | | | | | None of the remaining FEATURE_x symbols in mfeatures.h are used anymore. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* mesa: Use PROGRAM_ERROR_STRING_ARB instead of the _NV nameMatt Turner2013-02-151-1/+1
| | | | | | | Since NV_fragment_program is now gone. No functional change, since the values are identical. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa/es3: Enable ES 3.0 API and shading language versionIan Romanick2013-01-251-1/+3
| | | | | | | | v2: Add ARB_internalformat_query to the list of required extensions. v3: Add OES_depth_texture_cube_map to the list of required extensions. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: Drop manual checks for outside begin/end.Eric Anholt2013-01-211-1/+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: Rename API_OPENGL to API_OPENGL_COMPAT.Paul Berry2012-11-291-12/+12
| | | | | | | | | | 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: Remove yet more remnants of NV_fragment_program.Kenneth Graunke2012-10-161-2/+1
| | | | | Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* mesa: Remove support for parsing NV vertex programs.Eric Anholt2012-10-151-1/+0
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove FEATURE_NV_(fragment|vertex)_program defines.Oliver McFadden2012-09-151-3/+0
| | | | | Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove FEATURE_ARB_shader_objects and related defines.Oliver McFadden2012-09-151-2/+0
| | | | | Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove FEATURE_point_size_array define.Oliver McFadden2012-09-151-2/+0
| | | | | Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Don't allow GL_EXTENSIONS query in core contextIan Romanick2012-08-291-0/+4
| | | | Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa/es: Validate glGetPointerv pname in Mesa code rather than the ES wrapperIan Romanick2012-08-291-2/+33
| | | | | | v2: Add proper core-profile, GLES1, and GLES3 filtering. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa/es: Validate glGetString pname in Mesa code rather than the ES wrapperIan Romanick2012-08-291-7/+12
| | | | Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: Support glGetString(GL_SHADING_LANGUAGE_VERSION) for >= 1.40.Kenneth Graunke2012-07-311-0/+10
| | | | | | | | | This will need to get refactored when we add support for core profiles or forward-compatible contexts, but we may as well have it in the meantime. This allows us to override the GLSL version and experiment. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
* mesa: add support for using API_OPENGL_COREJordan Justen2012-07-301-0/+1
| | | | | | | Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: Add support for parsing #version 140.Eric Anholt2012-03-151-0/+2
| | | | Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: add infrastructure for GL_ARB_debug_outputnobled2012-03-101-0/+6
| | | | Marek v2: don't add the extension to extensions.c yet
* mesa: Use VERT_ATTRIB_* indexed array in gl_array_object.Mathias Fröhlich2011-11-291-9/+9
| | | | | | | | | | | | Replace the distinct struct gl_client_array members in gl_array_object by an array of gl_client_arrays indexed by VERT_ATTRIB_*. Renumber the vertex attributes slightly to keep the old semantics of the distinct array members. Make use of the upper 32 bits in VERT_BIT_*. Update all occurances of the distinct struct members with the array equivalents. Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de> Reviewed-by: Eric Anholt <eric@anholt.net>
* Squashed commit of the following:Brian Paul2011-04-261-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 864fe253b04105b7469e5f7b064dc37637b944f8 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 21 20:13:07 2011 -0600 mesa: s/exec/disp/ in _mesa_init_histogram_dispatch() This function isn't normally compiled (FEATURE_histogram). commit f4bf45e2b94b582cacd19cdca873c5be627e4250 Author: nobled <nobled@dreamwidth.org> Date: Thu Apr 21 07:53:58 2011 -0600 mesa: hook up GL_ARB_robustness dispatch functions ...and advertise the extension. Signed-off-by: Brian Paul <brianp@vmware.com> commit 2b89e38e5f572dc40cebc06381ae7c5d04386998 Author: nobled <nobled@dreamwidth.org> Date: Thu Apr 21 07:53:58 2011 -0600 mesa: regenerated API files for GL_ARB_robustness Signed-off-by: Brian Paul <brianp@vmware.com> commit 5d5ebfb7135cec9d833adef86cbf4d0f3d9beca8 Author: nobled <nobled@dreamwidth.org> Date: Thu Apr 21 07:53:57 2011 -0600 glapi: add ARB_robustness xml Signed-off-by: Brian Paul <brianp@vmware.com> commit 0159d1d6d99f4bbc18381dc2081c20d3aff17ac9 Author: nobled <nobled@dreamwidth.org> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: implement GL_ARB_robustness functions Signed-off-by: Brian Paul <brianp@vmware.com> commit 938fd71f4c4742f274922d53492a7290ab8d9c9b Author: nobled <nobled@dreamwidth.org> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: add context fields for GL_ARB_robustness Signed-off-by: Brian Paul <brianp@vmware.com> commit 72075137bc79e65be03dac7e97b6dba93c3a86a4 Author: nobled <nobled@dreamwidth.org> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: standardize more bounds-checking error messages Signed-off-by: Brian Paul <brianp@vmware.com> commit 32a3fc23746db49da903fbc08afa0135af3007d2 Author: nobled <nobled@dreamwidth.org> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: standardize some bounds-checking error messages Signed-off-by: Brian Paul <brianp@vmware.com> commit cecbf1f4d164207de373dec0cadee2e84e1f9656 Author: nobled <nobled@dreamwidth.org> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: add more bounds-checking support for client memory buffers Signed-off-by: Brian Paul <brianp@vmware.com> commit edc895b52383d5bd274422db56adead1d81daf5f Author: nobled <nobled@dreamwidth.org> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: add bounds-checking support for client memory buffers Signed-off-by: Brian Paul <brianp@vmware.com> commit 3a96ef28a538f158a219b406cd090dee70470c85 Author: nobled <nobled@dreamwidth.org> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: use is_bufferobj() helper function Signed-off-by: Brian Paul <brianp@vmware.com>
* mesa: Directly include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-071-0/+1
|
* 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.