summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.h
Commit message (Collapse)AuthorAgeFilesLines
* 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().
* mesa: remove _mesa_initialize_context_for_api()Brian Paul2011-02-081-8/+1
| | | | Just add the gl_api parameter to _mesa_initialize_context().
* mesa: begin implementation of GL_ARB_draw_buffers_blendBrian Paul2011-01-151-1/+1
|
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-27/+27
|
* Drop GLframebuffer typedef and just use struct gl_framebufferKristian Høgsberg2010-10-131-4/+4
|
* Rename GLvisual and __GLcontextModes to struct gl_configKristian Høgsberg2010-10-131-9/+9
|
* Get rid of GL/internal/glcore.hKristian Høgsberg2010-10-131-1/+1
| | | | | | | __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.
* Revert "glapi: Implement optional dispatch logging"Kristian Høgsberg2010-09-091-3/+0
| | | | | | This reverts commit b9abc6139a310677a37754ea7172d976dbf56979 and the follow on fixes (7aae704 and 6fe1b47). It's changing the glapi/driver ABI and causes a number of problems for debug/non-debug builds.
* glapi: Implement optional dispatch loggingKristian Høgsberg2010-09-091-0/+3
| | | | | | | There's a useful feature buried in glapi to log all API calls to stderr. Unfortunately it requires editing the code and then it's enabled unconditionally for that build. This patch builds in API logging for debug builds and makes it run-time switchable by setting MESA_DEBUG=dispatch.
* mesa: Optimize get.c by using a table-driven approachKristian Høgsberg2010-05-111-0/+2
|
* mesa: Move API specific context intialization into context.cKristian Høgsberg2010-04-221-3/+0
|
* mesa: Track the OpenGL API we're implementing in the contextKristian Høgsberg2010-04-221-0/+15
| | | | | | | | | | | | | | | | This introduces a new way to create or initialize a context: _mesa_create_context_for_api and _mesa_initialize_context_for_api which in addition to the current arguments take an api enum to indicate which OpenGL API the context should implement. At this point the API field in GLcontext isn't used anywhere, but later commits will key certain functionality off of it. The _mesa_create_context and _mesa_initialize_context functions are kept in place as wrappers around the *_for_api versions, passing in API_OPENGL to get the same behavior as before.
* mesa: Remove support for creating color-index visualsIan Romanick2010-03-031-5/+1
| | | | | | | | Remove the rgbMode and indexBits parameters from _mesa_create_visual and _mesa_initialize_visual. These values are now hardcoded to GL_TRUE and 0. Signed-off-by: Ian Romanick <[email protected]>
* mesa: code refactoring- new _mesa_finish(), _mesa_flush()Brian Paul2009-10-221-0/+8
|
* mesa: new _mesa_valid_to_render() functionBrian Paul2009-08-141-1/+5
| | | | | Tests if the current shader/program is valid and that the framebuffer is complete. To be called by glBegin, glDrawArrays, etc.
* mesa: rework viewport/scissor initialization codeBrian Paul2009-06-171-0/+3
| | | | | | | | | | The first time a context is bound to a drawable, the viewport and scissor bounds are initialized to the buffer's size. This is actually a bit tricky. A new _mesa_check_init_viewport() function is called in several places to check if the viewport has been initialized. We also use a new ctx->ViewportInitialized flag instead of the overloaded ctx->FirstTimeCurrent flag.
* mesa: Add success/failures return value to _mesa_make_current.José Fonseca2009-05-301-1/+1
|
* mesa: more complete fix for transform_invarient glitchesKeith Whitwell2009-05-081-0/+4
| | | | | | Add a new flag mvp_with_dp4 in the context, and use that to switch both ffvertex.c and programopt.c vertex transformation code to either DP4 or MUL/MAD implementations.
* mesa: remove unneeded #includeBrian Paul2009-02-221-1/+3
|
* mesa: allow for extra per-context initBrian Paul2008-09-211-0/+3
| | | | (cherry picked from commit 815cdcfbc0740c66b901361620c88d99541bdad2)
* mesa: re-define NEED_SECONDARY_COLOR. fix #14310.Xiang, Haihao2008-02-021-0/+2
|
* fix NEED_SECONDARY_COLOR for vert/frag progsBrian2007-12-181-4/+4
|
* Be more consistant with paths in #includes. Eventually, eliminate a bunch ↵Brian2007-07-041-1/+1
| | | | of -I flags.
* Remove the never-used SI-style imports/exports code.Brian2007-04-041-38/+0
|