aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa: remove Driver.FlushVerticesMarek Olšák2015-10-031-0/+3
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* vbo: pass the stream from DrawTransformFeedbackStream to driversMarek Olšák2015-08-061-1/+2
| | | | Reviewed-by: Dave Airlie <[email protected]>
* Fix invalid extern "C" around header inclusion.Mark Janes2015-03-051-0/+8
| | | | | | | | | | | System headers may contain C++ declarations, which cannot be given C linkage. For this reason, include statements should never occur inside extern "C". This patch moves the C linkage statements to enclose only the declarations within a single header. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: pass indirect buffer to sw primitive restartChris Forbes2013-11-251-1/+2
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: add indirect_offset, is_indirect to _mesa_primChris Forbes2013-11-251-1/+4
| | | | | | | | | V3: Add missing cases V4: Add indirect_offset here too Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: add indirect drawing buffer parameter to draw functionsChristoph Bumiller2013-11-251-1/+2
| | | | | | | | | | | | Split from patch implementing ARB_draw_indirect. v2: Const-qualify the struct gl_buffer_object *indirect argument. v3: Fix up some more draw calls for new argument. v4: Fix up rebase conflicts in i965. v5: Undo const-qualification Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <[email protected]>
* vbo: create a few utility functions for merging primitivesBrian Paul2013-05-031-0/+10
| | | | | | | To be used by following commit. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* vbo: add new vbo_initialize_exec_dispatch(), vbo_initialize_save_dispatch()Brian Paul2013-05-021-0/+9
| | | | | | First step in simplifying the vertex array / glDraw dispatch code. 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: Change args to vbo_count_tessellated_primitives.Paul Berry2012-12-181-1/+2
| | | | | | | | | | | | | | No functional change--this simply paves the way to allow futures patches to call vbo_count_tessellated_primitives() during error checking, before the _mesa_prim struct has been constructed. This will be needed for GLES3, which requires draw calls to fail if there is not enough space available in transform feedback buffers to accommodate the primitives to be drawn. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* vbo: use GLuint for numInstances to silence MSVC warningsBrian Paul2012-11-061-1/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* vbo: add a prefix to count_tessellated_primitivesDave Airlie2012-09-151-1/+1
| | | | | | | | | Just to make it consistent with the rest of vbo, since it would be an exported symbol anyways. Reviewed-by: Matt Turner <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: Add support for GL_ARB_base_instanceFredrik Höglund2012-06-191-0/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* vbo: add software primitive restart supportJordan Justen2012-05-171-0/+6
| | | | | | | | | | | vbo_sw_primitive_restart implements primitive restart in software by splitting primitive draws apart. This is based on similar support in mesa/state_tracker/st_draw.c. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: move gl_client_array*[] from vbo_draw_func into gl_contextMarek Olšák2012-05-081-1/+0
| | | | | | | | | | | | | | | | | | 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]>
* mesa/vbo: inline vbo_sizeof_ib_type.Dave Airlie2012-02-281-2/+16
| | | | | | | Can't see any reason this wouldn't be better off as an inline. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* vbo: introduce vbo_get_minmax_indices functionYuanhan Liu2012-01-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | Introduce vbo_get_minmax_indices() function to handle the min/max index computation for nr_prims(>= 1). The old code just compute the first prim's min/max index; this would results an error rendering if user called functions like glMultiDrawElements(). This patch servers as fixing this issue. As when nr_prims = 1, we can pass 1 to paramter nr_prims, thus I made vbo_get_minmax_index() static. v2: per Roland's suggestion, put the indices address compuation into vbo_get_minmax_index() instead. Also do comination if possible to reduce map/unmap count v3: per Brian's suggestion, use a pointer for start_prim to avoid structure copy per loop. Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* vbo: introduce vbo_sizeof_ib_type() functionYuanhan Liu2011-12-301-0/+4
| | | | | | | | | | introduce vbo_sizeof_ib_type() function to return the index data type size. I see some place use switch(ib->type) to get the index data type, which is sort of duplicate. Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Add count_tessellated_primitives() function.Paul Berry2011-12-201-0/+3
| | | | | | | | | | | This function computes the number of primitives that will be generated when the given drawing operation is performed. It accounts for the tessellation that is performed on line strips, line loops, triangle strips, triangle fans, quads, quad strips, and polygons, so it is suitable for implementing the primitive counters needed by transform feedback. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: implement DrawTransformFeedback from ARB_transform_feedback2Marek Olšák2011-12-151-1/+3
| | | | | | | | | | | | | | It's like DrawArrays, but the count is taken from a transform feedback object. This removes DrawTransformFeedback from dd_function_table and adds the same function to GLvertexformat (with the function parameters matching GL). The vbo_draw_func callback has a new parameter "struct gl_transform_feedback_object *tfb_vertcount". The rest of the code just validates states and forwards the transform feedback object into vbo_draw_func.
* vbo: Redeclare bind_array() as non-static vbo_bind_array()Chad Versace2011-10-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is necessary because i965 will need to call vbo_bind_array() when cleaning up after a buffer resolve meta-op. Detailed Explanation -------------------- The vbo module tracks vertex attributes separately from the gl_context. Specifically, the vbo module maintins vertex attributes in vbo_exec_context::array::inputs, which is synchronized with gl_context::Array::ArrayObj::VertexAttrib by vbo_bind_array(). vbo_draw_arrays() calls vbo_bind_array() to perform the synchronization before calling the real draw call, vbo_context::draw_arrays. Intel hardware accomplishes buffer resolves with a meta-op. Frequently, that meta-op must be performed within glDraw* in the moment immediately before the draw occurs (The hardware designers hate us...). After performing the meta-op, but before calling vbo_bind_array(), the gl_context's vertex attributes will have been restored to their original state (that is, their state before the meta-op began), but the vbo module's vertex attribute are those used in the last meta-op. Therefore we must manually synchronize the two with vbo_bind_array() before continuing with the original draw command (that is, the one requested with glDraw*). See brw_predraw_resolve_buffers(), which will be added in a future commit. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* vbo: add vbo_always_unmap_buffers()Brian Paul2011-03-011-0/+1
| | | | | | Drivers can call this function as needed. It tells the VBO module to always unmap the current glBegin/glEnd VBO when we flush. Otherwise it's possible to be in a flushed state but still have the VBO mapped.
* vbo: added vbo_check_buffers_are_unmapped() debug functionBrian Paul2011-02-221-0/+2
|
* vbo: added commentBrian Paul2011-01-201-1/+1
|
* vbo: Clean up header file inclusion in vbo.h.Vinson Lee2010-12-301-1/+4
|
* vbo: Avoid the copy to current in dlists if not required.Mathias Fröhlich2010-12-101-1/+2
| | | | | | | | The current state is allowed to be undefined past DrawElements et al. Consequently omit that copying at least in the display list code. This pays us some percents performance. Signed-off-by: Brian Paul <[email protected]>
* vbo: Fix GLES2 glVertexAttrib.Chia-I Wu2010-12-081-13/+13
| | | | | | | | | Attribute 0 has no special meaning in GLES2. Add VertexAttrib4f_nopos for that purpose and make _es_VertexAttrib* call the new function. Rename _vbo_* to _es_* to avoid confusion. These functions are only used by GLES, and now some of them (_es_VertexAttrib*) even behave differently than vbo_VertexAttrib*.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-9/+9
|
* i965: Don't rebase the index buffer to min 0 if any arrays are in VBOs.Eric Anholt2010-10-121-0/+1
| | | | | | | | | There was a check to only do the rebase if we didn't have everything in VBOs, but nexuiz apparently hands us a mix of VBOs and arrays, resulting in blocking on the GPU to do a rebase. Improves nexuiz 800x600, high-settings performance on my Ironlake 41% (+/- 1.3%), from 14.0fps to 19.7fps.
* mesa: Move GLES1/2 vbo entrypoints to vbo_exec_api.cKristian Høgsberg2010-04-271-0/+24
| | | | This let's us drop stubs.c.
* mesa: implement core Mesa support for GL_ARB_draw_instancedBrian Paul2010-04-041-0/+1
|
* mesa: Add support for ARB_draw_elements_base_vertex.Eric Anholt2009-09-081-0/+1
|
* vbo: Avoid extra validation of DrawElements.Eric Anholt2009-08-121-1/+5
| | | | | | | | | | | | | This saves mapping the index buffer to get a bounds on the indices that drivers just drop on the floor in the VBO case (cache win), saves a bonus walk of the indices in the CheckArrayBounds case, and other miscellaneous validation. On intel it's a particularly a large win (50-100% in my app) because even though we let the indices stay in both CPU and GPU caches, we still end up waiting for the GPU to be done with the buffer before reading from it. Drivers that want the min/max_index fields must now check index_bounds_valid and use vbo_get_minmax_index before using them.
* mesa: added GLAPIENTRY keywordsJonathan White2008-07-071-5/+5
|
* mesa: added _vbo_VertexAttrib4f()Brian Paul2008-07-031-0/+2
|
* mesa: added _vbo_Materialfv()Brian Paul2008-06-201-0/+3
|
* mesa: _vbo_Color4f, _vbo_Normal3f, _vbo_MultiTexCoord4f functionsBrian Paul2008-06-201-0/+10
|
* New vbo_set_draw_func() to keep vbo context opaque to state tracker and tnl ↵Brian2007-12-071-0/+3
| | | | module.
* added vbo_use_buffer_objects() to specify that immediate mode data should be ↵Brian2007-08-171-0/+3
| | | | put into bufferobjects
* Be more consistant with paths in #includes. Eventually, eliminate a bunch ↵Brian2007-07-041-1/+1
| | | | of -I flags.
* Use new rebase helper. Remove other rebase code.Keith Whitwell2007-01-301-1/+0
|
* Helper for rebasing draw requests where min_index != 0.Keith Whitwell2007-01-301-0/+14
|
* Hook in split functionalitykeithw2007-01-151-0/+36
|
* move public structure definitions to vbo.hKeith Whitwell2006-10-311-0/+28
|
* switch several dri drivers overKeith Whitwell2006-10-301-0/+40