aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/pbo.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-31 10:17:14 +0200
committermarha <marha@users.sourceforge.net>2012-07-31 10:17:14 +0200
commit83da3ad0287bc51cd16ee6911fe73dc98ebe000b (patch)
tree48d48590a0b0a3770006aeda8ec2b2a45054d1f1 /mesalib/src/mesa/main/pbo.c
parent00e30605ffc7ac3cf1a091ff2c1f46cfefb780d7 (diff)
parentbd27b3d008b0abf9ae2edcb127302728808533e4 (diff)
downloadvcxsrv-83da3ad0287bc51cd16ee6911fe73dc98ebe000b.tar.gz
vcxsrv-83da3ad0287bc51cd16ee6911fe73dc98ebe000b.tar.bz2
vcxsrv-83da3ad0287bc51cd16ee6911fe73dc98ebe000b.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/pbo.c')
-rw-r--r--mesalib/src/mesa/main/pbo.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/mesalib/src/mesa/main/pbo.c b/mesalib/src/mesa/main/pbo.c
index d8fa9191d..c73d7492f 100644
--- a/mesalib/src/mesa/main/pbo.c
+++ b/mesalib/src/mesa/main/pbo.c
@@ -32,6 +32,7 @@
#include "glheader.h"
#include "bufferobj.h"
+#include "glformats.h"
#include "image.h"
#include "imports.h"
#include "mtypes.h"
@@ -172,11 +173,12 @@ _mesa_map_pbo_source(struct gl_context *ctx,
*/
const GLvoid *
_mesa_map_validate_pbo_source(struct gl_context *ctx,
- GLuint dimensions,
- const struct gl_pixelstore_attrib *unpack,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type, GLsizei clientMemSize,
- const GLvoid *ptr, const char *where)
+ GLuint dimensions,
+ const struct gl_pixelstore_attrib *unpack,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type,
+ GLsizei clientMemSize,
+ const GLvoid *ptr, const char *where)
{
ASSERT(dimensions == 1 || dimensions == 2 || dimensions == 3);
@@ -268,11 +270,11 @@ _mesa_map_pbo_dest(struct gl_context *ctx,
*/
GLvoid *
_mesa_map_validate_pbo_dest(struct gl_context *ctx,
- GLuint dimensions,
- const struct gl_pixelstore_attrib *unpack,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type, GLsizei clientMemSize,
- GLvoid *ptr, const char *where)
+ GLuint dimensions,
+ const struct gl_pixelstore_attrib *unpack,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, GLsizei clientMemSize,
+ GLvoid *ptr, const char *where)
{
ASSERT(dimensions == 1 || dimensions == 2 || dimensions == 3);
@@ -339,12 +341,13 @@ _mesa_validate_pbo_teximage(struct gl_context *ctx, GLuint dimensions,
return pixels;
}
if (!_mesa_validate_pbo_access(dimensions, unpack, width, height, depth,
- format, type, INT_MAX, pixels)) {
+ format, type, INT_MAX, pixels)) {
_mesa_error(ctx, GL_INVALID_OPERATION, funcName, "(invalid PBO access)");
return NULL;
}
- buf = (GLubyte *) ctx->Driver.MapBufferRange(ctx, 0, unpack->BufferObj->Size,
+ buf = (GLubyte *) ctx->Driver.MapBufferRange(ctx, 0,
+ unpack->BufferObj->Size,
GL_MAP_READ_BIT,
unpack->BufferObj);
if (!buf) {
@@ -407,5 +410,3 @@ _mesa_unmap_teximage_pbo(struct gl_context *ctx,
ctx->Driver.UnmapBuffer(ctx, unpack->BufferObj);
}
}
-
-