From 40dd024be618d805b3744e15d25e115018641324 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 18 Feb 2009 11:34:47 -0800 Subject: intel: tell libdrm whether we want a cpu-ready or gpu-ready BO for regions. This lets us avoid allocing new buffers for renderbuffers, finalized miptrees, and PBO-uploaded textures when there's an unreferenced but still active one cached, while also avoiding CPU waits for batchbuffers and CPU-uploaded textures. The size of BOs allocated for a desktop running current GL cairogears on i915 is cut in half with this. Note that this means we require libdrm 2.4.5. --- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers/dri/intel/intel_mipmap_tree.c') diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index bf1c3f03f0..6e1e034e53 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -103,7 +103,8 @@ intel_miptree_create(struct intel_context *intel, GLuint last_level, GLuint width0, GLuint height0, - GLuint depth0, GLuint cpp, GLuint compress_byte) + GLuint depth0, GLuint cpp, GLuint compress_byte, + GLboolean expect_accelerated_upload) { struct intel_mipmap_tree *mt; @@ -120,7 +121,8 @@ intel_miptree_create(struct intel_context *intel, mt->cpp, mt->pitch, mt->total_height, - mt->pitch); + mt->pitch, + expect_accelerated_upload); if (!mt->region) { free(mt); -- cgit v1.2.3