aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/pack.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-06 19:27:25 +0100
committerMarc Haesen <marc@hc-consult.be>2012-01-06 19:27:25 +0100
commit7e9f4ea970e8f7008c212d7d3918a974eb0066da (patch)
tree92cf7fcdf6e8093e743346af2397f3caa17cffe3 /mesalib/src/mesa/main/pack.c
parent9715b7fab0757c86e1bb151f3dce0b324bcff692 (diff)
downloadvcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.tar.gz
vcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.tar.bz2
vcxsrv-7e9f4ea970e8f7008c212d7d3918a974eb0066da.zip
libX11 mesa pixman git update 6 jan 2012
Diffstat (limited to 'mesalib/src/mesa/main/pack.c')
-rw-r--r--mesalib/src/mesa/main/pack.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/pack.c b/mesalib/src/mesa/main/pack.c
index 2933ff638..8f2c8fd97 100644
--- a/mesalib/src/mesa/main/pack.c
+++ b/mesalib/src/mesa/main/pack.c
@@ -692,6 +692,12 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4],
dst[i] = (GLubyte) rgba[i][ACOMP];
}
break;
+ case GL_RG_INTEGER:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = (GLubyte) rgba[i][RCOMP];
+ dst[i*2+1] = (GLubyte) rgba[i][GCOMP];
+ }
+ break;
case GL_RGB_INTEGER_EXT:
for (i=0;i<n;i++) {
dst[i*3+0] = (GLubyte) rgba[i][RCOMP];
@@ -843,6 +849,12 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4],
dst[i] = (GLbyte) rgba[i][ACOMP];
}
break;
+ case GL_RG_INTEGER:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = (GLbyte) rgba[i][RCOMP];
+ dst[i*2+1] = (GLbyte) rgba[i][GCOMP];
+ }
+ break;
case GL_RGB_INTEGER_EXT:
for (i=0;i<n;i++) {
dst[i*3+0] = (GLbyte) rgba[i][RCOMP];
@@ -994,6 +1006,12 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4],
dst[i] = (GLushort) rgba[i][ACOMP];
}
break;
+ case GL_RG_INTEGER:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = (GLushort) rgba[i][RCOMP];
+ dst[i*2+1] = (GLushort) rgba[i][GCOMP];
+ }
+ break;
case GL_RGB_INTEGER_EXT:
for (i=0;i<n;i++) {
dst[i*3+0] = (GLushort) rgba[i][RCOMP];
@@ -1145,6 +1163,13 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4],
dst[i] = (GLshort) rgba[i][ACOMP];
}
break;
+ case GL_RG_INTEGER:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLshort) rgba[i][RCOMP];
+ dst[i*3+1] = (GLshort) rgba[i][GCOMP];
+ dst[i*3+2] = (GLshort) rgba[i][BCOMP];
+ }
+ break;
case GL_RGB_INTEGER_EXT:
for (i=0;i<n;i++) {
dst[i*3+0] = (GLshort) rgba[i][RCOMP];
@@ -1296,6 +1321,12 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4],
dst[i] = (GLuint) rgba[i][ACOMP];
}
break;
+ case GL_RG_INTEGER:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = (GLuint) rgba[i][RCOMP];
+ dst[i*2+1] = (GLuint) rgba[i][GCOMP];
+ }
+ break;
case GL_RGB_INTEGER_EXT:
for (i=0;i<n;i++) {
dst[i*3+0] = (GLuint) rgba[i][RCOMP];
@@ -1454,6 +1485,12 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4],
dst[i] = (GLint) rgba[i][ACOMP];
}
break;
+ case GL_RG_INTEGER:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = (GLint) rgba[i][RCOMP];
+ dst[i*2+1] = (GLint) rgba[i][GCOMP];
+ }
+ break;
case GL_RGB_INTEGER_EXT:
for (i=0;i<n;i++) {
dst[i*3+0] = (GLint) rgba[i][RCOMP];
@@ -2397,6 +2434,7 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
srcFormat == GL_GREEN_INTEGER_EXT ||
srcFormat == GL_BLUE_INTEGER_EXT ||
srcFormat == GL_ALPHA_INTEGER_EXT ||
+ srcFormat == GL_RG_INTEGER ||
srcFormat == GL_RGB_INTEGER_EXT ||
srcFormat == GL_RGBA_INTEGER_EXT ||
srcFormat == GL_BGR_INTEGER_EXT ||
@@ -3778,6 +3816,7 @@ _mesa_unpack_color_span_float( struct gl_context *ctx,
srcFormat == GL_GREEN_INTEGER_EXT ||
srcFormat == GL_BLUE_INTEGER_EXT ||
srcFormat == GL_ALPHA_INTEGER_EXT ||
+ srcFormat == GL_RG_INTEGER ||
srcFormat == GL_RGB_INTEGER_EXT ||
srcFormat == GL_RGBA_INTEGER_EXT ||
srcFormat == GL_BGR_INTEGER_EXT ||