aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/varray.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/main/varray.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/main/varray.c')
-rw-r--r--mesalib/src/mesa/main/varray.c43
1 files changed, 33 insertions, 10 deletions
diff --git a/mesalib/src/mesa/main/varray.c b/mesalib/src/mesa/main/varray.c
index c2193074c..b4128f84d 100644
--- a/mesalib/src/mesa/main/varray.c
+++ b/mesalib/src/mesa/main/varray.c
@@ -34,7 +34,7 @@
#include "mtypes.h"
#include "varray.h"
#include "arrayobj.h"
-#include "glapi/dispatch.h"
+#include "main/dispatch.h"
/**
@@ -121,6 +121,9 @@ _mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
case GL_DOUBLE:
elementSize = size * sizeof(GLdouble);
break;
+ case GL_HALF_FLOAT:
+ elementSize = size * sizeof(GLhalfARB);
+ break;
#if FEATURE_fixedpt
case GL_FIXED:
elementSize = size * sizeof(GLfixed);
@@ -174,6 +177,9 @@ _mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr )
case GL_DOUBLE:
elementSize = 3 * sizeof(GLdouble);
break;
+ case GL_HALF_FLOAT:
+ elementSize = 3 * sizeof(GLhalfARB);
+ break;
#if FEATURE_fixedpt
case GL_FIXED:
elementSize = 3 * sizeof(GLfixed);
@@ -250,6 +256,9 @@ _mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
case GL_DOUBLE:
elementSize = size * sizeof(GLdouble);
break;
+ case GL_HALF_FLOAT:
+ elementSize = size * sizeof(GLhalfARB);
+ break;
#if FEATURE_fixedpt
case GL_FIXED:
elementSize = size * sizeof(GLfixed);
@@ -285,6 +294,9 @@ _mesa_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr)
case GL_DOUBLE:
elementSize = sizeof(GLdouble);
break;
+ case GL_HALF_FLOAT:
+ elementSize = sizeof(GLhalfARB);
+ break;
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glFogCoordPointer(type)" );
return;
@@ -394,6 +406,9 @@ _mesa_SecondaryColorPointerEXT(GLint size, GLenum type,
case GL_DOUBLE:
elementSize = size * sizeof(GLdouble);
break;
+ case GL_HALF_FLOAT:
+ elementSize = size * sizeof(GLhalfARB);
+ break;
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glSecondaryColorPointer(type=%s)",
_mesa_lookup_enum_by_nr(type));
@@ -441,6 +456,9 @@ _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
case GL_DOUBLE:
elementSize = size * sizeof(GLdouble);
break;
+ case GL_HALF_FLOAT:
+ elementSize = size * sizeof(GLhalfARB);
+ break;
#if FEATURE_fixedpt
case GL_FIXED:
elementSize = size * sizeof(GLfixed);
@@ -457,6 +475,8 @@ _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
return;
}
+ ASSERT(unit < Elements(ctx->Array.ArrayObj->TexCoord));
+
update_array(ctx, &ctx->Array.ArrayObj->TexCoord[unit],
_NEW_ARRAY_TEXCOORD(unit),
elementSize, size, type, GL_RGBA, stride, GL_FALSE, ptr);
@@ -670,6 +690,9 @@ _mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type,
case GL_DOUBLE:
elementSize = size * sizeof(GLdouble);
break;
+ case GL_HALF_FLOAT:
+ elementSize = size * sizeof(GLhalfARB);
+ break;
#if FEATURE_fixedpt
case GL_FIXED:
elementSize = size * sizeof(GLfixed);
@@ -1060,14 +1083,14 @@ static void
print_array(const char *name, GLint index, const struct gl_client_array *array)
{
if (index >= 0)
- _mesa_printf(" %s[%d]: ", name, index);
+ printf(" %s[%d]: ", name, index);
else
- _mesa_printf(" %s: ", name);
- _mesa_printf("Ptr=%p, Type=0x%x, Size=%d, ElemSize=%u, Stride=%d, Buffer=%u(Size %u), MaxElem=%u\n",
- array->Ptr, array->Type, array->Size,
- array->_ElementSize, array->StrideB,
- array->BufferObj->Name, array->BufferObj->Size,
- array->_MaxElement);
+ printf(" %s: ", name);
+ printf("Ptr=%p, Type=0x%x, Size=%d, ElemSize=%u, Stride=%d, Buffer=%u(Size %u), MaxElem=%u\n",
+ array->Ptr, array->Type, array->Size,
+ array->_ElementSize, array->StrideB,
+ array->BufferObj->Name, array->BufferObj->Size,
+ array->_MaxElement);
}
@@ -1082,7 +1105,7 @@ _mesa_print_arrays(GLcontext *ctx)
_mesa_update_array_object_max_element(ctx, arrayObj);
- _mesa_printf("Array Object %u\n", arrayObj->Name);
+ printf("Array Object %u\n", arrayObj->Name);
if (arrayObj->Vertex.Enabled)
print_array("Vertex", -1, &arrayObj->Vertex);
if (arrayObj->Normal.Enabled)
@@ -1095,7 +1118,7 @@ _mesa_print_arrays(GLcontext *ctx)
for (i = 0; i < Elements(arrayObj->VertexAttrib); i++)
if (arrayObj->VertexAttrib[i].Enabled)
print_array("Attrib", i, &arrayObj->VertexAttrib[i]);
- _mesa_printf(" _MaxElement = %u\n", arrayObj->_MaxElement);
+ printf(" _MaxElement = %u\n", arrayObj->_MaxElement);
}