On Tue, Jul 1, 2014 at 2:06 PM, Neil Roberts <n...@linux.intel.com> wrote: > Jason Ekstrand <ja...@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?
Not entirely sure how to interpret what the spec says, but something to potentially consider is MESA_ycbcr_texture (supported by swrast). RGBA 0 (black) != 0 in ycbcr... all 0's there are a green color. Also probably not _too_ important to worry too much about, just wanted to point it out. -ilia _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev