summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/api_validate.c
Commit message (Collapse)AuthorAgeFilesLines
...
* mesa: allow buffers to be mapped multiple timesMarek Olšák2014-02-251-2/+3
| | | | | | | | | | | | | | | | | | | OpenGL allows a buffer to be mapped only once, but we also map buffers internally, e.g. in the software primitive restart fallback, for PBOs, vbo_get_minmax_index, etc. This has always been a problem, but it will be a bigger problem with persistent buffer mappings, which will prevent all Mesa functions from mapping buffers for internal purposes. This adds a driver interface to core Mesa which supports multiple buffer mappings and allows 2 mappings: one for the GL user and one for Mesa. Note that Gallium supports an unlimited number of buffer and texture mappings, so it's not really an issue for Gallium. v2: fix unmapping in xm_dd.c, remove the GL errors there v3: fix the intel driver (by Fredrik) Reviewed-by: Fredrik Höglund <fredrik@kde.org>
* mesa: allow buffers mapped with the persistent flag to be used by the GPUMarek Olšák2014-02-251-1/+1
| | | | | | v2: also fixed InvalidateBufferData, added citations from the 4.4 spec Reviewed-by: Fredrik Höglund <fredrik@kde.org>
* mesa: Rename ElementArrayBufferObj to IndexBufferObj.Kenneth Graunke2014-02-031-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | DirectX and most hardware documentation use the term "Index Buffer" to refer to a buffer containing indexes into arrays of vertex data, which allows random access to vertex data, rather than sequential access. OpenGL uses a different term for this concept: "Element Array Buffer". However, "Index Buffer" has become much more widespread. A quick Google search shows 29,300 hits for "Element Array Buffer" vs. 82,300 hits for "Index Buffer." Arguably, "Index Buffer" is clearer: an "element of an array" (or list) usually refers to an actual item stored in the array, not the index used to refer to it. The terminology is also already used in Mesa: some VBO module code for dealing with ElementArrayBufferObj names local variables "ib". Completely generated by: $ find . -type f -print0 | xargs -0 sed -i \ 's/ElementArrayBufferObj/IndexBufferObj/g' Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Rename ArrayObj to VAO and DefaultArrayObj to DefaultVAO.Kenneth Graunke2014-02-031-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When reading through the Mesa drawing code, it's not immediately obvious to me that "ArrayObj" (gl_array_object) is the Vertex Array Object (VAO) state. The comment above the structure explains this, but readers still have to remember this and translate accordingly. Out of context, "array object" is a fairly vague. Even in context, "array" has a lot of meanings: glDrawArrays, vertex data stored in user arrays, gl_client_arrays, gl_vertex_attrib_arrays, and so on. Using the term "VAO" immediately associates these fields with the OpenGL concept, clarifying the situation and aiding programmer sanity. Completely generated by: $ find . -type f -print0 | xargs -0 sed -i \ -e 's/ArrayObj;/VAO;/g' \ -e 's/->ArrayObj/->VAO/g' \ -e 's/Array\.ArrayObj/Array.VAO/g' \ -e 's/Array\.DefaultArrayObj/Array.DefaultVAO/g' v2: Rerun command to resolve conflicts with Ian's meta patches. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Replace ctx->Shader.Current{Vertex,Fragment,Geometry}Program with an ↵Paul Berry2014-01-211-5/+5
| | | | | | | | | | | | | | | | | | | | | array. These are replaced with ctx->Shader.CurrentProgram[MESA_SHADER_{VERTEX,FRAGMENT,GEOMETRY}]. In patches to follow, this will allow us to replace a lot of ad-hoc logic with a variable index into the array. With the exception of the changes to mtypes.h, this patch was generated entirely by the command: find src -type f '(' -iname '*.c' -o -iname '*.cpp' ')' \ -print0 | xargs -0 sed -i \ -e 's/\.CurrentVertexProgram/.CurrentProgram[MESA_SHADER_VERTEX]/g' \ -e 's/\.CurrentGeometryProgram/.CurrentProgram[MESA_SHADER_GEOMETRY]/g' \ -e 's/\.CurrentFragmentProgram/.CurrentProgram[MESA_SHADER_FRAGMENT]/g' Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Add validation helpers for new indirect drawsChris Forbes2013-11-251-0/+192
| | | | | | | | | | | | | | | | | Based on part of Patch 2 of Christoph Bumiller's ARB_draw_indirect series. V3: - Disallow primcount==0 for DrawMulti*Indirect. The spec is unclear on this, but it's silly. We might go back on this later if it turns out to be a problem. - Make it clear that the caller has dealt with stride==0 V4: - Allow primcount==0 again. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Paul Berry <stereotype441@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
* mesa: Add ARB_vertex_attrib_bindingFredrik Höglund2013-11-071-3/+3
| | | | | | | update_array() and update_array_format() are changed to update the new attrib and binding states, and the client arrays become derived state. Reviewed-by: Eric Anholt <eric@anholt.net>
* mesa: Rename gl_array_object::VertexAttrib to _VertexAttribFredrik Höglund2013-11-071-3/+3
| | | | | | | | This will become derived state as part of the ARB_vertex_attrib_binding support. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: fix transform feedback when a geometry shader is active.Bryan Cain2013-10-151-18/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a geometry shader is active, the transform feedback primitive type ("mode") needs to be validated against the geometry shader output primitive type, not the primitive type passed to the glDraw*() function. Fixes the following piglit tests: - glsl-1.50-geometry-primitive-types GL_LINES - glsl-1.50-geometry-primitive-types GL_LINES_ADJACENCY - glsl-1.50-geometry-primitive-types GL_LINE_STRIP - glsl-1.50-geometry-primitive-types GL_LINE_STRIP_ADJACENCY - glsl-1.50-geometry-primitive-types GL_TRIANGLES - glsl-1.50-geometry-primitive-types GL_TRIANGLES_ADJACENCY - glsl-1.50-geometry-primitive-types GL_TRIANGLE_FAN Exposes previously hidden failures in the following piglit tests: - glsl-1.50-geometry-primitive-id-restart GL_LINES other - glsl-1.50-geometry-primitive-id-restart GL_LINES_ADJACENCY other - glsl-1.50-geometry-primitive-id-restart GL_LINE_LOOP ffs - glsl-1.50-geometry-primitive-id-restart GL_LINE_LOOP other - glsl-1.50-geometry-primitive-id-restart GL_LINE_STRIP other - glsl-1.50-geometry-primitive-id-restart GL_LINE_STRIP_ADJACENCY other - glsl-1.50-geometry-primitive-id-restart GL_TRIANGLES other - glsl-1.50-geometry-primitive-id-restart GL_TRIANGLES_ADJACENCY other - glsl-1.50-geometry-primitive-id-restart GL_TRIANGLE_FAN ffs - glsl-1.50-geometry-primitive-id-restart GL_TRIANGLE_FAN other - glsl-1.50-geometry-primitive-id-restart GL_TRIANGLE_STRIP other - glsl-1.50-geometry-primitive-id-restart GL_TRIANGLE_STRIP_ADJACENCY other (These failures were previously hidden due to a flaw in the test: it doesn't check for GL errors. I'll fix the test shortly). Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa/main: Check for 0 size draws after validation.Fabian Bieler2013-08-271-21/+30
| | | | | | | | | | | | | | | | | | | When validating draw parameters move check for 0 draw count last (drawing with count 0 is not an error), so that other parameters (e.g.: the primitive type) are validated and the correct errors (if applicable) are generated. >From the OpenGL 3.3 spec page 33 (page 48 of the PDF): "[Regarding DrawArraysOneInstance, in terms of which other draw operations are defined:] If count is negative, an INVALID_VALUE error is generated." This patch also changes the bahavior of MultiDrawElements to perform the draw operation if some primitive's index counts are zero. Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Paul Berry <stereotype441@gmail.com>
* mesa: Validate the drawing primitive against the geometry shader input ↵Fabian Bieler2013-08-011-0/+68
| | | | | | | | primitive type. Reviewed-by: Paul Berry <stereotype441@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* main: Allow for the possibility of GL 3.2 without ARB_geometry_shader4.Paul Berry2013-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | Previously, we assumed that the only way Mesa would expose geometry shader support was via the ARB_geometry_shader4 extension. But this extension has some extra complications over GL 3.2 (interactions with compatibility-only features, and link-time initialization of the constant gl_VerticesIn). So we want to allow for the possibility of supporting GL 3.2 (with GLSL 1.50 style geometry shaders) even if ctx->Extensions.ARB_geometry_shader4 is false. This patch adds a new function, _mesa_has_geometry_shaders(), which returns true if either ARB_geometry_shader4 is supported or the GL version is at least 3.2 desktop. Since compute_version() only enables GL 3.2 functionality when GLSL 1.50 support is present, a sufficient way for a back-end to advertise geometry shader support is to set ctx->Const.GLSLVersion >= 150. v2: Remove unnecessary ctx->Const.GeometryShaders150 constant. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <brianp@vmware.com>
* mesa: refactor _mesa_valid_prim_mode()Brian Paul2013-05-021-13/+20
| | | | | | | ...in terms of new _mesa_is_valid_prim_mode(). We need a mode validater function that doesn't depend on current state for the display list code. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke2013-04-231-3/+4
| | | | | | | | | | | | | | The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | | Generated automatically be the following shell command: $ git grep 'BRIAN PAUL BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/BRIAN PAUL/THE AUTHORS/' {} The intention here is to protect all authors, not just Brian Paul. I believe that was already the sensible interpretation, but spelling it out is probably better. More practically, it also prevents people from accidentally copy & pasting the license into a new file which says Brian is not liable when he isn't even one of the authors. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove #include "mfeatures.h" from numerous source filesBrian Paul2013-04-171-1/+0
| | | | | | None of the remaining FEATURE_x symbols in mfeatures.h are used anymore. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* mesa: Drop manual checks for outside begin/end.Eric Anholt2013-01-211-7/+0
| | | | | | | | | | | We now have a separate dispatch table for begin/end that prevent these functions from being entered during that time. The ASSERT_OUTSIDE_BEGIN_END_WITH_RETVALs are left because I don't want to change any return values or introduce new error-only stubs at this point. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: Make a function is_transform_feedback_active_and_unpaused.Paul Berry2012-12-181-13/+7
| | | | | | | | | | The rather unweildy logic for determining this condition was repeated in a large number of places. This patch consolidates it to a single inline function. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa/gles3: Generate error on draw call if transform feedback would overflow.Paul Berry2012-12-181-0/+51
| | | | | | | | | | | | | | | | | In desktop GL, if a draw call would cause transform feedback buffers to overflow, the draw call should succeed, and the extra primitives should simply not be recorded in the transform feedback buffers. In GLES3, however, if a draw call would cause transform feedback buffers to overflow, the draw call is supposed to produce an INVALID_OPERATION error and no drawing should occur. This patch implements the GLES3-required behaviour. Fixes GLES3 conformance test "transform_feedback_overflow.test". Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* mesa/gles3: Generate error on DrawElements* calls if transform feedback active.Paul Berry2012-12-181-0/+45
| | | | | | | | In GLES3, only glDrawArrays() and glDrawArraysInstanced() calls are allowed when transform feedback is active. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* 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 <eric@anholt.net> Acked-by: Matt Turner <mattst88@gmail.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: remove ASSERT_NO_FEATURE macroBrian Paul2012-10-161-1/+1
| | | | | | Was only used in one place. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: remove FEATURE_EXT_transform_feedback define.Oliver McFadden2012-09-151-4/+0
| | | | | Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove FEATURE_es2_glsl and related defines.Oliver McFadden2012-09-151-6/+0
| | | | | Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <ian.d.romanick@intel.com>
* 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 <ian.d.romanick@intel.com>
* 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 <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: add support for using API_OPENGL_COREJordan Justen2012-07-301-0/+1
| | | | | | | Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: implement new DrawTransformFeedback functionsMarek Olšák2012-07-121-5/+21
| | | | Acked-by: Ian Romanick <ian.d.romanick@intel.com>
* 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 <brianp@vmware.com>
* 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 <brianp@vmware.com>
* vbo: first ASSERT_OUTSIDE_BEGIN_END then FLUSH, not the other way aroundMarek Olšák2012-06-281-6/+6
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <brianp@vmware.com>
* 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 <brianp@vmware.com>
* 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 <kenneth@whitecape.org>
* 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 <kenneth@whitecape.org>
* 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 <kenneth@whitecape.org>
* 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 <yuanhan.liu@linux.intel.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <Mathias.Froehlich@web.de> Reviewed-by: Eric Anholt <eric@anholt.net>
* 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 <yuanhan.liu@linux.intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <yuanhan.liu@linux.intel.com>
* 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 <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
* 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 <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
* 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 <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
* mesa: add implementation of glDrawElementsInstancedBaseVertexPierre-Eric Pelloux-Prayer2011-06-021-2/+3
| | | | Signed-off-by: Brian Paul <brianp@vmware.com>
* 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.