OSDN Git Service

intel: Rework intel_miptree_create_for_region() to wrap a BO.
authorEric Anholt <eric@anholt.net>
Fri, 24 May 2013 17:54:36 +0000 (10:54 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 28 May 2013 20:06:57 +0000 (13:06 -0700)
commit8c3392e274f59446f89682b33a2b4af60243ea0b
treec2a08308016b66635e9f4a5443cd5dbede8bb5e1
parente845c5cf7abce55759501a473459aff3bf25c9ca
intel: Rework intel_miptree_create_for_region() to wrap a BO.

I needed to do this for the PBO blit cases to use intel_miptree_blit().
But this also actually partially fixes a bug in EGLImage handling: We
can't share regions across contexts, because regions have a refcount that
isn't protected by a mutex, and different contexts can be simulataneously
accessed from multiple threads.  Now we just need to get regions out of
__DRIImage.  There was also a missing use of image->offset in the EGLImage
renderbuffer storage code.

Reviewed-and-tested-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/intel/intel_fbo.c
src/mesa/drivers/dri/intel/intel_mipmap_tree.c
src/mesa/drivers/dri/intel/intel_mipmap_tree.h