summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2019-04-03 13:28:57 +0200
committerMathias Fröhlich <[email protected]>2019-05-04 07:40:35 +0200
commit0ed7603d97bb7bab719dc28eac291fbfb8160d2e (patch)
tree10e67996f534b0141dbbd6dcb836e6641440986b /src/mesa
parent3b6f32907f292efd8d3eb25dc1573ff30e437a0c (diff)
mesa: Remove the _glapi_table argument from _mesa_array_element.
The value is now unused. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/api_arrayelt.c8
-rw-r--r--src/mesa/main/api_arrayelt.h3
-rw-r--r--src/mesa/vbo/vbo_save_api.c17
3 files changed, 11 insertions, 17 deletions
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c
index cd0d64f26f3..6e367839834 100644
--- a/src/mesa/main/api_arrayelt.c
+++ b/src/mesa/main/api_arrayelt.c
@@ -1422,8 +1422,7 @@ attrib_src(const struct gl_vertex_array_object *vao,
void
-_mesa_array_element(struct gl_context *ctx,
- struct _glapi_table *disp, GLint elt)
+_mesa_array_element(struct gl_context *ctx, GLint elt)
{
const struct gl_vertex_array_object *vao = ctx->Array.VAO;
GLbitfield mask;
@@ -1474,21 +1473,20 @@ void GLAPIENTRY
_ae_ArrayElement(GLint elt)
{
GET_CURRENT_CONTEXT(ctx);
- const struct _glapi_table * const disp = GET_DISPATCH();
struct gl_vertex_array_object *vao;
/* If PrimitiveRestart is enabled and the index is the RestartIndex
* then we call PrimitiveRestartNV and return.
*/
if (ctx->Array.PrimitiveRestart && (elt == ctx->Array.RestartIndex)) {
- CALL_PrimitiveRestartNV((struct _glapi_table *)disp, ());
+ CALL_PrimitiveRestartNV(GET_DISPATCH(), ());
return;
}
vao = ctx->Array.VAO;
_mesa_vao_map_arrays(ctx, vao, GL_MAP_READ_BIT);
- _mesa_array_element(ctx, (struct _glapi_table *)disp, elt);
+ _mesa_array_element(ctx, elt);
_mesa_vao_unmap_arrays(ctx, vao);
}
diff --git a/src/mesa/main/api_arrayelt.h b/src/mesa/main/api_arrayelt.h
index eea229f0487..6c2ece81134 100644
--- a/src/mesa/main/api_arrayelt.h
+++ b/src/mesa/main/api_arrayelt.h
@@ -32,8 +32,7 @@
struct _glapi_table;
-extern void _mesa_array_element(struct gl_context *ctx,
- struct _glapi_table *disp, GLint elt);
+extern void _mesa_array_element(struct gl_context *ctx, GLint elt);
extern void GLAPIENTRY _ae_ArrayElement( GLint elt );
extern void
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index de0be4e3324..f9f0e641a5d 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -1331,7 +1331,7 @@ _save_OBE_DrawArrays(GLenum mode, GLint start, GLsizei count)
vbo_save_NotifyBegin(ctx, mode, true);
for (i = 0; i < count; i++)
- _mesa_array_element(ctx, GET_DISPATCH(), start + i);
+ _mesa_array_element(ctx, start + i);
CALL_End(GET_DISPATCH(), ());
_mesa_vao_unmap_arrays(ctx, vao);
@@ -1373,7 +1373,7 @@ _save_OBE_MultiDrawArrays(GLenum mode, const GLint *first,
static void
-array_element(struct gl_context *ctx, struct _glapi_table *disp,
+array_element(struct gl_context *ctx,
GLint basevertex, GLuint elt, unsigned index_size)
{
/* Section 10.3.5 Primitive Restart:
@@ -1387,11 +1387,11 @@ array_element(struct gl_context *ctx, struct _glapi_table *disp,
*/
if (ctx->Array._PrimitiveRestart &&
elt == _mesa_primitive_restart_index(ctx, index_size)) {
- CALL_PrimitiveRestartNV(disp, ());
+ CALL_PrimitiveRestartNV(GET_DISPATCH(), ());
return;
}
- _mesa_array_element(ctx, disp, basevertex + elt);
+ _mesa_array_element(ctx, basevertex + elt);
}
@@ -1440,18 +1440,15 @@ _save_OBE_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type,
switch (type) {
case GL_UNSIGNED_BYTE:
for (i = 0; i < count; i++)
- array_element(ctx, GET_DISPATCH(), basevertex,
- ((GLubyte *) indices)[i], 1);
+ array_element(ctx, basevertex, ((GLubyte *) indices)[i], 1);
break;
case GL_UNSIGNED_SHORT:
for (i = 0; i < count; i++)
- array_element(ctx, GET_DISPATCH(), basevertex,
- ((GLushort *) indices)[i], 2);
+ array_element(ctx, basevertex, ((GLushort *) indices)[i], 2);
break;
case GL_UNSIGNED_INT:
for (i = 0; i < count; i++)
- array_element(ctx, GET_DISPATCH(), basevertex,
- ((GLuint *) indices)[i], 4);
+ array_element(ctx, basevertex, ((GLuint *) indices)[i], 4);
break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawElements(type)");