aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_exec_api.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: check glBegin()/glDrawArrays()/etc mode with _mesa_valid_prim_mode()Brian Paul2011-09-211-0/+7
| | | | | | | | | We now raise an GL_INVALID_ENUM in glBegin() if mode is illegal, as was done in Yuanhan Liu's original patch. Take geometry shaders support into account too. Reviewed-by: Yuanhan Liu <[email protected]>
* mesa/vbo: add ARB_vertex_type_2_10_10_10_rev APIs.Dave Airlie2011-09-061-0/+45
| | | | | | | | | | | | | | | This adds the vertex processing paths for the 2101010 types. It converts the attributes to floats for all the immediate entry points, some entrypoints are normalised and the attrib APIs take a normalized parameter. There are four main paths, ui10 -> float unnormalized i10 -> float unnormalized ui10 -> float normalized i10 -> float normalized along with the ui2/i2 equivs. Signed-off-by: Dave Airlie <[email protected]>
* mesa: Remove target parameter from dd_function_table::UnmapBufferIan Romanick2011-08-231-1/+1
| | | | | | | | | | No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: fix !FEATURE_GL buildChia-I Wu2011-08-211-18/+18
| | | | | | | Move vbo_exec_FlushVertices_internal out of FEATURE_beginend. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vbo: check array indexes to prevent negative indexingBrian Paul2011-06-081-4/+8
| | | | | | See the piglit dlist-fdo31590.c test NOTE: This is a candidate for the 7.10 branch.
* mesa: Update _ElementSize in a few more places.José Fonseca2011-04-071-0/+2
|
* vbo: add vbo_always_unmap_buffers()Brian Paul2011-03-011-1/+18
| | | | | | 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: generate GL_INVALID_VALUE for bad glVertexAttrib indexBrian Paul2011-03-011-2/+2
|
* vbo: simplify NeedFlush flag clearingBrian Paul2011-02-221-4/+1
|
* vbo: use ctx intstead of exec->ctxBrian Paul2011-02-221-8/+8
|
* vbo: more commentsBrian Paul2011-02-211-0/+5
|
* vbo: make vbo_exec_FlushVertices_internal() staticBrian Paul2011-02-211-21/+20
|
* vbo: remove old debug code, add commentsBrian Paul2011-02-211-4/+8
|
* vbo: rename some vars, add new comments, fix formatting, etc.Brian Paul2011-02-211-55/+74
|
* vbo: use ctx instead of exec->ctxBrian Paul2011-02-211-3/+3
|
* vbo: Include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-091-0/+1
|
* vbo: Fix GLES2 glVertexAttrib.Chia-I Wu2010-12-081-21/+35
| | | | | | | | | 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*.
* vbo: Drop second ATTR macro.Chia-I Wu2010-12-081-27/+1
| | | | | There is no need to have a special version of ATTR for !FEATURE_beginend, since 81ccb3e2ce708619f4c23537a237d61bdffdd35f.
* vbo: Avoid unnecessary copy to/from current in vertex format upgrade.Francisco Jerez2010-11-061-40/+58
| | | | | | | | | | | | | | | | | 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 <[email protected]>
* mesa: implement integer-valued vertex attribute functionsBrian Paul2010-10-281-0/+18
| | | | The integers still get converted to floats. That'll have to change someday.
* vbo: support for primitive restartBrian Paul2010-10-211-0/+23
| | | | | We handle splitting of glDrawArrays() calls into two primitives here so that drivers don't have to worry about it.
* Drop the "neutral" tnl moduleKristian Høgsberg2010-10-141-7/+7
| | | | | | | Just always check for FLUSH_UPDATE_CURRENT and call Driver.BeginVertices when necessary. By using the unlikely() macros, this ends up as a 10% performance improvement (for isosurf, anyway) over the old, complicated function pointer swapping.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-10/+10
|
* mesa: Fix potential out-of-bounds access by _vbo_Materialf.Vinson Lee2010-07-151-1/+4
| | | | | _vbo_Materialf calls _vbo_Materialfv, which uses the params argument as an array.
* mesa: Move GLES1/2 vbo entrypoints to vbo_exec_api.cKristian Høgsberg2010-04-271-0/+57
| | | | This let's us drop stubs.c.
* mesa: unmap the immediate mode VB before destroying itBrian Paul2010-04-191-1/+4
| | | | | | | Fixes failed assertion from fd.o bug 27713. The assertion was added with the new resource/transfer changes. This patch could apply to the 7.8 branch but it's not essential.
* mesa: implement core Mesa support for GL_ARB_draw_instancedBrian Paul2010-04-041-0/+1
|
* mesa: Move src/mesa/glapi/dispatch.h to mesa.Chia-I Wu2010-02-251-1/+1
| | | | | | glapi/dispatch.h is a core Mesa header file. Move the header file to main/ to make this clear. It also becomes clear after this change that IN_DRI_DRIVER is only used in core Mesa to enable the remap table.
* Drop macro wrappers for the aligned memory functionsKristian Høgsberg2010-02-191-2/+2
|
* Replace the _mesa_*printf() wrappers with the plain libc versionsKristian Høgsberg2010-02-191-3/+3
|
* Remove _mesa_memcpy in favor of plain memcpy.Kenneth Graunke2010-02-191-10/+10
| | | | This may break the SUNOS4 build, but it's no longer relevant.
* mesa: Enable true refcounting for NullBufferObj.Michal Krol2010-02-091-0/+12
| | | | | | | | This object can be shared with another context, so we cannot just delete it when the owning context is being destroyed. Ensuring that buffer objects are properly refcounted guarantees NullBufferObj is destroyed when all references to it are removed.
* vbo: make flush recursion check code per-contextBrian Paul2009-12-011-5/+6
| | | | This fixes invalid failed assertions when running multi-threaded apps.
* vbo: added recursion check in vbo_exec_FlushVertices()Brian Paul2009-11-191-1/+17
|
* Merge branch 'mesa_7_6_branch'Brian Paul2009-11-041-0/+6
|\ | | | | | | | | | | Conflicts: src/mesa/drivers/windows/gdi/mesa.def
| * vbo: fix out-of-bounds array accessBrian Paul2009-11-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | mesa: fix up vbo commentsBrian Paul2009-10-221-8/+14
| |
* | mesa/main: New feature FEATURE_beginend.Chia-I Wu2009-09-301-1/+93
| | | | | | | | | | This feature corresponds to the Begin/End paradigm. Disabling this feature also eliminates the use of GLvertexformat completely.
* | mesa/main: Make FEATURE_dlist follow feature conventions.Chia-I Wu2009-09-301-6/+1
| | | | | | | | | | As shown in mfeatures.h, this allows users of dlist.h to work without knowing if the feature is available.
* | mesa/main: Make FEATURE_evaluators follow feature conventions.Chia-I Wu2009-09-301-9/+10
| | | | | | | | | | As shown in mfeatures.h, this allows users of eval.h to work without knowing if the feature is available.
* | mesa/main: New feature FEATURE_arrayelt.Chia-I Wu2009-09-301-1/+2
|/ | | | This allows the removal of AEcontext.
* vbo: call _mesa_valid_to_render()Brian Paul2009-08-141-20/+1
|
* Merge branch 'mesa_7_5_branch'José Fonseca2009-06-111-2/+7
|\
| * vbo: fix assertion, #define IMM_BUFFER_NAMEBrian Paul2009-06-111-2/+7
| | | | | | | | | | This was sometimes seen when Glean exited upon test failure when using Gallium.
* | Merge branch 'mesa_7_5_branch'Jakob Bornecrantz2009-06-091-8/+21
|\| | | | | | | | | | | | | | | | | Conflicts: Makefile src/mesa/main/version.h src/mesa/shader/slang/slang_preprocess.c src/mesa/state_tracker/st_cb_bufferobjects.c
| * mesa/vbo: drop all references to vbo on destroyKeith Whitwell2009-06-081-8/+21
| | | | | | | | | | | | We were adding references to the input arrays, but failing to drop them on destruction. This could lead to a 64kb buffer being leaked each context destruction.
* | mesa: move the NullBufferObj from GLcontext to gl_shared_stateBrian Paul2009-05-071-2/+2
|/ | | | | Since shared array objects may point to the null/default buffer object, the null/default buffer object should be part of the shared state.
* vbo: yet tighter still usage of FLUSH_NEED_CURRENTKeith Whitwell2009-03-091-3/+3
| | | | | | | | Previous change broke redbook/polys and probably others. I'm fairly sure that drivers like r300 don't need to touch ctx->Driver.NeedVertices, but this code is incredibly fragile and I'm not confident about removing it from there. Hopefully this gets things working again.
* vbo: stricter checks on Driver.NeedFlushKeith Whitwell2009-03-091-4/+6
| | | | | | | | This variable is being used in the r300 driver to trigger a flush under circumstances unrelated to the use in the vbo module. Tighten up the checks in vbo so as to avoid conflict with r300. Reported by Maciej Cencora <[email protected]>
* vbo: second attempt - avoid getting buffer_ptr and buffer_map out of syncKeith Whitwell2009-03-041-0/+3
|