summaryrefslogtreecommitdiffstats
path: root/src/glx/x11/indirect_vertex_array.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/x11/indirect_vertex_array.c')
-rw-r--r--src/glx/x11/indirect_vertex_array.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/glx/x11/indirect_vertex_array.c b/src/glx/x11/indirect_vertex_array.c
index 09d7244ba92..90ec277c41b 100644
--- a/src/glx/x11/indirect_vertex_array.c
+++ b/src/glx/x11/indirect_vertex_array.c
@@ -32,7 +32,7 @@
#include <GL/glxproto.h>
#include "glxextensions.h"
#include "indirect_vertex_array.h"
-#include "indirect_vertex_array_priv.h"
+#include "indirect_va_private.h"
#define __GLX_PAD(n) (((n)+3) & ~3)
@@ -485,14 +485,14 @@ emit_DrawArrays_none( GLenum mode, GLint first, GLsizei count )
for ( i = 0 ; i < count ; i++ ) {
if ( (pc + single_vertex_size) >= gc->bufEnd ) {
- pc = __glXFlushRenderBuffer(gc, pc);
+ pc = __glXFlushRenderBuffer(gc, gc->pc);
}
pc = emit_element_none( pc, arrays, first + i );
}
if ( (pc + 4) >= gc->bufEnd ) {
- pc = __glXFlushRenderBuffer(gc, pc);
+ pc = __glXFlushRenderBuffer(gc, gc->pc);
}
(void) memcpy( pc, end_cmd, 4 );
@@ -527,7 +527,7 @@ static GLubyte *
emit_DrawArrays_header_old( __GLXcontext * gc,
struct array_state_vector * arrays,
size_t * elements_per_request,
- unsigned int * total_requests,
+ size_t * total_requests,
GLenum mode, GLsizei count )
{
size_t command_size;
@@ -640,7 +640,7 @@ emit_DrawArrays_old( GLenum mode, GLint first, GLsizei count )
GLubyte * pc;
size_t elements_per_request;
- unsigned total_requests = 0;
+ size_t total_requests = 0;
unsigned i;
size_t total_sent = 0;
@@ -726,7 +726,7 @@ emit_DrawElements_none( GLenum mode, GLsizei count, GLenum type,
unsigned index = 0;
if ( (pc + single_vertex_size) >= gc->bufEnd ) {
- pc = __glXFlushRenderBuffer(gc, pc);
+ pc = __glXFlushRenderBuffer(gc, gc->pc);
}
switch( type ) {
@@ -744,7 +744,7 @@ emit_DrawElements_none( GLenum mode, GLsizei count, GLenum type,
}
if ( (pc + 4) >= gc->bufEnd ) {
- pc = __glXFlushRenderBuffer(gc, pc);
+ pc = __glXFlushRenderBuffer(gc, gc->pc);
}
(void) memcpy( pc, end_cmd, 4 );
@@ -770,10 +770,9 @@ emit_DrawElements_old( GLenum mode, GLsizei count, GLenum type,
GLubyte * pc;
size_t elements_per_request;
- unsigned total_requests = 0;
+ size_t total_requests = 0;
unsigned i;
unsigned req;
- unsigned req_element=0;
pc = emit_DrawArrays_header_old( gc, arrays, & elements_per_request,
@@ -791,7 +790,7 @@ emit_DrawElements_old( GLenum mode, GLsizei count, GLenum type,
switch( type ) {
case GL_UNSIGNED_INT: {
- const GLuint * ui_ptr = (const GLuint *) indices + req_element;
+ const GLuint * ui_ptr = (const GLuint *) indices;
for ( i = 0 ; i < elements_per_request ; i++ ) {
const GLint index = (GLint) *(ui_ptr++);
@@ -800,7 +799,7 @@ emit_DrawElements_old( GLenum mode, GLsizei count, GLenum type,
break;
}
case GL_UNSIGNED_SHORT: {
- const GLushort * us_ptr = (const GLushort *) indices + req_element;
+ const GLushort * us_ptr = (const GLushort *) indices;
for ( i = 0 ; i < elements_per_request ; i++ ) {
const GLint index = (GLint) *(us_ptr++);
@@ -809,7 +808,7 @@ emit_DrawElements_old( GLenum mode, GLsizei count, GLenum type,
break;
}
case GL_UNSIGNED_BYTE: {
- const GLubyte * ub_ptr = (const GLubyte *) indices + req_element;
+ const GLubyte * ub_ptr = (const GLubyte *) indices;
for ( i = 0 ; i < elements_per_request ; i++ ) {
const GLint index = (GLint) *(ub_ptr++);
@@ -827,7 +826,6 @@ emit_DrawElements_old( GLenum mode, GLsizei count, GLenum type,
}
count -= elements_per_request;
- req_element += elements_per_request;
}