aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_bufferobjects.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'mesa_7_5_branch'Brian Paul2009-06-301-0/+3
|\ | | | | | | | | | | Conflicts: src/mesa/vbo/vbo_exec_draw.c
| * mesa: Set FLUSH_EXPLICIT_BIT flags when calling FlushMappedBufferRange.José Fonseca2009-06-301-0/+3
| | | | | | | | As prescribed by ARB_map_buffer_range.
* | st/mesa: restore some parameter checking buffer object functionsBrian Paul2009-06-191-0/+10
| | | | | | | | | | These functions may be called from the VBO code (not just user GL calls) so do some parameter sanity checking.
* | st/mesa: remove redundant st_buffer_object::size field and error checksBrian Paul2009-06-191-8/+0
| | | | | | | | | | | | Just use the gl_buffer_object::Size field. Remove unnecessary size/offset error checks. Core Mesa will have already done these checks before these functions are called.
* | Merge branch 'mesa_7_5_branch'Jakob Bornecrantz2009-06-091-6/+4
|\| | | | | | | | | | | | | | | | | Conflicts: Makefile src/mesa/main/version.h src/mesa/shader/slang/slang_preprocess.c src/mesa/state_tracker/st_cb_bufferobjects.c
| * mesa/st: fix tracking of mapped buffer rangesKeith Whitwell2009-06-091-1/+1
| | | | | | | | | | In st_bufferobj_map_range(), set obj->Offset consistently with its usage elsewhere.
| * st/mesa: fix incorrect bufObj Length assignment, remove unneeded assertionBrian Paul2009-06-081-2/+1
| |
* | st/mesa: minor clean-ups, reformatting, etcBrian Paul2009-06-021-14/+11
| |
* | st/mesa: implement/enable GL_ARB_copy_buffer extensionBrian Paul2009-06-021-0/+38
| |
* | st/mesa: enable GL_APPLE_vertex_array_object for gallium driversBrian Paul2009-05-131-0/+5
|/
* st: report GL_OUT_OF_MEMORY instead of assertingBrian Paul2009-04-211-4/+4
|
* st: assert on pipe_buffer_create failureKeith Whitwell2009-04-201-0/+5
| | | | | | This needs a proper fix to propogate the out-of-memory condition back up to Mesa and the app as a GL error. Until then, at least catch the problem at its source.
* gallium: Create OGL state tracker wrappers for various CPU access operations.Thomas Hellstrom2009-04-171-21/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are two usage types of buffer CPU accesses: One where we try to use the buffer contents for multiple draw commands in a batch. (batch := sequence of commands that are flushed together), like incrementally adding bitmaps to a bitmap texture that is reallocated on flush. And one where we assume we can safely overwrite the old buffer contexts, like glTexSubImage. In this case we need to make sure all old drawing commands referencing the buffer are flushed before we map the buffer. This is easily forgotten. Add wrappers for the most common of these operations. The first type is prefixed with "st_no_flush" and the second type is prefixed with "st_cond_flush", where "cond" indicates that we attmpt to only flush if there is indeed unflushed draw commands referencing the buffer. Prefixed functions are screen::get_tex_transfer pipe_buffer_write pipe_buffer_read pipe_buffer_map Please use the wrappers whenever possible. Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
* gallium: Make sure we flush before some texture / buffer operations.Thomas Hellstrom2009-04-151-1/+15
| | | | | | | Also implement context member functions to optimize away those flushes whenever possible. Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
* mesa: Follow ARB_map_buffer_range more stricly.José Fonseca2009-03-041-6/+26
| | | | | Namelly, FlushMappedBufferRange takes a subrange relative to the original range.
* Merge commit 'origin/master' into gallium-map-rangeJosé Fonseca2009-03-041-3/+2
|\
| * gallium: Unify reference counting.Michel Dänzer2009-03-041-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The core reference counting code is centralized in p_refcnt.h. This has some consequences related to struct pipe_buffer: * The screen member of struct pipe_buffer must be initialized, or pipe_buffer_reference() will crash trying to destroy a buffer with reference count 0. u_simple_screen takes care of this, but I may have missed some of the drivers not using it. * Except for rare exceptions deep in winsys code, buffers must always be allocated via pipe_buffer_create() or via screen->*buffer_create() rather than via winsys->*buffer_create().
* | mesa: Implement and use FlushMappedBufferRange.José Fonseca2009-03-041-2/+13
| |
* | mesa: Massage the interface to more closely resemble ARB_map_buffer_rangeJosé Fonseca2009-03-031-2/+7
|/
* Merge commit 'origin/gallium-0.1'Keith Whitwell2009-03-031-1/+34
|\ | | | | | | | | | | | | | | | | | | 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
| * mesa/st: implement MapBufferRange callbackKeith Whitwell2009-03-031-1/+34
| | | | | | | | Using PIPE_BUFFER_USAGE_DONTBLOCK.
* | gallium: Add pipe_buffer_write/read inlines.José Fonseca2009-02-241-8/+2
| | | | | | | | Saves code, and will simplify future interface changes.
* | mesa: use new ST_CALLOC_STRUCT() macro in gallium state trackerBrian Paul2009-02-121-1/+1
| |
* | mesa: consistantly use mesa memory-functions in gallium state trackerBrian Paul2009-02-121-1/+1
|/ | | | | Use _mesa_malloc(), _mesa_free(), etc everywhere, not malloc(), free(), etc. Still using CALLOC_STRUCT() at this point.
* gallium: Have pipe_buffer_* receive a pipe_screen instead of a pipe_context.José Fonseca2008-09-031-9/+9
| | | | | We want to use the pipe_buffer_* inlines everywhere, but a pipe context is not always available nor is it needed.
* gallium: use new buffer wrapper functions in p_inlines.hBrian Paul2008-04-301-13/+9
| | | | This allows us to remove most of the direct references to winsys in the state tracker.
* gallium: rename pipe_buffer_handle to pipe_buffer, rework pipebuffer/ codeKeith Whitwell2008-01-251-2/+3
| | | | | | | | | | | Provide an actual definition of the pipe_buffer struct, containing the parameters used to create the buffer, and its refcount. Shift refcounting buffers out of the winsys interface, similar to surfaces & textures. Rework pipebuffer/ to reflect the fact these changes, and also Michel's reworking of the buffer interface.
* gallium: Simplify winsys buffer interface.Michel Dänzer2008-01-251-44/+62
| | | | | | The properties of a buffer represented by struct pipe_buffer_handle are now basically constant over its lifetime. The state tracker gets to deal with any more complex buffer semantics it may need to provide.
* add fence interfaces and buffer create flags to pipe_winsyskeithw2007-12-091-1/+1
|
* Supply buffer usage hints to winsys.José Fonseca2007-11-061-1/+19
| | | | | Winsys driver needs some hints in order to allocate the appropriate kind of memory for the buffer.
* merge buffer_unreference(), buffer_reference()Brian2007-09-101-1/+1
|
* Lift common winsys functions into pipe's new p_winsys.Keith Whitwell2007-08-101-7/+8
|
* minor clean-upsBrian2007-08-101-17/+16
|
* pipe->region_alloc() now takes width instead of pitch, plus a flags paramBrian2007-08-101-1/+4
|
* New st_init_*_functions() to initialize the driver functions table.Brian2007-08-061-10/+8
| | | | | We need to do these initializations before initializing the Mesa context because context init involves creating texture/program/etc objects.
* Add pipe buffer managment functions.Keith Whitwell2007-08-061-0/+206
The state_tracker driver needs these to implement, eg. pixel buffer objects, vertex buffer objects.