diff options
author | Brian Paul <[email protected]> | 2009-05-28 12:31:18 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-05-28 12:31:18 -0600 |
commit | fe86e508967bd7b63902928033247e145103f60c (patch) | |
tree | c267f0199e2e850c06d6e04ce770e6840e840104 /src/mesa/main/dlist.c | |
parent | 89966cdb1b5974059c32308d74b5bb09943a6fa1 (diff) |
mesa: exec/dlist functions for glProvokingVertexEXT()
Diffstat (limited to 'src/mesa/main/dlist.c')
-rw-r--r-- | src/mesa/main/dlist.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index dd73a1906b8..016c8481e91 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -352,6 +352,9 @@ typedef enum OPCODE_EVAL_P1, OPCODE_EVAL_P2, + /* GL_EXT_provoking_vertex */ + OPCODE_PROVOKING_VERTEX, + /* The following three are meta instructions */ OPCODE_ERROR, /* raise compiled-in error */ OPCODE_CONTINUE, @@ -5705,6 +5708,25 @@ save_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, #endif +/** GL_EXT_provoking_vertex */ +static void GLAPIENTRY +save_ProvokingVertexEXT(GLenum mode) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); + n = ALLOC_INSTRUCTION(ctx, OPCODE_PROVOKING_VERTEX, 1); + if (n) { + n[1].e = mode; + } + if (ctx->ExecuteFlag) { + /*CALL_ProvokingVertexEXT(ctx->Exec, (mode));*/ + _mesa_ProvokingVertexEXT(mode); + } +} + + + /** * Save an error-generating command into display list. * @@ -6269,6 +6291,9 @@ execute_list(GLcontext *ctx, GLuint list) case OPCODE_SHADE_MODEL: CALL_ShadeModel(ctx->Exec, (n[1].e)); break; + case OPCODE_PROVOKING_VERTEX: + CALL_ProvokingVertexEXT(ctx->Exec, (n[1].e)); + break; case OPCODE_STENCIL_FUNC: CALL_StencilFunc(ctx->Exec, (n[1].e, n[2].i, n[3].ui)); break; @@ -8238,6 +8263,9 @@ _mesa_init_dlist_table(struct _glapi_table *table) SET_ProgramEnvParameters4fvEXT(table, save_ProgramEnvParameters4fvEXT); SET_ProgramLocalParameters4fvEXT(table, save_ProgramLocalParameters4fvEXT); #endif + + /* 364. GL_EXT_provoking_vertex */ + SET_ProvokingVertexEXT(table, save_ProvokingVertexEXT); } @@ -8474,6 +8502,11 @@ print_list(GLcontext *ctx, GLuint list) _mesa_printf("EVAL_P2 %d %d\n", n[1].i, n[2].i); break; + case OPCODE_PROVOKING_VERTEX: + _mesa_printf("ProvokingVertex %s\n", + _mesa_lookup_enum_by_nr(n[1].ui)); + break; + /* * meta opcodes/commands */ |