summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-02-27 13:13:52 -0700
committerBrian Paul <[email protected]>2009-02-27 15:57:46 -0700
commitc6bde8873fbda6d8467600b7491d8543c75b0509 (patch)
tree2610de864e20e815a17f85dd3bda031fa0defc0e
parenta070937c00828ef0c0d618df7cc4845b0a21bbf3 (diff)
intel: remove some unneeded buffer unmap calls
Core mesa now unmaps the buffers if needed in these cases.
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffer_objects.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
index 60d7bb3770c..b7c7eeb368f 100644
--- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
@@ -35,9 +35,6 @@
#include "intel_batchbuffer.h"
#include "intel_regions.h"
-static GLboolean intel_bufferobj_unmap(GLcontext * ctx,
- GLenum target,
- struct gl_buffer_object *obj);
/** Allocates a new dri_bo to store the data for the buffer object. */
static void
@@ -103,12 +100,7 @@ intel_bufferobj_free(GLcontext * ctx, struct gl_buffer_object *obj)
struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
assert(intel_obj);
-
- /* Buffer objects are automatically unmapped when deleting according
- * to the spec.
- */
- if (obj->Pointer)
- intel_bufferobj_unmap(ctx, 0, obj);
+ assert(!obj->Pointer); /* Mesa should have unmapped it */
if (intel_obj->region) {
intel_bufferobj_release_region(intel, intel_obj);
@@ -141,11 +133,7 @@ intel_bufferobj_data(GLcontext * ctx,
intel_obj->Base.Size = size;
intel_obj->Base.Usage = usage;
- /* Buffer objects are automatically unmapped when creating new data buffers
- * according to the spec.
- */
- if (obj->Pointer)
- intel_bufferobj_unmap(ctx, 0, obj);
+ assert(!obj->Pointer); /* Mesa should have unmapped it */
if (intel_obj->region)
intel_bufferobj_release_region(intel, intel_obj);