[Mesa-dev] [PATCH 4/5] texstore: Add a generic implementation of GL_ARB_clear_texture
Jason Ekstrand
jason at jlekstrand.net
Tue Jul 1 11:27:21 PDT 2014
On Tue, Jul 1, 2014 at 11:06 AM, Neil Roberts <neil at linux.intel.com> wrote:
> Jason Ekstrand <jason at jlekstrand.net> writes:
>
> >> +static void
> >> +clear_image_to_zero(GLubyte *dstMap, GLint dstRowStride,
> >> + GLsizei width, GLsizei height,
> >> + GLsizei clearValueSize)
> >> +{
> >> + while (height-- > 0) {
> >> + memset(dstMap, 0, clearValueSize * width);
> >> + dstMap += dstRowStride;
> >> + }
> >> +}
> >>
> >
> > Technically, this should always work, but you might want to throw in a
> > comment about floating-point textures.
>
> I'm not sure what you mean here. Are you saying that hypothetically
> floating-point textures might not represent 0 as zero bytes?
>
sorry, I got nervous about memsetting floats. It isn't actually a problem
though since floating-point zero is just all zeroes. It doesn't really
matter much.
>
> > Other than that, looks good to me. (I'll second Ilia's MS comment
> > though.)
>
> Does that count as ‘reviewed-by’? (Yes, in the github branch I've made
> the two changes that Ilia suggested.)
>
Sure.
Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>
>
> Thanks for the review.
>
> - Neil
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140701/4fcadad4/attachment.html>
More information about the mesa-dev
mailing list