summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel/intel_regions.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-01-10 15:11:28 -0800
committerEric Anholt <[email protected]>2013-01-18 12:48:13 -0800
commit60894edeef973e86a73067276f658b72f84271b6 (patch)
tree8ad06635586742380f5f429eecae0502057597d5 /src/mesa/drivers/dri/intel/intel_regions.h
parent8fd62e80ae1985b1dc466ecddbbed1e48edb08f9 (diff)
intel: Make intel_region's pitch be bytes instead of pixels.
We almost never want a stride in pixels -- if you're doing anything with a stride, you're specifying an offset or incrementing a pointer, and in both cases you had to multiply by cpp to get the bytes value you wanted. But worse, on the way to creating a region from a new tiled BO, we divided by cpp to get pitch in pixels, and for an RGB32 buffer (an upcoming change) the pitch wouldn't divide exactly, and we'd end up with a wrong stride in our region. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_regions.h')
-rw-r--r--src/mesa/drivers/dri/intel/intel_regions.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_regions.h b/src/mesa/drivers/dri/intel/intel_regions.h
index 8737a6de194..1aff5d9f3b0 100644
--- a/src/mesa/drivers/dri/intel/intel_regions.h
+++ b/src/mesa/drivers/dri/intel/intel_regions.h
@@ -63,7 +63,7 @@ struct intel_region
GLuint cpp; /**< bytes per pixel */
GLuint width; /**< in pixels */
GLuint height; /**< in pixels */
- GLuint pitch; /**< in pixels */
+ GLuint pitch; /**< in bytes */
GLubyte *map; /**< only non-NULL when region is actually mapped */
GLuint map_refcount; /**< Reference count for mapping */