summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-02-19 19:57:30 +0100
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-02-19 19:57:30 +0100
commitd2b06403c6f06ee37f46c2a504983884382c8abc (patch)
tree3950f3492506e5096ed1cf4a7368c8f6a4a187a3 /src/mesa/drivers/dri
parent43c6b2f67fc13b80bfa7d4128666ed04903cf2a0 (diff)
i915tex: Fix performance regression with new vbo code and latest drm.
With current memory preferences, vbos ended up in AGP space where reading from them got a bit slow. Make sure buffer objects are initially created in system memory.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_buffer_objects.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_buffer_objects.c b/src/mesa/drivers/dri/i915tex/intel_buffer_objects.c
index 31c41d86857..ba3c7f0c1f7 100644
--- a/src/mesa/drivers/dri/i915tex/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/i915tex/intel_buffer_objects.c
@@ -50,7 +50,10 @@ intel_bufferobj_alloc(GLcontext * ctx, GLuint name, GLenum target)
_mesa_initialize_buffer_object(&obj->Base, name, target);
driGenBuffers(intel->intelScreen->regionPool,
- "bufferobj", 1, &obj->buffer, 64, 0, 0);
+ "bufferobj", 1, &obj->buffer, 64,
+ DRM_BO_FLAG_MEM_LOCAL |
+ DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE,
+ 0);
return &obj->Base;
}