aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/pixel.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-02 14:47:58 +0000
committermarha <marha@users.sourceforge.net>2010-04-02 14:47:58 +0000
commit7933658107276f9d5491f8736a743cf8f8bbd5f2 (patch)
treef2893a761364e7abc9d934e9c5427e5cf5190c7a /mesalib/src/mesa/main/pixel.c
parent83fa9a9811e2c18cffd83a020757f7fb51ffddaa (diff)
downloadvcxsrv-7933658107276f9d5491f8736a743cf8f8bbd5f2.tar.gz
vcxsrv-7933658107276f9d5491f8736a743cf8f8bbd5f2.tar.bz2
vcxsrv-7933658107276f9d5491f8736a743cf8f8bbd5f2.zip
Updated to following packages:
mesa-7.8
Diffstat (limited to 'mesalib/src/mesa/main/pixel.c')
-rw-r--r--mesalib/src/mesa/main/pixel.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/mesalib/src/mesa/main/pixel.c b/mesalib/src/mesa/main/pixel.c
index 3820ebd88..675e933ca 100644
--- a/mesalib/src/mesa/main/pixel.c
+++ b/mesalib/src/mesa/main/pixel.c
@@ -32,11 +32,10 @@
#include "bufferobj.h"
#include "colormac.h"
#include "context.h"
-#include "image.h"
#include "macros.h"
#include "pixel.h"
#include "mtypes.h"
-#include "glapi/dispatch.h"
+#include "main/dispatch.h"
#if FEATURE_pixel_transfer
@@ -151,13 +150,17 @@ validate_pbo_access(GLcontext *ctx, struct gl_pixelstore_attrib *pack,
GLboolean ok;
/* Note, need to use DefaultPacking and Unpack's buffer object */
- ctx->DefaultPacking.BufferObj = pack->BufferObj;
+ _mesa_reference_buffer_object(ctx,
+ &ctx->DefaultPacking.BufferObj,
+ pack->BufferObj);
ok = _mesa_validate_pbo_access(1, &ctx->DefaultPacking, mapsize, 1, 1,
format, type, ptr);
/* restore */
- ctx->DefaultPacking.BufferObj = ctx->Shared->NullBufferObj;
+ _mesa_reference_buffer_object(ctx,
+ &ctx->DefaultPacking.BufferObj,
+ ctx->Shared->NullBufferObj);
if (!ok) {
_mesa_error(ctx, GL_INVALID_OPERATION,
@@ -359,7 +362,7 @@ _mesa_GetPixelMapfv( GLenum map, GLfloat *values )
}
}
else {
- MEMCPY(values, pm->Map, mapsize * sizeof(GLfloat));
+ memcpy(values, pm->Map, mapsize * sizeof(GLfloat));
}
_mesa_unmap_pbo_dest(ctx, &ctx->Pack);
@@ -398,7 +401,7 @@ _mesa_GetPixelMapuiv( GLenum map, GLuint *values )
if (map == GL_PIXEL_MAP_S_TO_S) {
/* special case */
- MEMCPY(values, ctx->PixelMaps.StoS.Map, mapsize * sizeof(GLint));
+ memcpy(values, ctx->PixelMaps.StoS.Map, mapsize * sizeof(GLint));
}
else {
for (i = 0; i < mapsize; i++) {
@@ -424,7 +427,7 @@ _mesa_GetPixelMapusv( GLenum map, GLushort *values )
_mesa_error(ctx, GL_INVALID_ENUM, "glGetPixelMapusv(map)");
return;
}
- mapsize = pm ? pm->Size : 0;
+ mapsize = pm->Size;
if (!validate_pbo_access(ctx, &ctx->Pack, mapsize,
GL_INTENSITY, GL_UNSIGNED_SHORT, values)) {