summaryrefslogtreecommitdiff
path: root/src/mesa/vbo/vbo_exec_draw.c
AgeCommit message (Collapse)Author
2011-02-21vbo: rename, document function paramsBrian Paul
2011-02-21vbo: commentsBrian Paul
2011-02-21vbo: replace assert(0) with proper assertionsBrian Paul
2011-02-14vbo: notify a driver that we change buffer offsets, strides, etc.Marek Olšák
2011-01-09vbo: Include mfeatures.h in files that perform feature tests.Vinson Lee
2010-11-06vbo: Avoid unnecessary copy to/from current in vertex format upgrade.Francisco Jerez
Rebuilding the vertex format from scratch every time we see a new vertex attribute is rather costly, new attributes can be appended at the end avoiding a copy to current and then back again, and the full attr pointer recalculation. In the not so likely case of an already existing attribute having its size increased the old behavior is preserved, this could be optimized more, not sure if it's worth it. It's a modest improvement in FlightGear (that game punishes the VBO module pretty hard in general, framerate goes from some 46 FPS to 50 FPS with the nouveau classic driver). Signed-off-by: Brian Paul <brianp@vmware.com>
2010-10-13Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg
2010-07-31mesa: Remove inclusion of compiler.h from mtypes.h.Vinson Lee
mtypes.h does not use any symbols from compiler.h. Also add the required headers for files that depended on symbols from compiler.h but were indirectly including compiler.h through mtypes.h.
2010-07-30mesa: Remove unnecessary headers.Vinson Lee
2010-02-19Replace the _mesa_*printf() wrappers with the plain libc versionsKristian Høgsberg
2010-02-19Remove _mesa_memcpy in favor of plain memcpy.Kenneth Graunke
This may break the SUNOS4 build, but it's no longer relevant.
2010-01-12vbo: Remove unnecessary header from vbo_exec_draw.c.Vinson Lee
2009-11-04Merge branch 'mesa_7_6_branch'Brian Paul
Conflicts: src/mesa/drivers/windows/gdi/mesa.def
2009-11-04vbo: fix out-of-bounds array accessBrian Paul
The exec->vtx.inputs[] array was being written past its end. This was clobbering the following vbo_exec_context::eval state. Probably not noticed since evaluators and immediate mode rendering don't happen at the same time. Fixed the loop in vbo_exec_vtx_init(). Changed the size of the vbo_exec_context::vtx.arrays[] array. Added a bunch of debug-build assertions. Issue found by Vinson Lee.
2009-09-30mesa/main: New feature FEATURE_beginend.Chia-I Wu
This feature corresponds to the Begin/End paradigm. Disabling this feature also eliminates the use of GLvertexformat completely.
2009-08-28vbo: Fix array pointer calculation for MapBufferRange-mapped vertex data.Eric Anholt
We would end up with the offset from the start of the mapping rather than the offset from the start of the buffer.
2009-08-26Merge branch 'mesa_7_5_branch'Brian Paul
2009-08-24vbo: fix divide by zero exceptionBrian Paul
Fixes bug 23489.
2009-08-24vbo: fix divide by zero exceptionBrian Paul
Fixes bug 23489.
2009-08-12vbo: use _mesa_is_bufferobj()Brian Paul
2009-08-12vbo: Avoid extra validation of DrawElements.Eric Anholt
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.
2009-07-03Merge branch 'mesa_7_5_branch'Jakob Bornecrantz
Conflicts: src/mesa/main/dlist.c src/mesa/vbo/vbo_save_api.c
2009-07-02vbo: If MapBufferRange fails, try MapBuffer instead.Corbin Simpson
Fixes segfaults with radeon winsys. (Probably libdrm_radeon doing something that it shouldn't.)
2009-06-30Merge branch 'mesa_7_5_branch' into dlist-statechange-shortcircuitKeith Whitwell
Need this to pick up fixes for per-vertex materials.
2009-06-30Merge branch 'mesa_7_5_branch'Brian Paul
Conflicts: src/mesa/vbo/vbo_exec_draw.c
2009-06-30mesa: Set FLUSH_EXPLICIT_BIT flags when calling FlushMappedBufferRange.José Fonseca
As prescribed by ARB_map_buffer_range.
2009-06-30mesa/vbo: use _lookup_prim_by_nr for debuggingKeith Whitwell
Switch over to specialized enum lookup for primitives
2009-05-22vbo: asst. reformatting, clean-upsBrian Paul
2009-05-22vbo: fix crash in vbo_exec_bind_arrays()Brian Paul
When a vertex shader uses generic vertex attribute 0, but not gl_Vertex, we need to set attribute[16] to point to attribute[0]. We were setting the attribute size, but not the pointer. Fixes crash in glsl/multitex.c when using the VertCoord attribute instead of gl_Vertex.
2009-03-07mesa: s/int/GLsizeiptr/ to silence warning with 64-bit buildBrian Paul
2009-03-04mesa: Follow ARB_map_buffer_range more stricly.José Fonseca
Namelly, FlushMappedBufferRange takes a subrange relative to the original range.
2009-03-04Merge commit 'origin/master' into gallium-map-rangeJosé Fonseca
2009-03-04vbo: second attempt - avoid getting buffer_ptr and buffer_map out of syncKeith Whitwell
2009-03-04Revert "vbo: avoid getting buffer_ptr and buffer_map out of sync"Keith Whitwell
This fixed a minor bug but broke everything else. This reverts commit 579ef8ab1984d895867f547afa60b3bec4c4599a.
2009-03-04vbo: avoid getting buffer_ptr and buffer_map out of syncKeith Whitwell
2009-03-04mesa: Implement and use FlushMappedBufferRange.José Fonseca
2009-03-03mesa: Massage the interface to more closely resemble ARB_map_buffer_rangeJosé Fonseca
2009-03-03Merge commit 'origin/gallium-0.1'Keith Whitwell
Conflicts: scons/gallium.py src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/gallium/include/pipe/p_defines.h src/mesa/vbo/vbo_exec_api.c src/mesa/vbo/vbo_exec_draw.c
2009-03-03vbo: use MapBufferRange where availableKeith Whitwell
Previously would have to allocate a new VBO after firing a draw command as subsequent call to Map() on old VBO might block if the driver had submitted the commands to hardware.
2009-02-09mesa: merge gallium-0.2 into gallium-master-mergeBrian Paul
Merge commit 'origin/gallium-0.2' into gallium-master-merge Conflicts: Makefile docs/relnotes-7.4.html docs/relnotes.html src/mesa/drivers/dri/i965/brw_wm.h src/mesa/main/imports.c src/mesa/main/mtypes.h src/mesa/main/texcompress.c src/mesa/main/texenvprogram.c src/mesa/main/version.h src/mesa/vbo/vbo_exec_api.c src/mesa/vbo/vbo_save_draw.c
2009-02-02mesa: fix GLSL issue preventing use of all 16 generic vertex attributesBrian Paul
Only 15 actually worked before since we always reserved generic[0] as an alias for vertex position. The case of vertex attribute 0 is tricky. The spec says that there is no aliasing between generic vertex attributes 0..MAX_VERTEX_ATTRIBS-1 and the conventional attributes. But it also says that calls to glVertexAttrib(0, v) are equivalent to glVertex(v). The distinction seems to be in glVertex-mode versus vertex array mode. So update the VBO code so that if the shader uses generic[0] but not gl_Vertex, route the attribute data set with glVertex() to go to shader input generic[0]. No change needed for the glDrawArrays/Elements() path. This is a potentially risky change so regressions are possible. All the usual tests seem OK though.
2009-01-23mesa: set the new array->Format field in VBO codeBrian Paul
Should help to solve failed assertion in i965 driver (see bug 19708)
2008-10-10Merge commit 'origin/gallium-0.1' into gallium-0.2Keith Whitwell
Conflicts: src/gallium/auxiliary/gallivm/instructionssoa.cpp src/gallium/auxiliary/gallivm/soabuiltins.c src/gallium/auxiliary/rtasm/rtasm_x86sse.c src/gallium/auxiliary/rtasm/rtasm_x86sse.h src/mesa/main/texenvprogram.c src/mesa/shader/arbprogparse.c src/mesa/shader/prog_statevars.c src/mesa/state_tracker/st_draw.c src/mesa/vbo/vbo_exec_draw.c
2008-10-07mesa: replace GLuint with GLbitfield to be clearer about usageBrian Paul
Also, fix up some comments to be doxygen style.
2008-10-03mesa: avoid generating constant vertex attributes in fixedfunc programsKeith Whitwell
Keep track of enabled/active vertex attributes. Keep track of potential vertex program outputs. When generating fragment program, replace references to fragment attributes which are effectively non-varying and non-computed passthrough attributes with references to the new CURRENT_ATTRIB tracked state value. Only downside is slight ugliness in VBO code where we need to validate state twice in succession.
2008-09-25mesa: fix some VBO buffer object issuesBrian Paul
The VBO module may use a real VBO or a malloc'd buffer for vertex storage. Be careful not to accidentally replace the later with the former when drawing. Check if using a real VBO at destroy time to prevent a double-free.
2008-09-23vbo: unmap and remap immediate vbo before/after each draw.Keith Whitwell
Also use BufferData(NULL) to get fresh storage and avoid synchronous operation where we would have to flush and wait for the fence after each draw because of the map. This will chew through a whole load of buffer space on small draws, so it isn't a proper solution. Need to support a no-fence or append mapping mode to do this right, or use user buffers.
2008-09-23added vbo_use_buffer_objects() to specify that immediate mode data should be ↵Brian
put into bufferobjects
2008-09-23mesa: s/GL_POLYGON+1/PRIM_OUTSIDE_BEGIN_END/Brian Paul
(cherry picked from commit 8a369b909a6648ae7a5a0c2dcb972a2f96f99a80)
2008-09-04mesa: improved gl_buffer_object reference countingBrian Paul
Use new _mesa_reference_buffer_object() function wherever possible. Fixes buffer object/display list crash reported in ParaView.