aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-10 18:53:44 +0000
committermarha <marha@users.sourceforge.net>2011-04-10 18:53:44 +0000
commit57fb3f76b66c5f7a9f7bed9c42fb9fec9d56ee05 (patch)
tree62c44b8772f885ab8252004587bcf01b1c2741ba /mesalib/src/mesa/main
parent5deaba2736a906e599eb03f2883fba036150c662 (diff)
parent2fb58f16eeec8ef3ec2a25e246477aab64e38a7d (diff)
downloadvcxsrv-57fb3f76b66c5f7a9f7bed9c42fb9fec9d56ee05.tar.gz
vcxsrv-57fb3f76b66c5f7a9f7bed9c42fb9fec9d56ee05.tar.bz2
vcxsrv-57fb3f76b66c5f7a9f7bed9c42fb9fec9d56ee05.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/main')
-rw-r--r--mesalib/src/mesa/main/arrayobj.c2
-rw-r--r--mesalib/src/mesa/main/buffers.c2
-rw-r--r--mesalib/src/mesa/main/texcompress_rgtc.c8
3 files changed, 7 insertions, 5 deletions
diff --git a/mesalib/src/mesa/main/arrayobj.c b/mesalib/src/mesa/main/arrayobj.c
index 8fff3c0e2..ce1e277bd 100644
--- a/mesalib/src/mesa/main/arrayobj.c
+++ b/mesalib/src/mesa/main/arrayobj.c
@@ -41,6 +41,7 @@
#include "glheader.h"
#include "hash.h"
+#include "image.h"
#include "imports.h"
#include "context.h"
#include "mfeatures.h"
@@ -207,6 +208,7 @@ init_array(struct gl_context *ctx,
array->Ptr = NULL;
array->Enabled = GL_FALSE;
array->Normalized = GL_FALSE;
+ array->_ElementSize = size * _mesa_sizeof_type(type);
#if FEATURE_ARB_vertex_buffer_object
/* Vertex array buffers */
_mesa_reference_buffer_object(ctx, &array->BufferObj,
diff --git a/mesalib/src/mesa/main/buffers.c b/mesalib/src/mesa/main/buffers.c
index 1ddf5b2c8..928450f0f 100644
--- a/mesalib/src/mesa/main/buffers.c
+++ b/mesalib/src/mesa/main/buffers.c
@@ -407,7 +407,6 @@ _mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers,
fb->_ColorDrawBufferIndexes[buf] = bufIndex;
newState = GL_TRUE;
}
- fb->ColorDrawBuffer[buf] = buffers[buf];
count = buf + 1;
}
else {
@@ -416,6 +415,7 @@ _mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers,
newState = GL_TRUE;
}
}
+ fb->ColorDrawBuffer[buf] = buffers[buf];
}
/* set remaining outputs to -1 (GL_NONE) */
while (buf < ctx->Const.MaxDrawBuffers) {
diff --git a/mesalib/src/mesa/main/texcompress_rgtc.c b/mesalib/src/mesa/main/texcompress_rgtc.c
index 60146d09b..d75546a92 100644
--- a/mesalib/src/mesa/main/texcompress_rgtc.c
+++ b/mesalib/src/mesa/main/texcompress_rgtc.c
@@ -121,7 +121,7 @@ _mesa_texstore_red_rgtc1(TEXSTORE_PARAMS)
texWidth, (GLubyte *) dstAddr);
blkaddr = dst;
- dstRowDiff = dstRowStride >= (srcWidth * 4) ? dstRowStride - (((srcWidth + 3) & ~3) * 4) : 0;
+ dstRowDiff = dstRowStride >= (srcWidth * 2) ? dstRowStride - (((srcWidth + 3) & ~3) * 2) : 0;
for (j = 0; j < srcHeight; j+=4) {
if (srcHeight > j + 3) numypixels = 4;
else numypixels = srcHeight - j;
@@ -176,7 +176,7 @@ _mesa_texstore_signed_red_rgtc1(TEXSTORE_PARAMS)
texWidth, (GLubyte *) dstAddr);
blkaddr = dst;
- dstRowDiff = dstRowStride >= (srcWidth * 4) ? dstRowStride - (((srcWidth + 3) & ~3) * 4) : 0;
+ dstRowDiff = dstRowStride >= (srcWidth * 2) ? dstRowStride - (((srcWidth + 3) & ~3) * 2) : 0;
for (j = 0; j < srcHeight; j+=4) {
if (srcHeight > j + 3) numypixels = 4;
else numypixels = srcHeight - j;
@@ -232,7 +232,7 @@ _mesa_texstore_rg_rgtc2(TEXSTORE_PARAMS)
texWidth, (GLubyte *) dstAddr);
blkaddr = dst;
- dstRowDiff = dstRowStride >= (srcWidth * 8) ? dstRowStride - (((srcWidth + 7) & ~7) * 8) : 0;
+ dstRowDiff = dstRowStride >= (srcWidth * 4) ? dstRowStride - (((srcWidth + 3) & ~3) * 4) : 0;
for (j = 0; j < srcHeight; j+=4) {
if (srcHeight > j + 3) numypixels = 4;
else numypixels = srcHeight - j;
@@ -294,7 +294,7 @@ _mesa_texstore_signed_rg_rgtc2(TEXSTORE_PARAMS)
texWidth, (GLubyte *) dstAddr);
blkaddr = dst;
- dstRowDiff = dstRowStride >= (srcWidth * 8) ? dstRowStride - (((srcWidth + 7) & ~7) * 8) : 0;
+ dstRowDiff = dstRowStride >= (srcWidth * 4) ? dstRowStride - (((srcWidth + 3) & ~3) * 4) : 0;
for (j = 0; j < srcHeight; j += 4) {
if (srcHeight > j + 3) numypixels = 4;
else numypixels = srcHeight - j;