aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/pack.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-06 19:47:46 +0100
committerMarc Haesen <marc@hc-consult.be>2012-01-06 19:47:46 +0100
commit2d52fd67e716caae85bce150b01bc5c284b12de7 (patch)
tree2a641392a6affe99603cbaf169c1ab5173879d27 /mesalib/src/mesa/main/pack.c
parentd515b895dc5151d102f33b577cafbf63473bbafa (diff)
parent7e9f4ea970e8f7008c212d7d3918a974eb0066da (diff)
downloadvcxsrv-2d52fd67e716caae85bce150b01bc5c284b12de7.tar.gz
vcxsrv-2d52fd67e716caae85bce150b01bc5c284b12de7.tar.bz2
vcxsrv-2d52fd67e716caae85bce150b01bc5c284b12de7.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/glsl/link_uniforms.cpp mesalib/src/mesa/drivers/dri/common/drisw_util.c
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 ||