mesa: Remove target parameter from dd_function_table::UnmapBuffer
No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
@@ -699,7 +699,7 @@ static void brw_prepare_indices(struct brw_context *brw)
|
||||
&bo, &offset);
|
||||
brw->ib.start_vertex_offset = offset / ib_type_size;
|
||||
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER_ARB, bufferobj);
|
||||
ctx->Driver.UnmapBuffer(ctx, bufferobj);
|
||||
} else {
|
||||
/* Use CMD_3D_PRIM's start_vertex_offset to avoid re-uploading
|
||||
* the index buffer state when we're just moving the start index
|
||||
|
@@ -41,8 +41,7 @@
|
||||
#include "intel_regions.h"
|
||||
|
||||
static GLboolean
|
||||
intel_bufferobj_unmap(struct gl_context * ctx,
|
||||
GLenum target, struct gl_buffer_object *obj);
|
||||
intel_bufferobj_unmap(struct gl_context * ctx, struct gl_buffer_object *obj);
|
||||
|
||||
/** Allocates a new drm_intel_bo to store the data for the buffer object. */
|
||||
static void
|
||||
@@ -122,7 +121,7 @@ intel_bufferobj_free(struct gl_context * ctx, struct gl_buffer_object *obj)
|
||||
* (though it does if you call glDeleteBuffers)
|
||||
*/
|
||||
if (obj->Pointer)
|
||||
intel_bufferobj_unmap(ctx, 0, obj);
|
||||
intel_bufferobj_unmap(ctx, obj);
|
||||
|
||||
free(intel_obj->sys_buffer);
|
||||
if (intel_obj->region) {
|
||||
@@ -507,8 +506,7 @@ intel_bufferobj_flush_mapped_range(struct gl_context *ctx, GLenum target,
|
||||
* Called via glUnmapBuffer().
|
||||
*/
|
||||
static GLboolean
|
||||
intel_bufferobj_unmap(struct gl_context * ctx,
|
||||
GLenum target, struct gl_buffer_object *obj)
|
||||
intel_bufferobj_unmap(struct gl_context * ctx, struct gl_buffer_object *obj)
|
||||
{
|
||||
struct intel_context *intel = intel_context(ctx);
|
||||
struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
|
||||
@@ -766,7 +764,7 @@ intel_bufferobj_copy_subdata(struct gl_context *ctx,
|
||||
char *ptr = intel_bufferobj_map(ctx, GL_COPY_WRITE_BUFFER,
|
||||
GL_READ_WRITE, dst);
|
||||
memmove(ptr + write_offset, ptr + read_offset, size);
|
||||
intel_bufferobj_unmap(ctx, GL_COPY_WRITE_BUFFER, dst);
|
||||
intel_bufferobj_unmap(ctx, dst);
|
||||
} else {
|
||||
const char *src_ptr;
|
||||
char *dst_ptr;
|
||||
@@ -778,8 +776,8 @@ intel_bufferobj_copy_subdata(struct gl_context *ctx,
|
||||
|
||||
memcpy(dst_ptr + write_offset, src_ptr + read_offset, size);
|
||||
|
||||
intel_bufferobj_unmap(ctx, GL_COPY_READ_BUFFER, src);
|
||||
intel_bufferobj_unmap(ctx, GL_COPY_WRITE_BUFFER, dst);
|
||||
intel_bufferobj_unmap(ctx, src);
|
||||
intel_bufferobj_unmap(ctx, dst);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@@ -292,8 +292,7 @@ out:
|
||||
|
||||
if (_mesa_is_bufferobj(unpack->BufferObj)) {
|
||||
/* done with PBO so unmap it now */
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
|
||||
unpack->BufferObj);
|
||||
ctx->Driver.UnmapBuffer(ctx, unpack->BufferObj);
|
||||
}
|
||||
|
||||
intel_check_front_buffer_rendering(intel);
|
||||
|
@@ -169,7 +169,7 @@ nouveau_bufferobj_map_range(struct gl_context *ctx, GLenum target, GLintptr offs
|
||||
}
|
||||
|
||||
static GLboolean
|
||||
nouveau_bufferobj_unmap(struct gl_context *ctx, GLenum target, struct gl_buffer_object *obj)
|
||||
nouveau_bufferobj_unmap(struct gl_context *ctx, struct gl_buffer_object *obj)
|
||||
{
|
||||
assert(obj->Pointer);
|
||||
|
||||
|
@@ -138,7 +138,7 @@ static void r300FixupIndexBuffer(struct gl_context *ctx, const struct _mesa_inde
|
||||
r300->ind_buf.count = mesa_ind_buf->count;
|
||||
|
||||
if (mapped_named_bo) {
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, mesa_ind_buf->obj);
|
||||
ctx->Driver.UnmapBuffer(ctx, mesa_ind_buf->obj);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ static void r300SetupIndexBuffer(struct gl_context *ctx, const struct _mesa_inde
|
||||
r300->ind_buf.count = mesa_ind_buf->count;
|
||||
|
||||
if (mapped_named_bo) {
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, mesa_ind_buf->obj);
|
||||
ctx->Driver.UnmapBuffer(ctx, mesa_ind_buf->obj);
|
||||
}
|
||||
} else {
|
||||
r300FixupIndexBuffer(ctx, mesa_ind_buf);
|
||||
@@ -286,7 +286,7 @@ static void r300ConvertAttrib(struct gl_context *ctx, int count, const struct gl
|
||||
|
||||
radeon_bo_unmap(attr->bo);
|
||||
if (mapped_named_bo) {
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj);
|
||||
ctx->Driver.UnmapBuffer(ctx, input->BufferObj);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ static void r300AlignDataToDword(struct gl_context *ctx, const struct gl_client_
|
||||
}
|
||||
|
||||
if (mapped_named_bo) {
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj);
|
||||
ctx->Driver.UnmapBuffer(ctx, input->BufferObj);
|
||||
}
|
||||
|
||||
radeon_bo_unmap(attr->bo);
|
||||
|
@@ -456,7 +456,7 @@ static void evergreenConvertAttrib(struct gl_context *ctx, int count,
|
||||
|
||||
if (mapped_named_bo)
|
||||
{
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj);
|
||||
ctx->Driver.UnmapBuffer(ctx, input->BufferObj);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -531,7 +531,7 @@ static void evergreenFixupIndexBuffer(struct gl_context *ctx, const struct _mesa
|
||||
|
||||
if (mapped_named_bo)
|
||||
{
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, mesa_ind_buf->obj);
|
||||
ctx->Driver.UnmapBuffer(ctx, mesa_ind_buf->obj);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -629,7 +629,7 @@ static void evergreenSetupIndexBuffer(struct gl_context *ctx, const struct _mesa
|
||||
|
||||
if (mapped_named_bo)
|
||||
{
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, mesa_ind_buf->obj);
|
||||
ctx->Driver.UnmapBuffer(ctx, mesa_ind_buf->obj);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -675,7 +675,7 @@ static void evergreenAlignDataToDword(struct gl_context *ctx,
|
||||
radeon_bo_unmap(attr->bo);
|
||||
if (mapped_named_bo)
|
||||
{
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj);
|
||||
ctx->Driver.UnmapBuffer(ctx, input->BufferObj);
|
||||
}
|
||||
|
||||
attr->stride = dst_stride;
|
||||
|
@@ -543,7 +543,7 @@ static void r700ConvertAttrib(struct gl_context *ctx, int count,
|
||||
|
||||
if (mapped_named_bo)
|
||||
{
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj);
|
||||
ctx->Driver.UnmapBuffer(ctx, input->BufferObj);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -584,7 +584,7 @@ static void r700AlignDataToDword(struct gl_context *ctx,
|
||||
radeon_bo_unmap(attr->bo);
|
||||
if (mapped_named_bo)
|
||||
{
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj);
|
||||
ctx->Driver.UnmapBuffer(ctx, input->BufferObj);
|
||||
}
|
||||
|
||||
attr->stride = dst_stride;
|
||||
@@ -788,7 +788,7 @@ static void r700FixupIndexBuffer(struct gl_context *ctx, const struct _mesa_inde
|
||||
|
||||
if (mapped_named_bo)
|
||||
{
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, mesa_ind_buf->obj);
|
||||
ctx->Driver.UnmapBuffer(ctx, mesa_ind_buf->obj);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -836,7 +836,7 @@ static void r700SetupIndexBuffer(struct gl_context *ctx, const struct _mesa_inde
|
||||
|
||||
if (mapped_named_bo)
|
||||
{
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, mesa_ind_buf->obj);
|
||||
ctx->Driver.UnmapBuffer(ctx, mesa_ind_buf->obj);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@@ -205,7 +205,6 @@ radeonMapBuffer(struct gl_context * ctx,
|
||||
*/
|
||||
static GLboolean
|
||||
radeonUnmapBuffer(struct gl_context * ctx,
|
||||
GLenum target,
|
||||
struct gl_buffer_object *obj)
|
||||
{
|
||||
struct radeon_buffer_object *radeon_obj = get_radeon_buffer_object(obj);
|
||||
|
@@ -508,8 +508,7 @@ xmesa_DrawPixels_8R8G8B( struct gl_context *ctx,
|
||||
}
|
||||
|
||||
if (_mesa_is_bufferobj(unpack->BufferObj)) {
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
|
||||
unpack->BufferObj);
|
||||
ctx->Driver.UnmapBuffer(ctx, unpack->BufferObj);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -642,8 +641,7 @@ xmesa_DrawPixels_5R6G5B( struct gl_context *ctx,
|
||||
}
|
||||
|
||||
if (unpack->BufferObj->Name) {
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
|
||||
unpack->BufferObj);
|
||||
ctx->Driver.UnmapBuffer(ctx, unpack->BufferObj);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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 );
|
||||
/*@}*/
|
||||
|
||||
|
@@ -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");
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -378,7 +378,7 @@ st_bufferobj_flush_mapped_range(struct gl_context *ctx, GLenum target,
|
||||
* Called via glUnmapBufferARB().
|
||||
*/
|
||||
static GLboolean
|
||||
st_bufferobj_unmap(struct gl_context *ctx, GLenum target, struct gl_buffer_object *obj)
|
||||
st_bufferobj_unmap(struct gl_context *ctx, struct gl_buffer_object *obj)
|
||||
{
|
||||
struct pipe_context *pipe = st_context(ctx)->pipe;
|
||||
struct st_buffer_object *st_obj = st_buffer_object(obj);
|
||||
|
@@ -402,9 +402,7 @@ static void unmap_vbos( struct gl_context *ctx,
|
||||
{
|
||||
GLuint i;
|
||||
for (i = 0; i < nr_bo; i++) {
|
||||
ctx->Driver.UnmapBuffer(ctx,
|
||||
0, /* target -- I don't see why this would be needed */
|
||||
bo[i]);
|
||||
ctx->Driver.UnmapBuffer(ctx, bo[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -947,7 +947,7 @@ void vbo_exec_vtx_destroy( struct vbo_exec_context *exec )
|
||||
/* Free the vertex buffer. Unmap first if needed.
|
||||
*/
|
||||
if (_mesa_bufferobj_mapped(exec->vtx.bufferobj)) {
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, exec->vtx.bufferobj);
|
||||
ctx->Driver.UnmapBuffer(ctx, exec->vtx.bufferobj);
|
||||
}
|
||||
_mesa_reference_buffer_object(ctx, &exec->vtx.bufferobj, NULL);
|
||||
}
|
||||
|
@@ -176,7 +176,7 @@ vbo_get_minmax_index(struct gl_context *ctx,
|
||||
}
|
||||
|
||||
if (_mesa_is_bufferobj(ib->obj)) {
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER_ARB, ib->obj);
|
||||
ctx->Driver.UnmapBuffer(ctx, ib->obj);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ unmap_array_buffer(struct gl_context *ctx, struct gl_client_array *array)
|
||||
if (array->Enabled &&
|
||||
_mesa_is_bufferobj(array->BufferObj) &&
|
||||
_mesa_bufferobj_mapped(array->BufferObj)) {
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER_ARB, array->BufferObj);
|
||||
ctx->Driver.UnmapBuffer(ctx, array->BufferObj);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,8 +296,7 @@ check_draw_elements_data(struct gl_context *ctx, GLsizei count, GLenum elemType,
|
||||
}
|
||||
|
||||
if (_mesa_is_bufferobj(ctx->Array.ElementArrayBufferObj)) {
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER_ARB,
|
||||
ctx->Array.ElementArrayBufferObj);
|
||||
ctx->Driver.UnmapBuffer(ctx, ctx->Array.ElementArrayBufferObj);
|
||||
}
|
||||
|
||||
unmap_array_buffer(ctx, &arrayObj->Vertex);
|
||||
@@ -364,7 +363,7 @@ print_draw_arrays(struct gl_context *ctx,
|
||||
for (i = 0; i < n; i++) {
|
||||
printf(" float[%d] = 0x%08x %f\n", i, k[i], f[i]);
|
||||
}
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER_ARB, bufObj);
|
||||
ctx->Driver.UnmapBuffer(ctx, bufObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -760,8 +759,7 @@ dump_element_buffer(struct gl_context *ctx, GLenum type)
|
||||
;
|
||||
}
|
||||
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER_ARB,
|
||||
ctx->Array.ElementArrayBufferObj);
|
||||
ctx->Driver.UnmapBuffer(ctx, ctx->Array.ElementArrayBufferObj);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -281,7 +281,7 @@ vbo_exec_vtx_unmap( struct vbo_exec_context *exec )
|
||||
assert(exec->vtx.buffer_used <= VBO_VERT_BUFFER_SIZE);
|
||||
assert(exec->vtx.buffer_ptr != NULL);
|
||||
|
||||
ctx->Driver.UnmapBuffer(ctx, target, exec->vtx.bufferobj);
|
||||
ctx->Driver.UnmapBuffer(ctx, exec->vtx.bufferobj);
|
||||
exec->vtx.buffer_map = NULL;
|
||||
exec->vtx.buffer_ptr = NULL;
|
||||
exec->vtx.max_vert = 0;
|
||||
|
@@ -183,9 +183,7 @@ void vbo_rebase_prims( struct gl_context *ctx,
|
||||
}
|
||||
|
||||
if (map_ib)
|
||||
ctx->Driver.UnmapBuffer(ctx,
|
||||
GL_ELEMENT_ARRAY_BUFFER,
|
||||
ib->obj);
|
||||
ctx->Driver.UnmapBuffer(ctx, ib->obj);
|
||||
|
||||
tmp_ib.obj = ctx->Shared->NullBufferObj;
|
||||
tmp_ib.ptr = tmp_indices;
|
||||
|
@@ -247,7 +247,7 @@ static void
|
||||
unmap_vertex_store(struct gl_context *ctx,
|
||||
struct vbo_save_vertex_store *vertex_store)
|
||||
{
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER_ARB, vertex_store->bufferobj);
|
||||
ctx->Driver.UnmapBuffer(ctx, vertex_store->bufferobj);
|
||||
vertex_store->buffer = NULL;
|
||||
}
|
||||
|
||||
|
@@ -230,8 +230,7 @@ vbo_save_loopback_vertex_list(struct gl_context *ctx,
|
||||
list->wrap_count,
|
||||
list->vertex_size);
|
||||
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER_ARB,
|
||||
list->vertex_store->bufferobj);
|
||||
ctx->Driver.UnmapBuffer(ctx, list->vertex_store->bufferobj);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -564,14 +564,14 @@ replay_finish( struct copy_context *copy )
|
||||
for (i = 0; i < copy->nr_varying; i++) {
|
||||
struct gl_buffer_object *vbo = copy->varying[i].array->BufferObj;
|
||||
if (_mesa_is_bufferobj(vbo) && _mesa_bufferobj_mapped(vbo))
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, vbo);
|
||||
ctx->Driver.UnmapBuffer(ctx, vbo);
|
||||
}
|
||||
|
||||
/* Unmap index buffer:
|
||||
*/
|
||||
if (_mesa_is_bufferobj(copy->ib->obj) &&
|
||||
_mesa_bufferobj_mapped(copy->ib->obj)) {
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, copy->ib->obj);
|
||||
ctx->Driver.UnmapBuffer(ctx, copy->ib->obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user