On Sun, 13 Nov 2011 22:32:15 -0800, Chad Versace <chad.vers...@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 <e...@anholt.net>
> Signed-off-by: Chad Versace <chad.vers...@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.

Attachment: pgpJrqmfZUYMO.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to