aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_context.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-04-25 12:14:34 -0700
committerEric Anholt <[email protected]>2014-05-01 15:12:27 -0700
commite3a9ca4563790f54976a969bf70cd5f45cbc4e13 (patch)
tree5c33cad869a259fbcc449248ca78ba1288faea6a /src/mesa/drivers/dri/i965/brw_context.c
parent8435b60a3577d2d905eae189cd7e770500177e99 (diff)
i965: Replace the region in DRIimage with just a BO pointer and stride.
Regions aren't refcounted safely for multithreaded applications, and they're not terribly useful wrappers of a BO, so I'm trying to remove them. Even the stride I added here could probably be reduced to use of an existing field in the __DRIimageRec, but I want this to be as mechanical of a change as possible. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_context.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 567ecfd8202..3ce9ff6f187 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -1330,10 +1330,9 @@ intel_update_image_buffer(struct brw_context *intel,
__DRIimage *buffer,
enum __DRIimageBufferMask buffer_type)
{
- struct intel_region *region = buffer->region;
struct gl_framebuffer *fb = drawable->driverPrivate;
- if (!rb || !region)
+ if (!rb || !buffer->bo)
return;
unsigned num_samples = rb->Base.Base.NumSamples;
@@ -1347,12 +1346,12 @@ intel_update_image_buffer(struct brw_context *intel,
else
last_mt = rb->singlesample_mt;
- if (last_mt && last_mt->region->bo == region->bo)
+ if (last_mt && last_mt->region->bo == buffer->bo)
return;
- intel_update_winsys_renderbuffer_miptree(intel, rb, region->bo,
- region->width, region->height,
- region->pitch);
+ intel_update_winsys_renderbuffer_miptree(intel, rb, buffer->bo,
+ buffer->width, buffer->height,
+ buffer->pitch);
if (brw_is_front_buffer_drawing(fb) &&
buffer_type == __DRI_IMAGE_BUFFER_FRONT &&