summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/bufferobj.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: add/update comments in _mesa_copy_buffer_subdata()Brian Paul2012-01-071-1/+4
|
* mesa: only map src/dest regions in _mesa_copy_buffer_subdata()Brian Paul2012-01-051-6/+7
| | | | | | | We were wastefully mapping the whole source/dest buffers before. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]>
* mesa: print more info in buffer_object_subdata_range_good() error messageBrian Paul2012-01-051-1/+4
|
* mesa: Use VERT_ATTRIB_* indexed array in gl_array_object.Mathias Fröhlich2011-11-291-11/+0
| | | | | | | | | | | | Replace the distinct struct gl_client_array members in gl_array_object by an array of gl_client_arrays indexed by VERT_ATTRIB_*. Renumber the vertex attributes slightly to keep the old semantics of the distinct array members. Make use of the upper 32 bits in VERT_BIT_*. Update all occurances of the distinct struct members with the array equivalents. Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: move ElementArrayBufferObj to gl_array_objectYuanhan Liu2011-11-291-6/+3
| | | | | | | | | | | | | | | According opengl spec 4.2.pdf table 6.12 (Vertex Array Object State) at page 515, the element buffer object is listed in vertex array object. So, move the ElementArrayBufferObj inside gl_array_object to make element buffer object per-vao. This would fix most of(3 left) intel oglc vao test fail NOTE: this is a candidate for the 7.11 branch. Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: check for null ptr in _mesa_is_bufferobj()Brian Paul2011-11-281-3/+3
| | | | | | | This simplifies a few callers. And it adds a bit of robustness. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]>
* mesa: Avoid ABA problem on buffer object bind.Mathias Fröhlich2011-10-241-1/+12
| | | | | | | | | | | | | | Make sure we do not run into the classic ABA problem on buffer object bind, reusing this name and may be never rebind since we get an new name that was just deleted and never rebound in between. The explicit rebinding to the debault object in the current context prevents the above in the current context, but another context sharing the same objects might suffer from this problem. Minor var renaming and comments edited by Brian. Signed-off-by: Mathias Fröhlich <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: s/INLINE/inline/Brian Paul2011-10-011-2/+2
| | | | | | | INLINE is still seen in some files (some generated files, etc) but this is a good start. Acked-by: Kenneth Graunke <[email protected]>
* mesa: fix error handling for glMapBufferRangeYuanhan Liu2011-09-191-0/+11
| | | | | | | | Accroding the man page, GL_INVALID_VALUE would generated if access has any bits set other than those valid defined bits. Signed-off-by: Yuanhan Liu <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: handle zero-size buffers in MapBuffer and ranges in MapBufferRange (v3)Marek Olšák2011-09-021-1/+23
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Eliminate dd_function_table::MapBufferIan Romanick2011-08-231-37/+6
| | | | | | | | | | 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::FlushMappedBufferRangeIan 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::MapBufferRangeIan Romanick2011-08-231-4/+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::GetBufferSubDataIan Romanick2011-08-231-4/+3
| | | | | | | | | | 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::BufferSubDataIan Romanick2011-08-231-3/+3
| | | | | | | | | | 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::MapBufferIan Romanick2011-08-231-7/+4
| | | | | | | | | | 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-8/+6
| | | | | | | | | | 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]>
* main: use inline function wrapper for _mesa_reference_buffer_object()Brian Paul2011-07-141-6/+5
|
* mesa: simplify error check in _mesa_MapBufferRange()Brian Paul2011-05-181-8/+7
|
* mesa: core support for GL_ARB_texture_buffer_objectBrian Paul2011-04-051-0/+5
| | | | No GLSL or driver support yet.
* mesa: rename functions to follow Mesa conventionsBrian Paul2011-03-191-35/+29
|
* mesa: 80-column wrappingBrian Paul2011-03-191-2/+4
|
* mesa: call FLUSH_VERTICES() before deleting shaders, buffers, query objectsBrian Paul2011-03-111-0/+1
| | | | | | | | Need to flush rendering (or at least indicate that the rug might be getting pulled out from underneath us) when a shader, buffer object or query object is about to be deleted. Also, this helps to tell the VBO module to unmap its current vertex buffer.
* mesa: initialize DummyBufferObject's mutexBrian Paul2011-03-071-0/+1
| | | | | | The mutex's fields were all zeros. That's OK on Linux, but not Windows. NOTE: This is a candidate for the 7.10 branch.
* mesa: move PBO-related functions into a new fileBrian Paul2011-02-281-242/+0
|
* mesa: add/update VERBOSE_API loggingBrian Paul2011-02-081-0/+13
|
* mesa: Directly include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-071-0/+1
|
* mesa: Include mtypes.h in files that use gl_context struct.Vinson Lee2011-01-051-0/+1
| | | | | | Directly include mtypes.h if a file uses a gl_context struct. This allows future removal of headers that are not strictly necessary but indirectly include mtypes.h for a file.
* mesa: fix glDeleteBuffers() regressionBrian Paul2010-11-111-2/+2
| | | | | | | | This fixes a regression (failed assertion) from commit c552f273f559968dfd770367e25329baccbcd0c4 which was hit if glDeleteBuffers() was called on a buffer that was never bound. NOTE: this is a candidate for the 7.9 branch.
* mesa: make glIsBuffer() return false for never bound buffersBrian Paul2010-11-111-14/+18
| | | | | | | Use a dummy buffer object as we do for frame/renderbuffer objects. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=31514 Note: this is a candidate for the 7.9 branch.
* mesa: no-op glBufferSubData() on size==0Brian Paul2010-11-091-0/+3
| | | | | | Fixes http://bugs.freedesktop.org/show_bug.cgi?id=31439 NOTE: this is a candidate for the 7.9 branch
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-35/+35
|
* mesa: Force GL_ARB_copy_buffer to always be enabledIan Romanick2010-09-271-8/+2
| | | | As per discussions at XDS.
* mesa: fix some printf warnings with castsBrian Paul2010-09-021-4/+4
|
* mesa: Fix many printf-like warnings.Eric Anholt2010-09-011-9/+9
| | | | | | | | Most of these are just typecasting to long to match the arg type. I don't really care too much about getting a GLsizei or whatever appropriate type in. However, there were a number of real bugs, like missing arguments or passing floats to integer format specifiers. My favorite: printflike("%s, argument") is missing an argument.
* mesa: return retval in _mesa_RenderObjectUnpurgeable()Brian Paul2010-07-161-1/+1
| | | | | | Found by Vinson with static analysis. NOTE: This is a candidate for the 7.8 branch.
* mesa: fix _mesa_Texture/Render/BufferObjectUnpurgeable() return valuesBrian Paul2010-07-141-3/+3
| | | | | | | Fixes piglit object_purgeable-api-pbo, object_purgeable-api-vbo and object_purgeable-api-texture failures with swrast. NOTE: This is a candidate for the 7.8 branch.
* mesa: add new query/buffer targets for transform feedbackBrian Paul2010-03-301-0/+7
|
* mesa: Add missing features.Chia-I Wu2010-03-301-1/+1
| | | | | | | Add features tested in the code but missing from mfeatures.h. This also fixes some tests of features. They should be tested with "#if", not "#ifdef".
* mesa: remove return, do as the comment saysBrian Paul2010-03-221-1/+0
|
* mesa: added new GL3 buffer object queriesBrian Paul2010-03-201-15/+53
| | | | And clean up the error checking code.
* Always return VOLATILE for ObjectPurgeable(VOLATILE)Chris Wilson2010-03-051-4/+16
| | | | | | | | | | | | Fixes fdo bug 26128. The spec mandates that VOLATILE is returned from ObjectPurgeable(VOLATILE) irrespective of the actual status of the object upon completion of marking it purgeable. Conform to the spec, even though it seems wrong. Signed-off-by: Chris Wilson <[email protected]>
* mesa: whitespace fixes, 80-column wrapping, etc.Brian Paul2010-03-051-84/+102
|
* APPLE_object_purgeable: coreChris Wilson2010-03-051-0/+356
| | | | Signed-off-by: Chris Wilson <[email protected]>
* Replace the _mesa_*printf() wrappers with the plain libc versionsKristian Høgsberg2010-02-191-4/+4
|
* Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versionsKristian Høgsberg2010-02-191-2/+2
|
* mesa: replace _mesa_bzero() with memset()Brian Paul2010-02-191-1/+1
|
* Remove _mesa_memcpy in favor of plain memcpy.Kenneth Graunke2010-02-191-4/+4
| | | | This may break the SUNOS4 build, but it's no longer relevant.
* mesa: Enable true refcounting for NullBufferObj.Michal Krol2010-02-091-0/+11
| | | | | | | | 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.
* mesa: Protect buffer objects reference counting with a mutex.Michal Krol2010-02-091-4/+6
|