summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa: include mtypes.h lessMarek Olšák2018-04-121-0/+1
| | | | | | | | | | - remove mtypes.h from most header files - add main/menums.h for often used definitions - remove main/core.h v2: fix radv build Reviewed-by: Brian Paul <[email protected]>
* mesa: remove MESA_FUNCTIONBrian Paul2018-01-261-2/+2
| | | | | | Just use __func__ in the two macros where it was used. Reviewed-by: Neha Bhende <[email protected]>
* mesa: Make numSamples an unsigned intGert Wollny2018-01-191-2/+2
| | | | | | | | | | As a followup to the previous patch propagate the change of numSamples from int to unsigned to gl_config::samples and consequently fix some -Wsign-compare warnings. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Fold _mesa_record_error into its only callerIan Romanick2018-01-021-4/+0
| | | | | | | | | Also, the comment on _mesa_record_error was wrong. dd_function_table::Error was not called because that function does not exist. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: make _mesa_check_init_viewport() staticSamuel Pitoiset2017-07-311-4/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: inline _mesa_finish()Timothy Arceri2017-06-291-3/+0
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: add _mesa_is_no_error_enabled() helperTimothy Arceri2017-04-191-0/+7
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: move _mesa_valid_to_render() to api_validate.cBrian Paul2016-09-301-3/+0
| | | | | | | Almost all of the other drawing validation code is in api_validate.c so put this function there as well. Reviewed-by: Anuj Phogat <[email protected]>
* mesa: add a GLES3.2 enums section, and expose new MS line width paramsIlia Mirkin2016-09-131-0/+10
| | | | | | | | | | | | | | This also exposes them for ARB_ES3_2_compatibility. While both specs refer to the new MS line width parameters being separate from the existing AA line widths, reality begs to differ. It's the same on all hardware currently supported by mesa. Should hardware come along that wants these to be different, they're easy enough to separate out. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> (v1) Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add support for OES_texture_cube_map_arrayIan Romanick2016-08-261-1/+2
| | | | | | | | | | | This has a separate enable flag because this extension also requires OES_geometry_shader. It is possible that some drivers may support OpenGL ES 3.1 and ARB_texture_cube_map but not support OES_geometry_shader. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add and use _mesa_has_texture_cube_map_array helperIan Romanick2016-08-261-0/+5
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove redundant _mesa_has_shader_subroutineIan Romanick2016-08-261-10/+0
| | | | | | | | | | The checks in _mesa_has_shader_subroutine are slightly different than _mesa_has_ARB_shader_subroutine, but they're not different in a way that matters. The only way to have ctx->Version >= 40 is if ctx->Extensions.ARB_shader_subroutine is set. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* mesa: Add {OES,EXT}_tessellation_shader to the extensions table.Kenneth Graunke2016-08-081-2/+5
| | | | | | | | | | | | Also update _mesa_has_tessellation to know about the new extensions. For now, these are dummy_false, to avoid turning on the extension until everything's in place. Eventually, we'll move them over to the "ARB_tessellation_shader" bit so that any drivers supporting both the desktop extension and ES 3.1 get the feature. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* st/mesa: inline _mesa_create_context() into its only callerEmil Velikov2016-06-131-6/+0
| | | | | | | | Inline the function into it's only caller. This way it's more obvious how the classic and gallium drivers (st/mesa) use _mesa_initialize_context. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove _mesa_init_get_hash()Emil Velikov2016-06-131-3/+0
| | | | | | | | | | | | | | The actual code of the function print_table_stats() is guarded by a ifdef GET_DEBUG, which was not been defined in years. The last fix in 2013 (7db6b5aa91a) indicates that it's rarely used/tested. Since the issue has gone unnoticed for a whole year (broken with 2ad4a475474). Let's remove it for now. We can always revive it at a later stage. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Let compute shaders work in compatibility profilesSamuel Pitoiset2016-06-091-1/+1
| | | | | | | | | | The extension is already advertised in compatibility profile, but the _mesa_has_compute_shaders only returns true in core profile. If we advertise it, we should allow it to work. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* i965: Enable GL_KHR_robustnessKristian Høgsberg Kristensen2016-05-251-0/+2
| | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* mesa: Update _mesa_has_geometry_shadersMarta Lofstedt2016-01-221-1/+2
| | | | | | | | Updates the _mesa_has_geometry_shaders function to also look for OpenGL ES 3.1 contexts that has OES_geometry_shader enabled. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove ARB_geometry_shader4Marta Lofstedt2015-11-261-2/+1
| | | | | | | | | | No drivers currently implement ARB_geometry_shader4, nor are there any plans to implement it. We only support the version of geometry shaders that was incorporated into OpenGL 3.2 / GLSL 1.50. Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Generate a helper function for each extensionNanley Chery2015-11-121-0/+1
| | | | | | | | | | | | | | | | | Generate functions which determine if an extension is supported in the current context. Initially, enums were going to be explicitly used with _mesa_extension_supported(). The idea to embed the function and enums into generated helper functions was suggested by Kristian Høgsberg. For performance, the function body no longer uses _mesa_extension_supported() and, as suggested by Chad Versace, the functions are also declared static inline. v2: Place function qualifiers on separate line (Chad) v3: Move function curly brace to new line (Chad) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa: remove Driver.FlushVerticesMarek Olšák2015-10-031-2/+3
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* mesa: add function to check if shader subroutines are enabled.Dave Airlie2015-07-231-0/+9
| | | | | | | | This checks if core profile and shader subroutine extension is enabled. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: add _mesa_has_tessellationMarek Olšák2015-07-231-0/+11
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/es3.1: Add _mesa_is_gles31 helperIan Romanick2015-05-041-1/+11
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: Use bool in _mesa_is_ helpers instead of GLbooleanIan Romanick2015-05-041-4/+4
| | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: reimplement dispatch table no-op function handlingBrian Paul2015-03-181-3/+0
| | | | | | | | | | | | | | | | | | | | | Use the new _glapi_new_nop_table() and _glapi_set_nop_handler() to improve how we handle calling no-op GL functions. If there's a current context for the calling thread, generate a GL_INVALID_OPERATION error. This will happen if the app calls an unimplemented extension function or it calls an illegal function between glBegin/glEnd. If there's no current context, print an error to stdout if it's a debug build. The dispatch_sanity.cpp file has some previous checks removed since the _mesa_generic_nop() function no longer exists. This fixes the piglit gl-1.0-dlist-begin-end and gl-1.0-beginend-coverage tests on Windows. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: Add _mesa_has_compute_shadersJordan Justen2015-02-171-0/+11
| | | | | | | | | | v2 (Ben): Change GLboolean to bool as requested by Ian Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Ben Widawsky <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Ben Widawsky <[email protected]>
* mesa: make _mesa_init_constants context-independent and publicMarek Olšák2014-08-111-0/+3
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* main: Allow for the possibility of GL 3.2 without ARB_geometry_shader4.Paul Berry2013-08-011-0/+11
| | | | | | | | | | | | | | | | | | | | | | Previously, we assumed that the only way Mesa would expose geometry shader support was via the ARB_geometry_shader4 extension. But this extension has some extra complications over GL 3.2 (interactions with compatibility-only features, and link-time initialization of the constant gl_VerticesIn). So we want to allow for the possibility of supporting GL 3.2 (with GLSL 1.50 style geometry shaders) even if ctx->Extensions.ARB_geometry_shader4 is false. This patch adds a new function, _mesa_has_geometry_shaders(), which returns true if either ARB_geometry_shader4 is supported or the GL version is at least 3.2 desktop. Since compute_version() only enables GL 3.2 functionality when GLSL 1.50 support is present, a sufficient way for a back-end to advertise geometry shader support is to set ctx->Const.GLSLVersion >= 150. v2: Remove unnecessary ctx->Const.GeometryShaders150 constant. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: Move the mvp_with_dp4 flag to ShaderCompilerOptions.Kenneth Graunke2013-05-121-5/+0
| | | | | | | | | | | | | | | This flag essentially tells the compiler whether it prefers dot products or multiply/adds for matrix operations. As such, ShaderCompilerOptions seems like the right place for it. This also lets us specify it on a per-stage basis. This patch makes all existing users set the flag for the Vertex Shader stage only, as it's currently only used for fixed-function vertex programs. That will change soon, and I wanted to preserve the existing behavior. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: change _mesa_inside_dlist_begin_end() to handle PRIM_UNKNOWNBrian Paul2013-05-021-1/+1
| | | | | | | | | | | | If the currently compiled primitive state is PRIM_UNKNOWN we should not return true from _mesa_inside_dlist_begin_end(). This lets us simplify the calls to that function. Note, the call to _mesa_inside_dlist_begin_end() in vbo_save_EndList() should have probably been checking for PRIM_UNKNOWN too, but it wasn't. So there's no code change change. Reviewed-by: Jose Fonseca <[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: use new _mesa_inside_dlist_begin_end() functionBrian Paul2013-04-231-0/+11
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: use new _mesa_inside_begin_end() functionBrian Paul2013-04-231-2/+13
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove two of the now unused ASSERT_OUTSIDE_BEGIN_END macros.Eric Anholt2013-01-211-25/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Rename API_OPENGL to API_OPENGL_COMPAT.Paul Berry2012-11-291-1/+1
| | | | | | | | | | 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 <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* mesa: remove the driverCtx parameter to _mesa_create/initialize_context()Brian Paul2012-10-051-4/+2
| | | | No longer used.
* mesa/main: Make no-op dispatch function publicIan Romanick2012-09-281-0/+2
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es3: Add _mesa_is_gles3 predicateIan Romanick2012-08-141-0/+10
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add api check functionsJordan Justen2012-07-301-0/+20
| | | | | | | | | These functions make it easier to check for multiple API types. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* 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: fix comment languageBrian Paul2011-10-251-2/+2
|
* mesa: 80-column wrapping and whitespace fixesBrian Paul2011-04-131-6/+6
|
* mesa: replace NEED_SECONDARY_COLOR(), RGBA_LOGICOP_ENABLED() with inlinesBrian Paul2011-03-111-24/+0
| | | | and rename them.
* Revert "mesa: convert macros to inline functions"Brian Paul2011-02-211-22/+22
| | | | | | This reverts commit e9ff76aa81d9bd973d46b7e46f1e4ece2112a5b7. Need to use macros so __FUNCTION__ reports the caller.
* mesa: convert macros to inline functionsBrian Paul2011-02-211-22/+22
|
* mesa: remove _mesa_create_context_for_api()Brian Paul2011-02-081-11/+5
| | | | Just add the gl_api parameter to _mesa_create_context().