summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/bufferobj.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: remove _NEW_BUFFER_OBJECTMarek Olšák2017-06-221-2/+2
| | | | | | | | not used Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: refuse to change tex buffers when a handle is allocatedSamuel Pitoiset2017-06-141-2/+2
| | | | | | | | | | | The ARB_bindless_texture spec says: "The error INVALID_OPERATION is generated by BufferData if it is called to modify a buffer object bound to a buffer texture while that texture object is referenced by one or more texture handles." Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add KHR_no_error support for glBindBuffer()Samuel Pitoiset2017-06-071-0/+10
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glInvalidateBufferData()Samuel Pitoiset2017-06-071-0/+9
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glInvalidateBufferSubData()Samuel Pitoiset2017-06-071-0/+10
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add invalidate_buffer_subdata() helperSamuel Pitoiset2017-06-071-4/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glBindBufferRange()Timothy Arceri2017-05-301-37/+66
| | | | | Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: create bind_buffer_range() helperTimothy Arceri2017-05-301-3/+10
| | | | | | | This will help us add KHR_no_error support. Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: convert mesa_bind_buffer_range_transform_feedback() to a validate functionTimothy Arceri2017-05-301-4/+8
| | | | | | | | This allows some tidy up and also makes it so we can add KHR_no_error support. Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: split bind_atomic_buffer() in twoTimothy Arceri2017-05-301-25/+29
| | | | | | | This will help us add KHR_no_error support. Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: split bind_buffer_range_shader_storage_buffer() in twoTimothy Arceri2017-05-301-13/+23
| | | | | | | This will help us implement KHR_no_error support. Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: split bind_buffer_range_uniform_buffer() in twoTimothy Arceri2017-05-301-13/+19
| | | | | | | This will help us implement KHR_no_error support. Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: add KHR_no_error support for glBufferSubData()Timothy Arceri2017-05-171-3/+17
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add KHR_no_error support for glNamedBufferSubData()Timothy Arceri2017-05-171-7/+20
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add buffer_sub_data() helperTimothy Arceri2017-05-171-17/+24
| | | | | | | This will allow us to share code between the dsa, non-dsa and no_error variants. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: create validate_buffer_sub_data() helperTimothy Arceri2017-05-171-28/+39
| | | | | | | This change assumes meta will always pass valid arguments to _mesa_buffer_sub_data(). Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add KHR_no_error support for glBufferStorage()Timothy Arceri2017-05-171-3/+17
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add KHR_no_error support for glNamedBufferStorage()Timothy Arceri2017-05-171-7/+24
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add inlined_buffer_storage() helperTimothy Arceri2017-05-171-20/+27
| | | | | | | This will allow us to share code between the dsa, non-dsa and no_error variants. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add validate_buffer_storage() helperTimothy Arceri2017-05-171-15/+27
| | | | | | This will allow use to add KHR_no_error support. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: some C99 tidy upsTimothy Arceri2017-05-071-24/+10
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add KHR_no_error support to copy buffer subdata functionsTimothy Arceri2017-05-071-0/+33
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove _mesa from static functionTimothy Arceri2017-05-071-4/+4
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_buffer_storage() staticTimothy Arceri2017-05-071-8/+7
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_copy_buffer_sub_data() staticTimothy Arceri2017-05-071-10/+8
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_clear_buffer_sub_data() staticTimothy Arceri2017-05-071-20/+13
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add KHR_no_error support for flush mapped buffer functionsTimothy Arceri2017-05-071-0/+25
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_flush_mapped_buffer_range() staticTimothy Arceri2017-05-071-9/+9
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add KHR_no_error support for unmap buffer functionsTimothy Arceri2017-05-071-0/+19
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: split unmap_buffer() in twoTimothy Arceri2017-05-071-12/+17
| | | | | | | This will allow us to implement KHR_no_error support for unmap functions. Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_unmap_buffer() staticTimothy Arceri2017-05-071-5/+5
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add KHR_no_error support for some map buffer functionsTimothy Arceri2017-05-071-0/+53
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: split out validation from map_buffer_range()Timothy Arceri2017-05-071-27/+50
| | | | | | | This will allow us to add KHR_no_error support for *BufferRange functions. Reviewed-by: Eric Anholt <[email protected]>
* mesa: make map_buffer_range() staticTimothy Arceri2017-05-071-14/+13
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove fallback RefCount == 0 patternTimothy Arceri2017-04-221-10/+4
| | | | | | | | We should never get here if this is 0 unless there is a bug. Replace the check with an assert. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: stop abstracting buffer object hashtable lockingTimothy Arceri2017-04-071-23/+10
| | | | | | | This doesn't do anything useful so just remove it. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: use internal function when deleting buffersTimothy Arceri2017-04-061-16/+16
| | | | | | | This avoids validation and looking up the buffer target for a second time. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: rework bind_buffer_object()Timothy Arceri2017-04-061-18/+16
| | | | | | | | This allows internal users to pass buffer objects directly and allows for KHR_no_error support to be more easily added. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: implement sparse buffer commitmentNicolai Hähnle2017-04-051-0/+66
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: implement sparse storage buffer allocationNicolai Hähnle2017-04-051-6/+23
| | | | | | | v2: - spec quote and style (Ian) Reviewed-by: Marek Olšák <[email protected]>
* mesa: Add GL_ARB_sparse_buffer boilerplateNicolai Hähnle2017-04-051-0/+12
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: fix comment indentation in bind_buffers_check_offset_and_size()Brian Paul2016-11-111-10/+10
| | | | Trivial.
* mesa: rename gl_vertex_array_object::VertexBinding to BufferBindingBrian Paul2016-10-281-4/+4
| | | | | | To be a little more understandable. Reviewed-by: Anuj Phogat <[email protected]>
* mesa: Unbind deleted vbo using _mesa_bind_vertex_buffer.Mathias Fröhlich2016-07-311-4/+7
| | | | | | | | | | | | When a vertex buffer object gets deleted, it is unbound at the VAO. To do this use _mesa_bind_vertex_buffer instead of plain unreferencing the buffer object. This keeps the VAOs internal state consistent. In this case it showed up with gl_vertex_array_object::VertexAttribBufferMask getting out of sync. Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/bufferobj: use mapping range in BufferSubData.Dave Airlie2016-06-011-1/+1
| | | | | | | | | | | | | | | | | According to GL4.5 spec: An INVALID_OPERATION error is generated if any part of the speci- fied buffer range is mapped with MapBufferRange or MapBuffer (see sec- tion 6.3), unless it was mapped with MAP_PERSISTENT_BIT set in the Map- BufferRange access flags. So we should use the if range is mapped path. This fixes: GL45-CTS.buffer_storage.map_persistent_buffer_sub_data Reviewed-by: Nicolai Hähnle <[email protected]> Cc: "12.0, 11.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: log buffer ID numbers in decimal, not hexadecimalBrian Paul2016-05-241-2/+2
| | | | | | All the other error messages use decimal. Let's be consistent. Reviewed-by: Anuj Phogat <[email protected]>
* mesa: use enum name in bind_buffer_object() error messageBrian Paul2016-05-241-1/+2
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* mesa: Replace uses of Shared->Mutex with hash-table mutexesMatt Turner2016-05-201-12/+14
| | | | | | | | | | | | | | | We were locking the Shared->Mutex and then using calling functions like _mesa_HashInsert that do additional per-hash-table locking internally. Instead just lock each hash-table's mutex and use functions like _mesa_HashInsertLocked and the new _mesa_HashRemoveLocked. In order to do this, we need to remove the locking from _mesa_HashFindFreeKeyBlock since it will always be called with the per-hash-table lock taken. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* main: uses casts to silence some _mesa_debug() format warningsBrian Paul2016-05-041-4/+6
| | | | | | | Silences warnings with 32-bit Linux gcc builds and MinGW which doesn't recognize the ‘t’ conversion character. Reviewed-by: Sinclair Yeh <[email protected]>
* mesa: add OES_texture_buffer and EXT_texture_buffer supportIlia Mirkin2016-03-281-2/+2
| | | | | | | | Allow ES 3.1 contexts to access the texture buffer functionality. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>