aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/api_validate.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Rename API_OPENGL to API_OPENGL_COMPAT.Paul Berry2012-11-291-2/+2
| | | | | | | | | | This should help avoid confusion now that we're using the gl_api enum to distinguishing between core and compatibility API's. The corresponding enum value for core API's is API_OPENGL_CORE. Acked-by: Eric Anholt <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* mesa: remove ASSERT_NO_FEATURE macroBrian Paul2012-10-161-1/+1
| | | | | | Was only used in one place. Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove FEATURE_EXT_transform_feedback define.Oliver McFadden2012-09-151-4/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove FEATURE_es2_glsl and related defines.Oliver McFadden2012-09-151-6/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Validate primitive modes in Mesa code rather than the ES wrapperIan Romanick2012-08-291-2/+5
| | | | | | v2: Add proper core-profile filtering. Signed-off-by: Ian Romanick <[email protected]>
* mesa: Refactor _mesa_valid_prim_mode to use a switch-statementIan Romanick2012-08-291-5/+27
| | | | | | This makes the next change a bit easier. Signed-off-by: Ian Romanick <[email protected]>
* mesa: Refactor element type checking into its own functionIan Romanick2012-08-241-23/+25
| | | | | | | | | | | | This consolidates the tests and makes the emitted error message consistent. v2: Rename _mesa_valid_element_type to valid_elements_type. Log the enum string instead of the hex value in error messages. Based on review comments from Brian Paul and Ken Graunke. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add support for using API_OPENGL_COREJordan Justen2012-07-301-0/+1
| | | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: implement new DrawTransformFeedback functionsMarek Olšák2012-07-121-5/+21
| | | | Acked-by: Ian Romanick <[email protected]>
* mesa: use FLUSH_CURRENT and not FLUSH_VERTICES in _mesa_validate_*Marek Olšák2012-07-021-7/+14
| | | | | | | | | | | | | | | | ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL calls FLUSH_VERTICES, which is not what we want. This fixes a breakage in classic drivers, introduced in: 62b971673950148eb949ba23d7fdc47debea16f0 vbo: first ASSERT_OUTSIDE_BEGIN_END then FLUSH, not the other way around It should fix: https://bugs.freedesktop.org/show_bug.cgi?id=51629 https://bugs.freedesktop.org/show_bug.cgi?id=51642 Reviewed-by: Brian Paul <[email protected]>
* vbo: optimize validation for glMultiDrawElementsMarek Olšák2012-06-281-0/+70
| | | | | | | | | Some parameters need to be checked only once. check_valid_to_render needs to be called only once. The validate function is based on the one for DrawElements. Reviewed-by: Brian Paul <[email protected]>
* vbo: first ASSERT_OUTSIDE_BEGIN_END then FLUSH, not the other way aroundMarek Olšák2012-06-281-6/+6
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Validate the drawing primitive against the transform feedback mode.Eric Anholt2012-03-191-2/+43
| | | | | | Fixes piglit GL_EXT_transform_feedback/negative-prims. Reviewed-by: Brian Paul <[email protected]>
* mesa: Fold error generation into _mesa_valid_prim_mode().Eric Anholt2012-03-191-15/+9
| | | | | | | | | | | | | We want to start emitting an INVALID_OPERATION from here for transform feedback. Note that this forced dlist.c to almost not use this function, since it wants different behavior during dlist compile. Just pull the non-TF, non-GS test out for compile, because: 1) TF doesn't matter in that case because there's no drawing. 2) I don't think we're going to see GSes and display lists in the same context, if we don't do GL_ARB_compatibility. Reviewed-by: Brian Paul <[email protected]>
* mesa: Add missing error check for first < 0 in glDrawArraysInstanced().Eric Anholt2012-02-291-0/+6
| | | | | | Fixes piglit GL_ARB_draw_instanced/negative-arrays-first-negative. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix display list handling for GL_ARB_draw_instanced.Eric Anholt2012-02-291-6/+0
| | | | | | | | | When you called them in a display list compile before, you would just end up calling through NULL. Fixes piglit GL_ARB_draw_instanced/dlist. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: check_index_bounds off-by-one fixRoland Scheidegger2012-02-061-1/+1
| | | | | | | | in check_index_bounds the comparison needs to be "greater equal" since contrary to the name _MaxElement is the count of the array (this matches similar code in vbo_exec_DrawRangeElementsBaseVertex). Reviewed-by: Kenneth Graunke <[email protected]>
* vbo: introduce vbo_get_minmax_indices functionYuanhan Liu2012-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Introduce vbo_get_minmax_indices() function to handle the min/max index computation for nr_prims(>= 1). The old code just compute the first prim's min/max index; this would results an error rendering if user called functions like glMultiDrawElements(). This patch servers as fixing this issue. As when nr_prims = 1, we can pass 1 to paramter nr_prims, thus I made vbo_get_minmax_index() static. v2: per Roland's suggestion, put the indices address compuation into vbo_get_minmax_index() instead. Also do comination if possible to reduce map/unmap count v3: per Brian's suggestion, use a pointer for start_prim to avoid structure copy per loop. Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: implement DrawTransformFeedback from ARB_transform_feedback2Marek Olšák2011-12-151-0/+34
| | | | | | | | | | | | | | 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: Use VERT_ATTRIB_* indexed array in gl_array_object.Mathias Fröhlich2011-11-291-3/+3
| | | | | | | | | | | | 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-7/+7
| | | | | | | | | | | | | | | 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 glBegin()/glDrawArrays()/etc mode with _mesa_valid_prim_mode()Brian Paul2011-09-211-5/+26
| | | | | | | | | We now raise an GL_INVALID_ENUM in glBegin() if mode is illegal, as was done in Yuanhan Liu's original patch. Take geometry shaders support into account too. Reviewed-by: Yuanhan Liu <[email protected]>
* mesa: Eliminate dd_function_table::MapBufferIan Romanick2011-08-231-1/+2
| | | | | | | | | | 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-2/+1
| | | | | | | | | | 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-1/+1
| | | | | | | | | | 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: add implementation of glDrawElementsInstancedBaseVertexPierre-Eric Pelloux-Prayer2011-06-021-2/+3
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: fix vertex array enable checking in check_valid_to_render()Brian Paul2011-05-191-6/+28
| | | | | | | | | | In particular, this fixes the case where a vertex shader only uses generic vertex attributes (non-0th). Before, we were no-op'ing the glDrawArrays/Elements(). This fixes the new piglit pos-array test. NOTE: This is a candidate for the 7.10 branch.
* mesa: s/primcount/numInstances/Brian Paul2011-01-171-8/+8
| | | | | primcount is also a parameter to glMultiDrawElements(). Use numInstances to avoid confusion between these things.
* mesa: Include mfeatures.h in api_validate.c for FEATURE_* symbols.Vinson Lee2010-11-061-0/+1
|
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-8/+8
|
* mesa: GL_TRIANGLE_STRIP_ADJACENCY_ARB is the last valid primitiveZack Rusin2010-07-101-5/+5
|
* mesa: Handle FEATURE_es2_glsl differences at runtime tooKristian Høgsberg2010-05-241-12/+22
| | | | | | | Now that we can support different APIs at runtime, we need to check the context for the API we're currently providing as well. https://bugs.freedesktop.org/show_bug.cgi?id=28194
* mesa: new validation functions for GL_ARB_draw_instancedBrian Paul2010-04-041-1/+106
|
* mesa: minor reformatting, new commentsBrian Paul2010-03-051-2/+9
|
* Fix comparison of unsigned value against < 0.Michel Dänzer2010-03-051-1/+1
|
* Revert "mesa: Fix unsigned comparison."Vinson Lee2010-03-041-1/+1
| | | | | | This reverts commit f9504e75f02586a8561733e0e2711c65efa2979d. This patch is incorrect.
* mesa: Fix unsigned comparison.Vinson Lee2010-03-041-1/+1
|
* mesa: Remove unnecessary headers.Vinson Lee2010-01-311-1/+0
|
* mesa: do state validation in _mesa_valid_to_render()Brian Paul2010-01-291-9/+0
| | | | | | | | | ...rather than checking/validating before all the calls to _mesa_valid_to_render() and valid_to_render(). The next patch will actually fix some bugs... (cherry picked from commit 23eda89ec89e2bd5bc26077bd56e8d6b5d4040d4)
* mesa: make max_buffer_index() a non-static functionBrian Paul2009-09-211-0/+45
|
* mesa: Add support for ARB_draw_elements_base_vertex.Eric Anholt2009-09-081-67/+41
|
* mesa: call _mesa_valid_to_render()Brian Paul2009-08-141-4/+2
|
* mesa: minor error string changesBrian Paul2009-08-141-5/+5
|
* mesa: use _mesa_is_bufferobj()Brian Paul2009-08-121-3/+4
|
* Merge branch 'mesa_7_5_branch'Brian Paul2009-06-161-1/+1
|\ | | | | | | | | | | Conflicts: src/mesa/main/api_validate.c
| * mesa: Use integer type with appropriate sign.José Fonseca2009-06-151-2/+2
| |
* | mesa: move gl_array_attrib::_MaxElement to gl_array_object::_MaxElementBrian Paul2009-05-211-4/+4
| | | | | | | | This value is per array object.
* | mesa: issue warning for out of bounds array indexesBrian Paul2009-05-081-0/+2
| |
* | mesa: remove unnecessary buffer size checkBrian Paul2009-05-061-8/+0
| |
* | mesa: code consolidation in glDraw[Range]Elements() validationBrian Paul2009-05-061-26/+22
| |