X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fapi_arrayelt.c;h=c84db5f97f6eb3fb41748194364f81e108317be4;hb=ac1181ffbef5250cb3b651e047cce5116727c34c;hp=ea015fd65bfedd114b2dd6f097b7de5e83656e41;hpb=bfcdb843830bba0190e00e35e3c5c18c4bdb5de1;p=mesa.git diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index ea015fd65bf..c84db5f97f6 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -65,7 +65,7 @@ typedef struct { typedef struct { AEarray arrays[32]; AEattrib attribs[VERT_ATTRIB_MAX + 1]; - GLuint NewState; + GLbitfield NewState; /* List of VBOs we need to map before executing ArrayElements */ struct gl_buffer_object *vbo[VERT_ATTRIB_MAX]; @@ -1258,12 +1258,37 @@ VertexAttribI4uiv(GLuint index, const GLuint *v) CALL_VertexAttribI4uivEXT(GET_DISPATCH(), (index, v)); } +/* GL_DOUBLE unconverted attributes */ + +static void GLAPIENTRY +VertexAttribL1dv(GLuint index, const GLdouble *v) +{ + CALL_VertexAttribL1dv(GET_DISPATCH(), (index, v)); +} + +static void GLAPIENTRY +VertexAttribL2dv(GLuint index, const GLdouble *v) +{ + CALL_VertexAttribL2dv(GET_DISPATCH(), (index, v)); +} + +static void GLAPIENTRY +VertexAttribL3dv(GLuint index, const GLdouble *v) +{ + CALL_VertexAttribL3dv(GET_DISPATCH(), (index, v)); +} + +static void GLAPIENTRY +VertexAttribL4dv(GLuint index, const GLdouble *v) +{ + CALL_VertexAttribL4dv(GET_DISPATCH(), (index, v)); +} /* * Array [unnormalized/normalized/integer][size][type] of VertexAttrib * functions */ -static attrib_func AttribFuncsARB[3][4][NUM_TYPES] = { +static attrib_func AttribFuncsARB[4][4][NUM_TYPES] = { { /* non-normalized */ { @@ -1405,7 +1430,55 @@ static attrib_func AttribFuncsARB[3][4][NUM_TYPES] = { NULL, /* GL_FLOAT */ NULL /* GL_DOUBLE */ } + }, + { + /* double-valued */ + { + /* size 1 */ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + (attrib_func) VertexAttribL1dv, + }, + { + /* size 2 */ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + (attrib_func) VertexAttribL2dv, + }, + { + /* size 3 */ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + (attrib_func) VertexAttribL3dv, + }, + { + /* size 4 */ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + (attrib_func) VertexAttribL4dv, + } } + }; @@ -1571,7 +1644,9 @@ _ae_update_state(struct gl_context *ctx) * change from one execution of _ae_ArrayElement() to * the next. Doing so caused UT to break. */ - if (at->array->Integer) + if (at->array->Doubles) + intOrNorm = 3; + else if (at->array->Integer) intOrNorm = 2; else if (at->array->Normalized) intOrNorm = 1; @@ -1727,7 +1802,7 @@ _ae_ArrayElement(GLint elt) void -_ae_invalidate_state(struct gl_context *ctx, GLuint new_state) +_ae_invalidate_state(struct gl_context *ctx, GLbitfield new_state) { AEcontext *actx = AE_CONTEXT(ctx);