diff options
Diffstat (limited to 'src/mesa/main/dlist.c')
-rw-r--r-- | src/mesa/main/dlist.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 6c0c556ad8d..b28e36ac096 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -421,6 +421,9 @@ typedef enum OPCODE_ACTIVE_PROGRAM_EXT, OPCODE_USE_SHADER_PROGRAM_EXT, + /* GL_ARB_instanced_arrays */ + OPCODE_VERTEX_ATTRIB_DIVISOR, + /* The following three are meta instructions */ OPCODE_ERROR, /* raise compiled-in error */ OPCODE_CONTINUE, @@ -6927,6 +6930,22 @@ exec_GetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params) } +/* GL_ARB_instanced_arrays */ +static void +save_VertexAttribDivisor(GLuint index, GLuint divisor) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); + n = alloc_instruction(ctx, OPCODE_VERTEX_ATTRIB_DIVISOR, 2); + if (n) { + n[1].ui = index; + n[2].ui = divisor; + } + if (ctx->ExecuteFlag) { + CALL_VertexAttribDivisorARB(ctx->Exec, (index, divisor)); + } +} @@ -8080,6 +8099,11 @@ execute_list(struct gl_context *ctx, GLuint list) } break; + case OPCODE_VERTEX_ATTRIB_DIVISOR: + /* GL_ARB_instanced_arrays */ + CALL_VertexAttribDivisorARB(ctx->Exec, (n[1].ui, n[2].ui)); + break; + case OPCODE_CONTINUE: n = (Node *) n[1].next; break; @@ -9749,6 +9773,9 @@ _mesa_create_save_table(void) (void) save_Uniform4uiv; #endif + /* GL_ARB_instanced_arrays */ + SET_VertexAttribDivisorARB(table, save_VertexAttribDivisor); + return table; } |