summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/intel_context.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-01-20 18:09:32 -0800
committerEric Anholt <eric@anholt.net>2007-01-26 14:23:29 -0800
commit5a3d9853958993174f13c8cff6bcf11993a48f65 (patch)
treed6d32d169f3e91d69dc0f2adb27893368ccc84a9 /src/mesa/drivers/dri/i965/intel_context.c
parent869b8ad499717eda4a1be04de4e516134123402c (diff)
Bug #9604: Fix a static buffer allocation failure.
The pool that the static buffer got allocated from was sized by pitch * height, but the buffer generated from it had its size aligned to a tile boundary, so allocation failed if pitch * height wasn't aligned. However, the 2d driver ensures that the size ends at a tile boundary, so just pass the 2d driver's buffer size rather than calculating it.
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_context.c')
-rw-r--r--src/mesa/drivers/dri/i965/intel_context.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c
index 63809e0aa8..4486a28adc 100644
--- a/src/mesa/drivers/dri/i965/intel_context.c
+++ b/src/mesa/drivers/dri/i965/intel_context.c
@@ -446,8 +446,8 @@ GLboolean intelInitContext( struct intel_context *intel,
intelScreen->cpp,
intelScreen->front.pitch / intelScreen->cpp,
intelScreen->height,
- intelScreen->front.tiled != 0); /* 0: LINEAR */
-
+ intelScreen->front.size,
+ intelScreen->front.tiled != 0);
intel->back_region =
intel_region_create_static(intel,
@@ -457,6 +457,7 @@ GLboolean intelInitContext( struct intel_context *intel,
intelScreen->cpp,
intelScreen->back.pitch / intelScreen->cpp,
intelScreen->height,
+ intelScreen->back.size,
intelScreen->back.tiled != 0);
/* Still assuming front.cpp == depth.cpp
@@ -473,6 +474,7 @@ GLboolean intelInitContext( struct intel_context *intel,
intelScreen->cpp,
intelScreen->depth.pitch / intelScreen->cpp,
intelScreen->height,
+ intelScreen->depth.size,
intelScreen->depth.tiled != 0);
intel_bufferobj_init( intel );