aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/vbo/vbo_split_copy.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-12 09:53:17 +0000
committermarha <marha@users.sourceforge.net>2010-04-12 09:53:17 +0000
commit29b86f9852b2b7ecc31cdfee56679537e40bc6e2 (patch)
tree1e6ec8ccf2dbf773260a1953b8e13c49f9b7c5f5 /mesalib/src/mesa/vbo/vbo_split_copy.c
parent529236591df7366479a6fac30b387667678fd1ba (diff)
downloadvcxsrv-29b86f9852b2b7ecc31cdfee56679537e40bc6e2.tar.gz
vcxsrv-29b86f9852b2b7ecc31cdfee56679537e40bc6e2.tar.bz2
vcxsrv-29b86f9852b2b7ecc31cdfee56679537e40bc6e2.zip
svn merge -r524:HEAD "^/branches/released" .
Diffstat (limited to 'mesalib/src/mesa/vbo/vbo_split_copy.c')
-rw-r--r--mesalib/src/mesa/vbo/vbo_split_copy.c55
1 files changed, 26 insertions, 29 deletions
diff --git a/mesalib/src/mesa/vbo/vbo_split_copy.c b/mesalib/src/mesa/vbo/vbo_split_copy.c
index c45190b9d..2ec7d9b0f 100644
--- a/mesalib/src/mesa/vbo/vbo_split_copy.c
+++ b/mesalib/src/mesa/vbo/vbo_split_copy.c
@@ -34,7 +34,6 @@
#include "main/imports.h"
#include "main/image.h"
#include "main/macros.h"
-#include "main/enums.h"
#include "main/mtypes.h"
#include "vbo_split.h"
@@ -148,21 +147,21 @@ dump_draw_info(GLcontext *ctx,
{
GLuint i, j;
- _mesa_printf("VBO Draw:\n");
+ printf("VBO Draw:\n");
for (i = 0; i < nr_prims; i++) {
- _mesa_printf("Prim %u of %u\n", i, nr_prims);
- _mesa_printf(" Prim mode 0x%x\n", prims[i].mode);
- _mesa_printf(" IB: %p\n", (void*) ib);
+ printf("Prim %u of %u\n", i, nr_prims);
+ printf(" Prim mode 0x%x\n", prims[i].mode);
+ printf(" IB: %p\n", (void*) ib);
for (j = 0; j < VERT_ATTRIB_MAX; j++) {
- _mesa_printf(" array %d at %p:\n", j, (void*) arrays[j]);
- _mesa_printf(" enabled %d, ptr %p, size %d, type 0x%x, stride %d\n",
- arrays[j]->Enabled, arrays[j]->Ptr,
- arrays[j]->Size, arrays[j]->Type, arrays[j]->StrideB);
+ printf(" array %d at %p:\n", j, (void*) arrays[j]);
+ printf(" enabled %d, ptr %p, size %d, type 0x%x, stride %d\n",
+ arrays[j]->Enabled, arrays[j]->Ptr,
+ arrays[j]->Size, arrays[j]->Type, arrays[j]->StrideB);
if (0) {
GLint k = prims[i].start + prims[i].count - 1;
GLfloat *last = (GLfloat *) (arrays[j]->Ptr + arrays[j]->Stride * k);
- _mesa_printf(" last: %f %f %f\n",
- last[0], last[1], last[2]);
+ printf(" last: %f %f %f\n",
+ last[0], last[1], last[2]);
}
}
}
@@ -197,7 +196,7 @@ flush( struct copy_context *copy )
&copy->dstib,
GL_TRUE,
0,
- copy->dstbuf_nr );
+ copy->dstbuf_nr - 1 );
/* Reset all pointers:
*/
@@ -221,8 +220,6 @@ begin( struct copy_context *copy, GLenum mode, GLboolean begin_flag )
{
struct _mesa_prim *prim = &copy->dstprim[copy->dstprim_nr];
-/* _mesa_printf("begin %s (%d)\n", _mesa_lookup_prim_by_nr(mode), begin_flag); */
-
prim->mode = mode;
prim->begin = begin_flag;
}
@@ -238,7 +235,7 @@ elt(struct copy_context *copy, GLuint elt_idx)
GLuint elt = copy->srcelt[elt_idx];
GLuint slot = elt & (ELT_TABLE_SIZE-1);
-/* _mesa_printf("elt %d\n", elt); */
+/* printf("elt %d\n", elt); */
/* Look up the incoming element in the vertex cache. Re-emit if
* necessary.
@@ -247,7 +244,7 @@ elt(struct copy_context *copy, GLuint elt_idx)
GLubyte *csr = copy->dstptr;
GLuint i;
-/* _mesa_printf(" --> emit to dstelt %d\n", copy->dstbuf_nr); */
+/* printf(" --> emit to dstelt %d\n", copy->dstbuf_nr); */
for (i = 0; i < copy->nr_varying; i++) {
const struct gl_client_array *srcarray = copy->varying[i].array;
@@ -271,10 +268,10 @@ elt(struct copy_context *copy, GLuint elt_idx)
{
const GLuint *f = (const GLuint *)srcptr;
GLuint j;
- _mesa_printf(" varying %d: ", i);
+ printf(" varying %d: ", i);
for(j = 0; j < copy->varying[i].size / 4; j++)
- _mesa_printf("%x ", f[j]);
- _mesa_printf("\n");
+ printf("%x ", f[j]);
+ printf("\n");
}
}
@@ -287,9 +284,9 @@ elt(struct copy_context *copy, GLuint elt_idx)
copy->dstbuf_nr * copy->vertex_size));
}
/* else */
-/* _mesa_printf(" --> reuse vertex\n"); */
+/* printf(" --> reuse vertex\n"); */
-/* _mesa_printf(" --> emit %d\n", copy->vert_cache[slot].out); */
+/* printf(" --> emit %d\n", copy->vert_cache[slot].out); */
copy->dstelt[copy->dstelt_nr++] = copy->vert_cache[slot].out;
return check_flush(copy);
}
@@ -303,7 +300,7 @@ end( struct copy_context *copy, GLboolean end_flag )
{
struct _mesa_prim *prim = &copy->dstprim[copy->dstprim_nr];
-/* _mesa_printf("end (%d)\n", end_flag); */
+/* printf("end (%d)\n", end_flag); */
prim->end = end_flag;
prim->count = copy->dstelt_nr - prim->start;
@@ -469,7 +466,7 @@ replay_init( struct copy_context *copy )
switch (copy->ib->type) {
case GL_UNSIGNED_BYTE:
- copy->translated_elt_buf = _mesa_malloc(sizeof(GLuint) * copy->ib->count);
+ copy->translated_elt_buf = malloc(sizeof(GLuint) * copy->ib->count);
copy->srcelt = copy->translated_elt_buf;
for (i = 0; i < copy->ib->count; i++)
@@ -477,7 +474,7 @@ replay_init( struct copy_context *copy )
break;
case GL_UNSIGNED_SHORT:
- copy->translated_elt_buf = _mesa_malloc(sizeof(GLuint) * copy->ib->count);
+ copy->translated_elt_buf = malloc(sizeof(GLuint) * copy->ib->count);
copy->srcelt = copy->translated_elt_buf;
for (i = 0; i < copy->ib->count; i++)
@@ -503,7 +500,7 @@ replay_init( struct copy_context *copy )
*
* XXX: This should be a VBO!
*/
- copy->dstbuf = _mesa_malloc(copy->dstbuf_size * copy->vertex_size);
+ copy->dstbuf = malloc(copy->dstbuf_size * copy->vertex_size);
copy->dstptr = copy->dstbuf;
/* Setup new vertex arrays to point into the output buffer:
@@ -532,7 +529,7 @@ replay_init( struct copy_context *copy )
copy->ib->count * 2 + 3);
copy->dstelt_size = MIN2(copy->dstelt_size,
copy->limits->max_indices);
- copy->dstelt = _mesa_malloc(sizeof(GLuint) * copy->dstelt_size);
+ copy->dstelt = malloc(sizeof(GLuint) * copy->dstelt_size);
copy->dstelt_nr = 0;
/* Setup the new index buffer to point to the allocated element
@@ -556,9 +553,9 @@ replay_finish( struct copy_context *copy )
/* Free our vertex and index buffers:
*/
- _mesa_free(copy->translated_elt_buf);
- _mesa_free(copy->dstbuf);
- _mesa_free(copy->dstelt);
+ free(copy->translated_elt_buf);
+ free(copy->dstbuf);
+ free(copy->dstelt);
/* Unmap VBO's
*/