summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_context.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa: fix crash in st/mesa after deleting a VAOMarek Olšák2014-07-111-18/+4
| | | | | | | | | | This happens when glGetMultisamplefv (or any other non-draw function) is called, which doesn't invoke the VBO module to update _DrawArrays and the pointer is invalid at that point. However st/mesa still dereferences it to setup vertex buffers ==> crash. Reviewed-by: Brian Paul <[email protected]>
* mesa: Rename gl_context::swtnl_im to vbo_context; use proper type.Kenneth Graunke2013-09-031-1/+1
| | | | | | | | | | | | | | | The main GL context's swtnl_im field is the VBO module's vbo_context structure. Using the name "swtnl" in the name is confusing since some drivers use hardware texturing and lighting, but still rely on the VBO module for drawing. v2: Forward declare the type and use that instead of void * (suggested by Eric Anholt). v3: Remove unnecessary cast (pointed out by by Topi Pohjolainen). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <[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: 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 <[email protected]>
* vbo: fix glVertexAttribI* functionsMarek Olšák2012-11-061-0/+43
| | | | | | | | | | | | | | | | | | | | | | The functions were broken, because they converted ints to floats. Now we can finally advertise OpenGL 3.0. ;) In this commit, the vbo module also tracks the type for each attrib in addition to the size. It can be one of FLOAT, INT, UNSIGNED_INT. The little ugliness is the vertex attribs are declared as floats even though there may be integer values. The code just copies integer values into them without any conversion. This implementation passes the glVertexAttribI piglit test which I am going to commit in piglit soon. The test covers vertex arrays, immediate mode and display lists. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> v2: cosmetic changes as suggested by Brian
* mesa: Remove support for NV_vertex_program's special attributes aliasingEric Anholt2012-10-151-2/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: remove FEATURE_dlist define.Oliver McFadden2012-09-151-2/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: add gl_context::NewDriverState and use it for vertex arraysMarek Olšák2012-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vbo module recomputes its states if _NEW_ARRAY is set, so it shouldn't use the same flag to notify the driver. Since we've run out of bits in NewState and NewState is for core Mesa anyway, we need to find another way. This patch is the first to start decoupling the state flags meant only for core Mesa and those only for drivers. The idea is to have two flag sets: - gl_context::NewState - used by core Mesa only - gl_context::NewDriverState - used by drivers only (the flags are defined by the driver and opaque to core Mesa) It makes perfect sense to use NewState|=_NEW_ARRAY to notify the vbo module that the user changed vertex arrays, and the vbo module in turn sets a driver-specific flag to notify the driver that it should update its vertex array bindings. The driver decides which bits of NewDriverState should be set and stores them in gl_context::DriverFlags. Then, Core Mesa can do this: ctx->NewDriverState |= ctx->DriverFlags.NewArray; This patch implements this behavior and adapts st/mesa. DriverFlags.NewArray is set to ST_NEW_VERTEX_ARRAYS. Core Mesa only sets NewDriverState. It's the driver's responsibility to read it whenever it wants and reset it to 0. Reviewed-by: Brian Paul <[email protected]>
* mesa: move gl_client_array*[] from vbo_draw_func into gl_contextMarek Olšák2012-05-081-0/+15
| | | | | | | | | | | | | | | | | | In the future we'd like to treat vertex arrays as a state and not as a parameter to the draw function. This is the first step towards that goal. Part of the goal is to avoid array re-validation for every draw call. This commit adds: const struct gl_client_array **gl_context::Array::_DrawArrays. The pointer is changed in: * vbo_draw_method * vbo_rebase_prims - unused by gallium * vbo_split_prims - unused by gallium * st_RasterPos Reviewed-by: Brian Paul <[email protected]>
* vbo: move vbo_draw_method into vbo_context.hMarek Olšák2012-05-081-0/+35
| | | | | | I'll need vbo_context in that function soon. Reviewed-by: Brian Paul <[email protected]>
* vbo: remove vbo_context::mat_currvalMarek Olšák2012-04-191-4/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* vbo: remove vbo_context::generic_currvalMarek Olšák2012-04-191-1/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* vbo: remove vbo_context::legacy_currvalMarek Olšák2012-04-191-2/+1
| | | | | | | | | | | | It's not nice when you have several variables pointing to the same array and you wanna ask your editor "where is this used" and you only get an answer for one of the four currval, legacy_currval, generic_currval, mat_currval, which is quite useless, because you never see the whole picture. Let's get rid of the additional pointers. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* vbo: remove unused variables in vbo_contextMarek Olšák2012-04-191-4/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* vbo: add comment for map_vp_non[] arrayBrian Paul2011-12-161-0/+1
|
* mesa: s/INLINE/inline/Brian Paul2011-10-011-2/+2
| | | | | | | INLINE is still seen in some files (some generated files, etc) but this is a good start. Acked-by: Kenneth Graunke <[email protected]>
* vbo: Include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-091-0/+1
|
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-2/+2
|
* mesa/es: Remove omit list.Chia-I Wu2010-05-121-2/+0
| | | | | vbo/vbo_save* are the last members on the omit list. Test FEATURE_dlist in the sources and remove the omit list.
* vbo: s/32/VERT_ATTRIB_MAX/Brian Paul2009-05-221-2/+2
|
* vbo: return VP_NONE from get_program_mode() if running fixed-func vertex programBrian Paul2009-05-211-0/+2
| | | | | | | If we're running a vertex program to emulated fixed-function, we still need to treat vertex arrays/attributes as if we're in fixed-function mode. This should probably be back-ported to Mesa 7.5 after a bit more testing.
* vbo: move vp_mode enum to vbo_exec.h, use enum instead of GLuintBrian Paul2009-05-211-6/+6
|
* mesa: refactor: move #define FEATURE flags into new mfeatures.h fileKeith Whitwell2008-09-211-1/+5
| | | | | | | | | | | | | Also, check the FEATURE flags in many places. (cherry picked from commit 40d1a40f294f1ed2dacfad6f5498322fc08cc2d1) Conflicts: src/mesa/main/config.h src/mesa/main/context.c src/mesa/main/texobj.c src/mesa/main/texstate.c src/mesa/main/texstore.c
* use ctx->VertexProgram._Current instead of ctx->VertexProgram._EnabledBrian2007-02-221-2/+2
|
* Hook in split functionalitykeithw2007-01-151-7/+1
|
* move public structure definitions to vbo.hKeith Whitwell2006-10-311-0/+1
|
* Move edgeflag into the VERT_ATTRIB_SEVEN slot. This means that ourKeith Whitwell2006-10-301-3/+11
| | | | | | | NV_vertex_program implementation has slightly incorrect aliasing behaviour. I think this is reasonable given the simplification and the fact that the mainstream ARB_vp continues to have the correct behaviour.
* switch several dri drivers overKeith Whitwell2006-10-301-3/+0
|
* better handling of current attributes. Trivial dlist and varray tests workKeith Whitwell2006-10-301-0/+7
|
* Checkpoint of new vbo-building code. Currently builds regular arraysKeith Whitwell2006-10-291-0/+101
rather than VBO's - VBOs are easy but need to look closer at the driver interface. The trivial/tri demo works.