diff options
author | Eric Anholt <[email protected]> | 2013-01-10 15:11:28 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-01-18 12:48:13 -0800 |
commit | 60894edeef973e86a73067276f658b72f84271b6 (patch) | |
tree | 8ad06635586742380f5f429eecae0502057597d5 /src/mesa/drivers/dri/i915/i915_vtbl.c | |
parent | 8fd62e80ae1985b1dc466ecddbbed1e48edb08f9 (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/i915/i915_vtbl.c')
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_vtbl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c index e78dbc8f13f..91fde5587f9 100644 --- a/src/mesa/drivers/dri/i915/i915_vtbl.c +++ b/src/mesa/drivers/dri/i915/i915_vtbl.c @@ -531,7 +531,7 @@ i915_set_buf_info_for_region(uint32_t *state, struct intel_region *region, state[1] = buffer_id; if (region != NULL) { - state[1] |= BUF_3D_PITCH(region->pitch * region->cpp); + state[1] |= BUF_3D_PITCH(region->pitch); if (region->tiling != I915_TILING_NONE) { state[1] |= BUF_3D_TILED_SURFACE; |