[Mesa-dev] [PATCH 6/6] intel: Detile stencil buffer only if necessary

Chad Versace chad.versace at linux.intel.com
Wed Nov 16 12:58:45 PST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/15/2011 06:16 PM, Eric Anholt wrote:
> On Sun, 13 Nov 2011 22:32:15 -0800, Chad Versace <chad.versace at linux.intel.com> wrote:
>> In intel_map_renderbuffer_s8(), detile and copy the stencil buffer into
>> the temporary buffer only if the renderbuffer is mapped in read mode. If
>> the caller never going to read the bits but just clobber them, then it's
>> wasted effort to detile the stencil buffer.
>>
>> CC: Eric Anholt <eric at anholt.net>
>> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
> 
> I don't think this is correct.
> 
> Imagine something that isn't writing all of the pixels, but definitely
> isn't reading data before writing.  It might sensibly ask for
> GL_WRITE_BIT but not GL_READ_BIT, and then all the pixels it doesn't
> write get trashed when the whole rectangle is written back out.
> 
> If the mode contained GL_MAP_INVALIDATE_RANGE_BIT (basically,
> interpreting the mode argument like GL_ARB_map_buffer_range, which was
> my intent if not Brian's), this would be reasonable.

You're correct. This patch is nakd.

- ----
Chad Versace
chad.versace at linux.intel.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOxCQDAAoJEAIvNt057x8iMnQQALJW9MK18IHdQ08RX0lxLDkW
Tzy5U3zv+j8NxzdQl4aQyA2lXmpNZHzPB6L3AV0Yog+I3ey63A0ADNi94brbu4LS
EX/tu+Vb0VsSTC9/aSazDDLQJbLecRo2ZdYueOn/3eKJONmHeCZz8XZrn5wgSE1W
Uh4dSR7cORw1vBZBugB5vD55JlRrZtDM45d6s/VRzY2O2ujrBQvr/lNbTZ35HNd7
zIL+67y50RBWMYIiyyzyXHa8lWVwllo1K9CM0LBmebxcX5t6rCn5QyZcT5F0DQAn
CyKpKBVDt2mkaOqgnFUiXSTETTOKCla9tzBjNS6OlI65wAmYRZZz0he1rrdl1g6Y
kKkI61qWwCOyKMLdRxCWoXYY3QmenIEe4++idtlTauFgKtSZE2v4oAx2X1Z4FvY8
vbcpje3tbt7khMQnFVrVU/nHIyKw6Ko2r+WP32Cr2j044f1VAj+N1zIpCNdPTsd6
ZvJWdAUcPM+vN9fXacmWJAheE2sfzXCJ9o6ffCpRs7LYSv2ZuVlpyZ53a06D5dl/
ya9A9dMbjmFr0MGfELWHKgyRv+Cx/0XxrgvmQNxz6O4TUp6V+xiE6Qiyr5kj90wI
bah5zurL3mRVTH0Dp/pQFOxiIIzovCTXGHi35ymRL1/rLWyhgApa2jngVqqeawEi
9Ea+IzVuGlyke/v2kocL
=PH5l
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list