From 8db761409dadc2e899d4e7107eff3aa07b07aa11 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 12 Sep 2008 15:48:13 -0700 Subject: intel: Add a width field to regions, and use it for making miptrees in TFP. Otherwise, we would use the pitch as width of the texture, and compiz would render the pitch padding on the right hand side. --- src/mesa/drivers/dri/intel/intel_regions.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/mesa/drivers/dri/intel/intel_regions.h') diff --git a/src/mesa/drivers/dri/intel/intel_regions.h b/src/mesa/drivers/dri/intel/intel_regions.h index a561de485e..62eb049fba 100644 --- a/src/mesa/drivers/dri/intel/intel_regions.h +++ b/src/mesa/drivers/dri/intel/intel_regions.h @@ -55,8 +55,9 @@ struct intel_region dri_bo *buffer; /**< buffer manager's buffer */ GLuint refcount; /**< Reference count for region */ GLuint cpp; /**< bytes per pixel */ - GLuint pitch; /**< in pixels */ + GLuint width; /**< in pixels */ GLuint height; /**< in pixels */ + GLuint pitch; /**< in pixels */ GLubyte *map; /**< only non-NULL when region is actually mapped */ GLuint map_refcount; /**< Reference count for mapping */ @@ -72,12 +73,13 @@ struct intel_region * copied by calling intel_reference_region(). */ struct intel_region *intel_region_alloc(struct intel_context *intel, - GLuint cpp, - GLuint pitch, GLuint height); + GLuint cpp, GLuint width, + GLuint height, GLuint pitch); struct intel_region * intel_region_alloc_for_handle(struct intel_context *intel, - GLuint cpp, GLuint pitch, GLuint height, + GLuint cpp, + GLuint width, GLuint height, GLuint pitch, unsigned int handle, const char *name); void intel_region_reference(struct intel_region **dst, -- cgit v1.2.3