summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/varray.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: simplify and optimise vertex bindings trackingTimothy Arceri2017-04-081-5/+3
| | | | | | | | We only need to update it if something changes. Also _mesa_bind_vertex_buffer() will update the mask when binding to a NULL or default buffer so no need to do that update here. Reviewed-by: Juan A. Suarez Romero <[email protected]>
* mesa: stop abstracting buffer object hashtable lockingTimothy Arceri2017-04-071-2/+2
| | | | | | | This doesn't do anything useful so just remove it. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: move FLUSH_VERTICES() call to metaTimothy Arceri2017-03-311-7/+2
| | | | | | | | There is no need for this to be in the common code. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Create pointers for multithread marshalling dispatch table.Paul Berry2017-03-161-4/+4
| | | | | | | | | | | | | | This patch splits the context's CurrentDispatch pointer into two pointers, CurrentClientDispatch, and CurrentServerDispatch, so that when doing multithread marshalling, we can distinguish between the dispatch table that's being used by the client (to serialize GL calls into the marshal buffer) and the dispatch table that's being used by the server (to execute the GL calls). Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* mesa/extensions: expose OES_vertex_half_float for ES2Kevin Strasser2016-11-091-2/+5
| | | | | | | | | Half float support already exists for desktop GL. Reuse the ARB_half_float_vertex enable bit and account for the different enum to enable the extension for ES2. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: rename gl_client_array -> gl_vertex_arrayBrian Paul2016-10-281-2/+2
| | | | | | | | | | | The term "client array" is a legacy thing dating back to the pre-VBO era when _all_ vertex arrays lived in client memory. Nowadays, it only contains vertex array state which is derived from gl_array_attributes and gl_vertex_buffer_binding. It's used by the VBO module and some drivers. Reviewed-by: Anuj Phogat <[email protected]>
* mesa: update comment on vertex_attrib_binding()Brian Paul2016-10-281-1/+2
| | | | | | Was missed in an earlier renaming patch. Reviewed-by: Anuj Phogat <[email protected]>
* mesa: rename gl_vertex_array_object::VertexBinding to BufferBindingBrian Paul2016-10-281-16/+16
| | | | | | To be a little more understandable. Reviewed-by: Anuj Phogat <[email protected]>
* mesa: fix indentation in vertex_attrib_binding()Brian Paul2016-10-131-2/+2
| | | | Reviewed-by: Mathias Fröhlich <[email protected]>
* mesa: add sanity check assertion in update_array_formatBrian Paul2016-10-131-0/+3
| | | | | | At most, one of the normalized, integer, doubles bools can be true. Reviewed-by: Mathias Fröhlich <[email protected]>
* mesa: remove needless cast in update_array()Brian Paul2016-10-131-1/+1
| | | | Reviewed-by: Mathias Fröhlich <[email protected]>
* mesa: simplify update_array() with a vao local varBrian Paul2016-10-131-7/+7
| | | | Reviewed-by: Mathias Fröhlich <[email protected]>
* mesa: rename gl_vertex_attrib_array gl_array_attributesBrian Paul2016-10-131-7/+7
| | | | | | | The structure contains the attributes of a vertex array. The old name was kind of confusing. Reviewed-by: Mathias Fröhlich <[email protected]>
* mesa: rename gl_vertex_attrib_array::VertexBindingBrian Paul2016-10-131-8/+8
| | | | | | | | | Rename to gl_vertex_attrib_array::BufferBindingIndex because this field is an index into the array of buffer binding points. This makes some code a little easier to follow since there's also a "VertexBinding" field in gl_vertex_array_object. Reviewed-by: Mathias Fröhlich <[email protected]>
* mesa: Remove set but not used gl_client_array::Stride.Mathias Fröhlich2016-07-311-1/+0
| | | | | | | | The field is only read for printing today and there it was probably a leftover. Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove set but not used gl_client_array::Enabled.Mathias Fröhlich2016-07-311-1/+0
| | | | | | | | The way it is used today does not care about the Enabled flag anymore. Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Walk the VAO in _mesa_print_arrays.Mathias Fröhlich2016-07-311-32/+20
| | | | | | | | | Only a debugging function, but move away from gl_client_array and use the first order information from the VAO. Also make use of gl_vert_attrib_name. Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Move sanity check of BindVertexBuffer for OpenGL ES 3.1Marta Lofstedt2016-01-191-0/+4
| | | | | | | | | Sanity check of BindVertexBuffer for OpenGL ES in _mesa_handle_bind_buffer_gen breaks OpenGL ES 2 conformance. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93426 Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa/varray: set double arrays to non-normalised.Dave Airlie2015-12-101-1/+1
| | | | | | | | | | | Doesn't have any effect in practice I don't think, but CTS reads back using GetVertexAttrib. This fixes: GL41-CTS.vertex_attrib_64bit.get_vertex_attrib Cc: "11.0 11.1" <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: error out in indirect draw when vertex bindings mismatchTapani Pälli2015-11-261-0/+10
| | | | | | | | | | | | | | | | | | | | Patch adds additional mask for tracking which vertex arrays have associated vertex buffer binding set. This array can be directly compared to which vertex arrays are enabled and should match when drawing. Fixes following CTS tests: ES31-CTS.draw_indirect.negative-noVBO-arrays ES31-CTS.draw_indirect.negative-noVBO-elements v2: update mask in vertex_array_attrib_binding v3: rename mask and make it track _BoundArrays which matches what was actually originally wanted (Fredrik Höglund) v4: code cleanup, check for GLES 3.1 (Fredrik Höglund) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Fredrik Höglund <[email protected]>
* mesa: Refactor enable_vertex_array_attrib to make ↵Ian Romanick2015-11-241-9/+17
| | | | | | | | | | | | | | _mesa_enable_vertex_array_attrib Pulls the parts of enable_vertex_array_attrib that aren't just parameter validation out into a function that can be called from other parts of Mesa (e.g., meta). _mesa_enable_vertex_array_attrib can also be used to enable fixed-function arrays. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* mesa: Refactor update_array_format to make _mesa_update_array_format_publicIan Romanick2015-11-241-19/+49
| | | | | | | | | Pulls the parts of update_array_format that aren't just parameter validation out into a function that can be called from other parts of Mesa (e.g., meta). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* mesa: Make bind_vertex_buffer avilable outside varray.cIan Romanick2015-11-241-14/+15
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Abdiel Janulgue <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* mesa: remove Driver.NewArrayObjectMarek Olšák2015-10-031-1/+1
| | | | | | | Nothing reimplements it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa/es3.1: Enable GL_ARB_vertex_attrib_binding functionality for GLES 3.1Marta Lofstedt2015-09-221-7/+7
| | | | Signed-off-by: Marta Lofstedt <[email protected]>
* mesa: whitespace, line wrap fixes in varray.cBrian Paul2015-09-161-12/+20
| | | | Trivial.
* mesa: Remove target parameter from _mesa_handle_bind_buffer_genIan Romanick2015-09-021-2/+1
| | | | | | | | | | main/bufferobj.c: In function '_mesa_handle_bind_buffer_gen': main/bufferobj.c:915:37: warning: unused parameter 'target' [-Wunused-parameter] GLenum target, ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: Rename _mesa_lookup_enum_by_nr() to _mesa_enum_to_string().Kenneth Graunke2015-07-201-3/+3
| | | | | | | Generated by sed; no manual changes. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: use _mesa_lookup_enum_by_nr() in print_array()Brian Paul2015-06-221-4/+4
| | | | | | Print GL_FLOAT, etc. instead of hex value. Reviewed-by: Ilia Mirkin <[email protected]>
* Revert "mesa: Add ARB_direct_state_access checks in VAO functions"Ian Romanick2015-05-281-64/+0
| | | | | | | This reverts commit 36b05793372b86b914d9b95d0188f5f387e01d68. Acked-by: Fredrik Höglund <[email protected]> Cc: "10.6" <[email protected]>
* mesa: Add ARB_direct_state_access checks in VAO functionsFredrik Höglund2015-05-141-0/+64
| | | | | Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* mesa: Implement GetVertexArrayIndexed[64]ivFredrik Höglund2015-05-081-0/+117
| | | | | | v2: Fix the name of the entry point in the error messages. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add support for querying GL_VERTEX_ATTRIB_ARRAY_LONGFredrik Höglund2015-05-081-0/+5
| | | | | | This parameter was added in OpenGL 4.3 and GL_ARB_direct_state_access. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add a vao parameter to get_vertex_array_attribFredrik Höglund2015-05-081-9/+16
| | | | | | | | | This is needed to implement glGetVertexArrayIndexediv and glGetVertexArrayIndexed64iv. v2: Make the vao parameter const. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement VertexArrayBindingDivisorFredrik Höglund2015-05-081-16/+49
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add a vao parameter to vertex_binding_divisorFredrik Höglund2015-05-081-4/+6
| | | | | | This is needed to implement VertexArrayBindingDivisor. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement VertexArrayAttribBindingFredrik Höglund2015-05-081-22/+55
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add a vao parameter to vertex_attrib_bindingFredrik Höglund2015-05-081-6/+9
| | | | | | This is needed to implement VertexArrayAttribBinding. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement VertexArrayAttrib[I|L]FormatFredrik Höglund2015-05-081-0/+79
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add a vao parameter to update_array_formatFredrik Höglund2015-05-081-7/+10
| | | | | | This is needed to implement VertexArrayAttrib*Format. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Refactor VertexAttrib[I|L]FormatFredrik Höglund2015-05-081-100/+49
| | | | | | | | The only difference between these functions is the legal types and sizes, so consolidate the code into a single vertex_attrib_format() function and call it from all three entry points. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement VertexArrayVertexBuffersFredrik Höglund2015-05-081-27/+63
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement VertexArrayVertexBufferFredrik Höglund2015-05-081-25/+58
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add a vao parameter to bind_vertex_bufferFredrik Höglund2015-05-081-8/+10
| | | | | | | This is needed to implement VertexArrayVertexBuffer and VertexArrayVertexBuffers. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement EnableVertexArrayAttribFredrik Höglund2015-05-081-9/+37
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement DisableVertexArrayAttribFredrik Höglund2015-05-081-9/+36
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa/vbo: add support for 64-bit vertex attributes. (v1)Dave Airlie2015-05-081-17/+47
| | | | | | | | | | | | This adds support in the vbo and array code to handle double vertex attributes. v0.2: merge code to handle doubles in vbo layer. v1: don't use v0, merge api_array elt code. Acked-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mapi: add GL_ARB_vertex_attrib_64bit supportDave Airlie2015-05-081-1/+9
| | | | | | | | This just adds the glapi bits. Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: include stdio.h where neededBrian Paul2015-03-051-0/+1
| | | | | | | Instead of relying on glapi.h or some other header to provide it. Acked-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mesa/main: replace Elements() with ARRAY_SIZE()Brian Paul2015-03-021-7/+7
| | | | | | | | We've been using a mix of these two macros for a while now. Let's just use the later everywhere. It seems to be the convention used by other open-source projects. Acked-by: Ilia Mirkin <[email protected]>