[Mesa-dev] [PATCH 6/8] i965: Drop some duplicated code in DRI winsys BO updates.

Kenneth Graunke kenneth at whitecape.org
Fri Feb 14 17:47:44 PST 2014


On 02/14/2014 03:00 PM, Eric Anholt wrote:
[snip]
> @@ -666,78 +667,6 @@ intel_miptree_create_for_bo(struct brw_context *brw,
>     return mt;
>  }
>  
> -
> -/**
> - * For a singlesample DRI2 buffer, this simply wraps the given region with a miptree.
> - *
> - * For a multisample DRI2 buffer, this wraps the given region with
> - * a singlesample miptree, then creates a multisample miptree into which the
> - * singlesample miptree is embedded as a child.
> - */
> -struct intel_mipmap_tree*
> -intel_miptree_create_for_dri2_buffer(struct brw_context *brw,
> -                                     unsigned dri_attachment,
> -                                     mesa_format format,
> -                                     uint32_t num_samples,
> -                                     struct intel_region *region)
> -{
> -   struct intel_mipmap_tree *singlesample_mt = NULL;
> -   struct intel_mipmap_tree *multisample_mt = NULL;
> -
> -   /* Only the front and back buffers, which are color buffers, are shared
> -    * through DRI2.
> -    */
> -   assert(dri_attachment == __DRI_BUFFER_BACK_LEFT ||
> -          dri_attachment == __DRI_BUFFER_FRONT_LEFT ||
> -          dri_attachment == __DRI_BUFFER_FAKE_FRONT_LEFT);
> -   assert(_mesa_get_format_base_format(format) == GL_RGB ||
> -          _mesa_get_format_base_format(format) == GL_RGBA);
> -
> -   singlesample_mt = intel_miptree_create_for_bo(brw,
> -                                                 region->bo,
> -                                                 format,
> -                                                 0,
> -                                                 region->width,
> -                                                 region->height,
> -                                                 region->pitch,
> -                                                 region->tiling);
> -   if (!singlesample_mt)
> -      return NULL;
> -   singlesample_mt->region->name = region->name;

The singlesample_mt->region->name = region->name line is missing from
the new code.  I doubt it actually matters, but figured I'd point it out
in case it wasn't intentional.

--Ken

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140214/eca59e7d/attachment.pgp>


More information about the mesa-dev mailing list