aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_split_copy.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: move more format helper functions to glformats.cBrian Paul2012-07-241-1/+1
|
* mesa: add gl_context::NewDriverState and use it for vertex arraysMarek Olšák2012-05-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+7
| | | | | | | | | | | | | | | | | | 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: implement DrawTransformFeedback from ARB_transform_feedback2Marek Olšák2011-12-151-1/+2
| | | | | | | | | | | | | | 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.
* mesa: Set the "Integer" field of gl_client_array properly.Paul Berry2011-11-021-0/+1
| | | | | | | | | | | This patch ensures that gl_client_array::Integer is properly set to GL_TRUE for vertex attributes specified using glVertexAttribIPointer, and to GL_FALSE for vertex attributes specified using glVertexAttribPointer, so that the vertex attributes can be interpreted properly by driver back-ends. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Eliminate dd_function_table::MapBufferIan Romanick2011-08-231-2/+3
| | | | | | | | | | Replace all calls to dd_function_table::MapBuffer with appropriate calls to dd_function_table::MapBufferRange, then remove all the cruft. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove target parameter from dd_function_table::MapBufferIan Romanick2011-08-231-3/+2
| | | | | | | | | | 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]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove target parameter from dd_function_table::UnmapBufferIan Romanick2011-08-231-2/+2
| | | | | | | | | | 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: Update _ElementSize.Brian Paul2011-04-071-0/+1
|
* vbo: initialize num_instances in a few placesBrian Paul2011-01-181-0/+1
| | | | | | This fixes https://bugs.freedesktop.org/show_bug.cgi?id=33247 There might still be some issues with drawing multiple instances with VBO splitting to investigate someday.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-5/+5
|
* vbo: Fix vbo_split_copy to pass correct max_index to draw.Pauli Nieminen2010-03-211-1/+1
| | | | | | | | vbo_split_copy was passing one past the max_index to draw function which caused _tnl_draw_prims function to read uninitialized values from copied array. Bug was spoted in valgrind report of progs/tests/cva_huge.
* Replace the _mesa_*printf() wrappers with the plain libc versionsKristian Høgsberg2010-02-191-18/+18
|
* Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versionsKristian Høgsberg2010-02-191-7/+7
|
* vbo: Remove unnecessary header from vbo_split_copy.c.Vinson Lee2010-01-111-3/+0
|
* mesa: Add support for ARB_draw_elements_base_vertex.Eric Anholt2009-09-081-20/+32
|
* vbo: use _mesa_is_bufferobj()Brian Paul2009-08-121-4/+7
|
* vbo: Avoid extra validation of DrawElements.Eric Anholt2009-08-121-0/+1
| | | | | | | | | | | | | 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.
* Merge branch 'mesa_7_5_branch'Jakob Bornecrantz2009-07-031-1/+1
|\ | | | | | | | | | | Conflicts: src/mesa/main/dlist.c src/mesa/vbo/vbo_save_api.c
| * mesa/vbo: use _lookup_prim_by_nr for debuggingKeith Whitwell2009-06-301-1/+1
| | | | | | | | Switch over to specialized enum lookup for primitives
* | mesa: revert some recent VBO buffer object refcounting changesBrian Paul2009-06-151-5/+2
| | | | | | | | | | | | | | | | Reverts part of commit d7ea9ddf5824556e47decac7ba200f37cf1e552f. We were calling _mesa_reference_buffer_object() on some heap-allocated memory that was uninitialized and could trigger an assertion. We can actually go back to "looser" ref counting of the Null/default buffer object in these cases.
* | mesa: use _mesa_reference_buffer_object() in a few placesBrian Paul2009-06-121-2/+5
| |
* | vbo: new debug/dump code (disabled)Brian Paul2009-06-031-0/+58
| |
* | 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.
* | mesa: use _mesa_sizeof_type() in vbo split codeBrian Paul2009-05-071-16/+2
| |
* | mesa: vbo code reformatting, clean-up, commentsBrian Paul2009-05-071-43/+52
| |
* | mesa: in vbo split code, map buffers read-only, not write-onlyBrian Paul2009-05-071-6/+6
|/ | | | And use GL_ELEMENT_ARRAY_BUFFER where appropriate.
* mesa: set the new array->Format field in VBO codeBrian Paul2009-01-231-0/+1
| | | | Should help to solve failed assertion in i965 driver (see bug 19708)
* fix vbo_split_copy related bug 9962Xiang, Haihao2007-08-071-1/+8
|
* Be more consistant with paths in #includes. Eventually, eliminate a bunch ↵Brian2007-07-041-5/+5
| | | | of -I flags.
* fix missing ADD_POINTERS, fixes crashes if the index elements are in a vbo.Roland Scheidegger2007-02-011-5/+7
|
* Use new rebase helper. Remove other rebase code.Keith Whitwell2007-01-301-1/+0
|
* allocate larger minimum dstelt bufferRoland Scheidegger2007-01-251-1/+1
| | | | | | | | increase the minimum dstelt buffer size to avoid triggering an assertion later because the split is triggered before the buffer is full. This fixes cases where the vbo_split_copy path is hit because of maximum index limit, where the dstelt buffer size needed could be very small (doom3 hit that assertion with a vertex count of just 3)
* fix dstelt memory allocation to avoid hash corruptionRoland Scheidegger2007-01-251-1/+1
|
* Fix invalid enums passed to MapBufferAapo Tahkola2007-01-181-2/+2
|
* Merge branch 'master' of git+ssh://[email protected]/git/mesa/mesa ↵Keith Whitwell2007-01-161-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | into vbo-0.2 Conflicts: src/mesa/array_cache/sources src/mesa/drivers/dri/i965/brw_context.c src/mesa/drivers/dri/i965/brw_draw.c src/mesa/drivers/dri/i965/brw_fallback.c src/mesa/drivers/dri/i965/brw_vs_emit.c src/mesa/drivers/dri/i965/brw_vs_tnl.c src/mesa/drivers/dri/mach64/mach64_context.c src/mesa/main/extensions.c src/mesa/main/getstring.c src/mesa/tnl/sources src/mesa/tnl/t_save_api.c src/mesa/tnl/t_save_playback.c src/mesa/tnl/t_vtx_api.c src/mesa/tnl/t_vtx_exec.c src/mesa/vbo/vbo_attrib.h src/mesa/vbo/vbo_exec_api.c src/mesa/vbo/vbo_save_api.c src/mesa/vbo/vbo_save_draw.c
* New files to manage splitting drawing commandskeithw2007-01-151-0/+549