[Mesa-dev] [PATCH v3] i965: Avoid unnecessary copy when depthstencil workaround invoked by clear.

Eric Anholt eric at anholt.net
Mon Mar 18 08:57:52 PDT 2013

Paul Berry <stereotype441 at gmail.com> writes:

> Since apps typically begin rendering with a call to glClear(), it is
> likely that when brw_workaround_depthstencil_alignment() moves a
> miplevel to a temporary buffer, it can avoid doing a blit, since the
> contents of the miplevel are about to be erased.
> This patch adds the necessary plumbing to determine when
> brw_workaround_depthstencil_alignment() is being called as a
> consequence of glClear(), and avoids the unnecessary blit when it is
> safe to do so.
> Reviewed-by: Chad Versace <chad.versace at linux.intel.com>
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
> v2: Eliminate unnecessary call to _mesa_is_depthstencil_format().  Fix
> handling of depth buffer in depth/stencil format.
> v3: Use correct bitfields for clear_mask.  Fix handling of depth
> buffer in depth/stencil format when hardware uses separate stencil.
> When invalidating, make sure we still reassociate the image to the new
> miptree.

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130318/42e11372/attachment.pgp>

More information about the mesa-dev mailing list