summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_curbe.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffer_objects.c5
2 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c
index 18b187ed1dc..03371564e13 100644
--- a/src/mesa/drivers/dri/i965/brw_curbe.c
+++ b/src/mesa/drivers/dri/i965/brw_curbe.c
@@ -353,10 +353,10 @@ update_constant_buffer(struct brw_context *brw,
assert(const_buffer);
assert(const_buffer->size >= size);
- dri_bo_map(const_buffer, GL_TRUE);
+ drm_intel_gem_bo_map_gtt(const_buffer);
map = const_buffer->virtual;
memcpy(map, params->ParameterValues, size);
- dri_bo_unmap(const_buffer);
+ drm_intel_gem_bo_unmap_gtt(const_buffer);
if (0) {
int i;
diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
index b7c7eeb368f..c849e4869e5 100644
--- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
@@ -204,9 +204,8 @@ intel_bufferobj_map(GLcontext * ctx,
{
struct intel_context *intel = intel_context(ctx);
struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
+ GLboolean read_only = (access == GL_READ_ONLY_ARB);
- /* XXX: Translate access to flags arg below:
- */
assert(intel_obj);
if (intel_obj->region)
@@ -217,7 +216,7 @@ intel_bufferobj_map(GLcontext * ctx,
return NULL;
}
- dri_bo_map(intel_obj->buffer, GL_TRUE);
+ dri_bo_map(intel_obj->buffer, !read_only);
obj->Pointer = intel_obj->buffer->virtual;
return obj->Pointer;
}