From c0b4257aa9ba783674ccf7162799385734dff211 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 15 Dec 2007 16:12:17 -0800 Subject: [965] Move to using shared texture management code. This removes the delayed texture upload optimization from 965, in exchange for bringing us closer to PBO support. It also disables SGIS_generate_mipmap, which didn't seem to be working before anyway, according to the lodbias demo. --- src/mesa/drivers/dri/intel/intel_mipmap_tree.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/mesa/drivers/dri/intel/intel_mipmap_tree.h') diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h index ecdb7be244..4a76717688 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h @@ -192,7 +192,6 @@ void intel_miptree_image_copy(struct intel_context *intel, */ GLboolean i915_miptree_layout(struct intel_mipmap_tree *mt); GLboolean i945_miptree_layout(struct intel_mipmap_tree *mt); - - +GLboolean brw_miptree_layout(struct intel_mipmap_tree *mt); #endif -- cgit v1.2.3 From a183efc132c8db1bb42525ac177ffff96f69a59b Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 17 Dec 2007 22:43:48 -0800 Subject: [Intel] Centralize mipmap pitch computations. mipmap pitches must account for the device alignment requirements, which used to be fairly simple; just align to a 4-byte boundary. However, to allow textures to be drawn to under TTM, they now need to be aligned to a 64-byte boundary. Placing all of the alignment constraints in a single function allows this new constraint to be applied uniformly. There was some pitch constraining code in intel_miptree_create, but that was modifying the pitch long after the miptree had been layed out, so it only served to wreck the mipmap and cause rendering errors. --- src/mesa/drivers/dri/intel/intel_mipmap_tree.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/mesa/drivers/dri/intel/intel_mipmap_tree.h') diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h index 4a76717688..968eec4fec 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h @@ -123,6 +123,10 @@ struct intel_mipmap_tree *intel_miptree_create(struct intel_context *intel, GLuint cpp, GLuint compress_byte); +int intel_miptree_pitch_align (struct intel_context *intel, + struct intel_mipmap_tree *mt, + int pitch); + void intel_miptree_reference(struct intel_mipmap_tree **dst, struct intel_mipmap_tree *src); @@ -190,8 +194,11 @@ void intel_miptree_image_copy(struct intel_context *intel, /* i915_mipmap_tree.c: */ -GLboolean i915_miptree_layout(struct intel_mipmap_tree *mt); -GLboolean i945_miptree_layout(struct intel_mipmap_tree *mt); -GLboolean brw_miptree_layout(struct intel_mipmap_tree *mt); +GLboolean i915_miptree_layout(struct intel_context *intel, + struct intel_mipmap_tree *mt); +GLboolean i945_miptree_layout(struct intel_context *intel, + struct intel_mipmap_tree *mt); +GLboolean brw_miptree_layout(struct intel_context *intel, + struct intel_mipmap_tree *mt); #endif -- cgit v1.2.3