summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-02-28 13:33:52 -0800
committerKenneth Graunke <[email protected]>2012-02-29 13:21:12 -0800
commit871518dbf8266fe91d09e3368fe2bc90603cd3b1 (patch)
treeffa2e36fca5d2095cdffe5b63fa4e044c93efe59 /src/mesa/main
parent3c69a18b6a9f292542672c58bb324a69b750a208 (diff)
mesa: Fix display lists for draw_elements_base_vertex with draw_instanced.
Fixes piglit GL_ARB_draw_elements_base_vertex/dlist-arb_draw_instanced Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/dlist.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 0eefd402617..3db7bebae81 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -1324,6 +1324,19 @@ save_DrawElementsInstancedARB(GLenum mode,
"glDrawElementsInstanced() during display list compile");
}
+static void GLAPIENTRY
+save_DrawElementsInstancedBaseVertexARB(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const GLvoid *indices,
+ GLsizei primcount,
+ GLint basevertex)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glDrawElementsInstancedBaseVertex() during display list compile");
+}
+
static void invalidate_saved_current_state( struct gl_context *ctx )
{
GLint i;
@@ -9696,8 +9709,6 @@ exec_MultiModeDrawElementsIBM(const GLenum * mode,
modestride));
}
-
-
/**
* Setup the given dispatch table to point to Mesa's display list
* building functions.
@@ -10779,6 +10790,9 @@ _mesa_save_vtxfmt_init(GLvertexformat * vfmt)
vfmt->DrawArraysInstanced = save_DrawArraysInstancedARB;
vfmt->DrawElementsInstanced = save_DrawElementsInstancedARB;
+ /* GL_ARB_draw_elements_base_vertex */
+ vfmt->DrawElementsInstancedBaseVertex = save_DrawElementsInstancedBaseVertexARB;
+
/* The driver is required to implement these as
* 1) They can probably do a better job.
* 2) A lot of new mechanisms would have to be added to this module