Fix pow <small> and a very stypid bug with dummy srcs(0 equals to tmp0.x)</small...
[mesa.git] / src / mesa / main / varray.c
index 04d0a07e286e19ebbf25dcf6314a1a3980008a33..cf64fb23df79d616f79fedec646c7ea9b0bbfd7b 100644 (file)
@@ -33,7 +33,7 @@
 #include "texstate.h"
 #include "mtypes.h"
 #include "varray.h"
-
+#include "dispatch.h"
 
 #ifndef GL_BOOLEAN
 #define GL_BOOLEAN 0x9999
@@ -60,6 +60,7 @@ update_array(GLcontext *ctx, struct gl_client_array *array,
 #if FEATURE_ARB_vertex_buffer_object
    array->BufferObj->RefCount--;
    if (array->BufferObj->RefCount <= 0) {
+      ASSERT(array->BufferObj->Name);
       _mesa_remove_buffer_object( ctx, array->BufferObj );
       (*ctx->Driver.DeleteBuffer)( ctx, array->BufferObj );
    }
@@ -498,7 +499,7 @@ _mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type,
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END(ctx);
 
-   if (index >= ctx->Const.MaxVertexProgramAttribs) {
+   if (index >= ctx->Const.VertexProgram.MaxAttribs) {
       _mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribPointerARB(index)");
       return;
    }
@@ -850,7 +851,7 @@ _mesa_MultiDrawArraysEXT( GLenum mode, GLint *first,
 
    for (i = 0; i < primcount; i++) {
       if (count[i] > 0) {
-         (ctx->Exec->DrawArrays)(mode, first[i], count[i]);
+         CALL_DrawArrays(ctx->Exec, (mode, first[i], count[i]));
       }
    }
 }
@@ -868,7 +869,7 @@ _mesa_MultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type,
 
    for (i = 0; i < primcount; i++) {
       if (count[i] > 0) {
-         (ctx->Exec->DrawElements)(mode, count[i], type, indices[i]);
+         CALL_DrawElements(ctx->Exec, (mode, count[i], type, indices[i]));
       }
    }
 }
@@ -888,7 +889,7 @@ _mesa_MultiModeDrawArraysIBM( const GLenum * mode, const GLint * first,
    for ( i = 0 ; i < primcount ; i++ ) {
       if ( count[i] > 0 ) {
          GLenum m = *((GLenum *) ((GLubyte *) mode + i * modestride));
-        (ctx->Exec->DrawArrays)( m, first[i], count[i] );
+        CALL_DrawArrays(ctx->Exec, ( m, first[i], count[i] ));
       }
    }
 }
@@ -910,7 +911,7 @@ _mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count,
    for ( i = 0 ; i < primcount ; i++ ) {
       if ( count[i] > 0 ) {
          GLenum m = *((GLenum *) ((GLubyte *) mode + i * modestride));
-        (ctx->Exec->DrawElements)( m, count[i], type, indices[i] );
+        CALL_DrawElements(ctx->Exec, ( m, count[i], type, indices[i] ));
       }
    }
 }