summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/api_arrayelt.c4
-rw-r--r--src/mesa/main/api_validate.c2
-rw-r--r--src/mesa/main/bufferobj.c14
-rw-r--r--src/mesa/main/dd.h2
-rw-r--r--src/mesa/main/dlist.c3
-rw-r--r--src/mesa/main/pbo.c8
-rw-r--r--src/mesa/main/shared.c2
-rw-r--r--src/mesa/main/texgetimage.c6
8 files changed, 16 insertions, 25 deletions
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c
index f88da845853..385bef1c53e 100644
--- a/src/mesa/main/api_arrayelt.c
+++ b/src/mesa/main/api_arrayelt.c
@@ -1622,9 +1622,7 @@ void _ae_unmap_vbos( struct gl_context *ctx )
assert (!actx->NewState);
for (i = 0; i < actx->nr_vbos; i++)
- ctx->Driver.UnmapBuffer(ctx,
- GL_ARRAY_BUFFER_ARB,
- actx->vbo[i]);
+ ctx->Driver.UnmapBuffer(ctx, actx->vbo[i]);
actx->mapped_vbos = GL_FALSE;
}
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 2981d42297a..08faf9e08b4 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -89,7 +89,7 @@ _mesa_max_buffer_index(struct gl_context *ctx, GLuint count, GLenum type,
}
if (map) {
- ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER_ARB, elementBuf);
+ ctx->Driver.UnmapBuffer(ctx, elementBuf);
}
return max;
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index c52358ecb04..e52e59eb5c2 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -512,11 +512,9 @@ _mesa_buffer_flush_mapped_range( struct gl_context *ctx, GLenum target,
* \sa glUnmapBufferARB, dd_function_table::UnmapBuffer
*/
static GLboolean
-_mesa_buffer_unmap( struct gl_context *ctx, GLenum target,
- struct gl_buffer_object *bufObj )
+_mesa_buffer_unmap( struct gl_context *ctx, struct gl_buffer_object *bufObj )
{
(void) ctx;
- (void) target;
/* XXX we might assert here that bufObj->Pointer is non-null */
bufObj->Pointer = NULL;
bufObj->Length = 0;
@@ -551,8 +549,8 @@ _mesa_copy_buffer_subdata(struct gl_context *ctx,
if (srcPtr && dstPtr)
memcpy(dstPtr + writeOffset, srcPtr + readOffset, size);
- ctx->Driver.UnmapBuffer(ctx, GL_COPY_READ_BUFFER, src);
- ctx->Driver.UnmapBuffer(ctx, GL_COPY_WRITE_BUFFER, dst);
+ ctx->Driver.UnmapBuffer(ctx, src);
+ ctx->Driver.UnmapBuffer(ctx, dst);
}
@@ -774,7 +772,7 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
if (_mesa_bufferobj_mapped(bufObj)) {
/* if mapped, unmap it now */
- ctx->Driver.UnmapBuffer(ctx, 0, bufObj);
+ ctx->Driver.UnmapBuffer(ctx, bufObj);
bufObj->AccessFlags = DEFAULT_ACCESS;
bufObj->Pointer = NULL;
}
@@ -934,7 +932,7 @@ _mesa_BufferDataARB(GLenum target, GLsizeiptrARB size,
if (_mesa_bufferobj_mapped(bufObj)) {
/* Unmap the existing buffer. We'll replace it now. Not an error. */
- ctx->Driver.UnmapBuffer(ctx, target, bufObj);
+ ctx->Driver.UnmapBuffer(ctx, bufObj);
bufObj->AccessFlags = DEFAULT_ACCESS;
ASSERT(bufObj->Pointer == NULL);
}
@@ -1147,7 +1145,7 @@ _mesa_UnmapBufferARB(GLenum target)
}
#endif
- status = ctx->Driver.UnmapBuffer( ctx, target, bufObj );
+ status = ctx->Driver.UnmapBuffer( ctx, bufObj );
bufObj->AccessFlags = DEFAULT_ACCESS;
ASSERT(bufObj->Pointer == NULL);
ASSERT(bufObj->Offset == 0);
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index b5ed9a40c70..318ea1f25aa 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -725,7 +725,7 @@ struct dd_function_table {
GLintptr offset, GLsizeiptr length,
struct gl_buffer_object *obj);
- GLboolean (*UnmapBuffer)( struct gl_context *ctx, GLenum target,
+ GLboolean (*UnmapBuffer)( struct gl_context *ctx,
struct gl_buffer_object *obj );
/*@}*/
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index f9282398c21..3e54af25d00 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -906,8 +906,7 @@ unpack_image(struct gl_context *ctx, GLuint dimensions,
image = _mesa_unpack_image(dimensions, width, height, depth,
format, type, src, unpack);
- ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
- unpack->BufferObj);
+ ctx->Driver.UnmapBuffer(ctx, unpack->BufferObj);
if (!image) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "display list construction");
diff --git a/src/mesa/main/pbo.c b/src/mesa/main/pbo.c
index 15e0480e9f1..f93cdf1e392 100644
--- a/src/mesa/main/pbo.c
+++ b/src/mesa/main/pbo.c
@@ -201,8 +201,7 @@ _mesa_unmap_pbo_source(struct gl_context *ctx,
{
ASSERT(unpack != &ctx->Pack); /* catch pack/unpack mismatch */
if (_mesa_is_bufferobj(unpack->BufferObj)) {
- ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
- unpack->BufferObj);
+ ctx->Driver.UnmapBuffer(ctx, unpack->BufferObj);
}
}
@@ -297,7 +296,7 @@ _mesa_unmap_pbo_dest(struct gl_context *ctx,
{
ASSERT(pack != &ctx->Unpack); /* catch pack/unpack mismatch */
if (_mesa_is_bufferobj(pack->BufferObj)) {
- ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, pack->BufferObj);
+ ctx->Driver.UnmapBuffer(ctx, pack->BufferObj);
}
}
@@ -384,8 +383,7 @@ _mesa_unmap_teximage_pbo(struct gl_context *ctx,
const struct gl_pixelstore_attrib *unpack)
{
if (_mesa_is_bufferobj(unpack->BufferObj)) {
- ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
- unpack->BufferObj);
+ ctx->Driver.UnmapBuffer(ctx, unpack->BufferObj);
}
}
diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
index d84f59690c5..8b7159db09c 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -200,7 +200,7 @@ delete_bufferobj_cb(GLuint id, void *data, void *userData)
struct gl_buffer_object *bufObj = (struct gl_buffer_object *) data;
struct gl_context *ctx = (struct gl_context *) userData;
if (_mesa_bufferobj_mapped(bufObj)) {
- ctx->Driver.UnmapBuffer(ctx, 0, bufObj);
+ ctx->Driver.UnmapBuffer(ctx, bufObj);
bufObj->Pointer = NULL;
}
_mesa_reference_buffer_object(ctx, &bufObj, NULL);
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 26c2ff98ba1..20595ef3b56 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -474,8 +474,7 @@ _mesa_get_teximage(struct gl_context *ctx, GLenum target, GLint level,
}
if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) {
- ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT,
- ctx->Pack.BufferObj);
+ ctx->Driver.UnmapBuffer(ctx, ctx->Pack.BufferObj);
}
}
@@ -531,8 +530,7 @@ _mesa_get_compressed_teximage(struct gl_context *ctx, GLenum target, GLint level
}
if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) {
- ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT,
- ctx->Pack.BufferObj);
+ ctx->Driver.UnmapBuffer(ctx, ctx->Pack.BufferObj);
}
}