#define DOUBLE_BIT 0x200
#define FIXED_ES_BIT 0x400
#define FIXED_GL_BIT 0x800
+#define UNSIGNED_INT_2_10_10_10_REV_BIT 0x1000
+#define INT_2_10_10_10_REV_BIT 0x2000
/** Convert GL datatype enum into a <type>_BIT value seen above */
return DOUBLE_BIT;
case GL_FIXED:
return ctx->API == API_OPENGL ? FIXED_GL_BIT : FIXED_ES_BIT;
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ return UNSIGNED_INT_2_10_10_10_REV_BIT;
+ case GL_INT_2_10_10_10_REV:
+ return INT_2_10_10_10_REV_BIT;
default:
return 0;
}
if (!ctx->Extensions.ARB_ES2_compatibility) {
legalTypesMask &= ~FIXED_GL_BIT;
}
+ if (!ctx->Extensions.ARB_vertex_type_2_10_10_10_rev) {
+ legalTypesMask &= ~(UNSIGNED_INT_2_10_10_10_REV_BIT |
+ INT_2_10_10_10_REV_BIT);
+ }
typeBit = type_to_bit(ctx, type);
if (typeBit == 0x0 || (typeBit & legalTypesMask) == 0x0) {
if (ctx->Extensions.EXT_vertex_array_bgra &&
sizeMax == BGRA_OR_4 &&
size == GL_BGRA) {
- if (type != GL_UNSIGNED_BYTE) {
+ if (type != GL_UNSIGNED_BYTE &&
+ (ctx->Extensions.ARB_vertex_type_2_10_10_10_rev &&
+ (type != GL_UNSIGNED_INT_2_10_10_10_REV &&
+ type != GL_INT_2_10_10_10_REV))) {
_mesa_error(ctx, GL_INVALID_VALUE, "%s(GL_BGRA/GLubyte)", func);
return;
}
return;
}
+ if (ctx->Extensions.ARB_vertex_type_2_10_10_10_rev &&
+ (type == GL_UNSIGNED_INT_2_10_10_10_REV ||
+ type == GL_INT_2_10_10_10_REV) && size != 4) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(size=%d)", func, size);
+ }
+
ASSERT(size <= 4);
if (stride < 0) {
_mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
{
GLbitfield legalTypes = (SHORT_BIT | INT_BIT | FLOAT_BIT |
- DOUBLE_BIT | HALF_BIT | FIXED_ES_BIT);
+ DOUBLE_BIT | HALF_BIT | FIXED_ES_BIT |
+ UNSIGNED_INT_2_10_10_10_REV_BIT |
+ INT_2_10_10_10_REV_BIT);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
{
const GLbitfield legalTypes = (BYTE_BIT | SHORT_BIT | INT_BIT |
HALF_BIT | FLOAT_BIT | DOUBLE_BIT |
- FIXED_ES_BIT);
+ FIXED_ES_BIT |
+ UNSIGNED_INT_2_10_10_10_REV_BIT |
+ INT_2_10_10_10_REV_BIT);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
SHORT_BIT | UNSIGNED_SHORT_BIT |
INT_BIT | UNSIGNED_INT_BIT |
HALF_BIT | FLOAT_BIT | DOUBLE_BIT |
- FIXED_ES_BIT);
+ FIXED_ES_BIT |
+ UNSIGNED_INT_2_10_10_10_REV_BIT |
+ INT_2_10_10_10_REV_BIT);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
const GLbitfield legalTypes = (BYTE_BIT | UNSIGNED_BYTE_BIT |
SHORT_BIT | UNSIGNED_SHORT_BIT |
INT_BIT | UNSIGNED_INT_BIT |
- HALF_BIT | FLOAT_BIT | DOUBLE_BIT);
+ HALF_BIT | FLOAT_BIT | DOUBLE_BIT |
+ UNSIGNED_INT_2_10_10_10_REV_BIT |
+ INT_2_10_10_10_REV_BIT);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
{
GLbitfield legalTypes = (SHORT_BIT | INT_BIT |
HALF_BIT | FLOAT_BIT | DOUBLE_BIT |
- FIXED_ES_BIT);
+ FIXED_ES_BIT |
+ UNSIGNED_INT_2_10_10_10_REV_BIT |
+ INT_2_10_10_10_REV_BIT);
GET_CURRENT_CONTEXT(ctx);
const GLuint unit = ctx->Array.ActiveTexture;
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
SHORT_BIT | UNSIGNED_SHORT_BIT |
INT_BIT | UNSIGNED_INT_BIT |
HALF_BIT | FLOAT_BIT | DOUBLE_BIT |
- FIXED_ES_BIT | FIXED_GL_BIT);
+ FIXED_ES_BIT | FIXED_GL_BIT |
+ UNSIGNED_INT_2_10_10_10_REV_BIT |
+ INT_2_10_10_10_REV_BIT);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);