summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo.h
Commit message (Collapse)AuthorAgeFilesLines
* 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