aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-09-14 15:09:39 +0200
committermarha <marha@users.sourceforge.net>2011-09-14 15:09:39 +0200
commita0fc33d46dfe59745f22decb93fe147292335602 (patch)
tree1a4f7f0752a1c8935e12130c3142031272495ce6 /mesalib/src/mesa/main
parentdafebc5bb70303f0b5baf0b087cf4d9a64b5c7f0 (diff)
parente066f54c99aecce620158fe7f31589242df55677 (diff)
downloadvcxsrv-a0fc33d46dfe59745f22decb93fe147292335602.tar.gz
vcxsrv-a0fc33d46dfe59745f22decb93fe147292335602.tar.bz2
vcxsrv-a0fc33d46dfe59745f22decb93fe147292335602.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main')
-rw-r--r--mesalib/src/mesa/main/pack.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/pack.c b/mesalib/src/mesa/main/pack.c
index fd3f89d82..8388708a4 100644
--- a/mesalib/src/mesa/main/pack.c
+++ b/mesalib/src/mesa/main/pack.c
@@ -506,6 +506,13 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4],
luminance = NULL;
}
+ /* EXT_texture_integer specifies no transfer ops on integer
+ * types in the resolved issues section. Just set them to 0
+ * for integer surfaces.
+ */
+ if (intDstFormat)
+ transferOps = 0;
+
if (transferOps) {
_mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba);
}
@@ -3452,6 +3459,7 @@ _mesa_unpack_color_span_chan( struct gl_context *ctx,
const struct gl_pixelstore_attrib *srcPacking,
GLbitfield transferOps )
{
+ GLboolean intFormat = _mesa_is_integer_format(srcFormat);
ASSERT(dstFormat == GL_ALPHA ||
dstFormat == GL_LUMINANCE ||
dstFormat == GL_LUMINANCE_ALPHA ||
@@ -3500,6 +3508,13 @@ _mesa_unpack_color_span_chan( struct gl_context *ctx,
srcType == GL_UNSIGNED_INT_5_9_9_9_REV ||
srcType == GL_UNSIGNED_INT_10F_11F_11F_REV);
+ /* EXT_texture_integer specifies no transfer ops on integer
+ * types in the resolved issues section. Just set them to 0
+ * for integer surfaces.
+ */
+ if (intFormat)
+ transferOps = 0;
+
/* Try simple cases first */
if (transferOps == 0) {
if (srcType == CHAN_TYPE) {
@@ -3815,6 +3830,7 @@ _mesa_unpack_color_span_float( struct gl_context *ctx,
GLint dstComponents;
GLint rDst, gDst, bDst, aDst, lDst, iDst;
GLfloat (*rgba)[4] = (GLfloat (*)[4]) malloc(4 * n * sizeof(GLfloat));
+ GLboolean intFormat = _mesa_is_integer_format(srcFormat);
if (!rgba) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "pixel unpacking");
@@ -3825,6 +3841,13 @@ _mesa_unpack_color_span_float( struct gl_context *ctx,
/* source & dest image formats should have been error checked by now */
assert(dstComponents > 0);
+ /* EXT_texture_integer specifies no transfer ops on integer
+ * types in the resolved issues section. Just set them to 0
+ * for integer surfaces.
+ */
+ if (intFormat)
+ transferOps = 0;
+
/*
* Extract image data and convert to RGBA floats
*/