However st_choose_matching_format is also used by other clients such as TexImage, GetTexImage, and ReadPixels, so this should really be fixed in the problematic caller of st_choose_matching_format, that is DrawPixels.
Marek On Sat, Mar 29, 2014 at 7:48 PM, Chris Forbes <chr...@ijw.co.nz> wrote: > On Sun, Mar 30, 2014 at 12:50 AM, Marek Olšák <mar...@gmail.com> wrote: > >> Why is this needed? > > The second patch fixes format/type to mesa_format matching for > intensity formats, so that texture uploads / buffer object clears / > etc can get the memcpy paths. (Previously, we were testing on pixel > format = GL_INTENSITY, which is nonsense and disallowed by earlier > checks.) > > Unfortunately, the intensity mesa_formats are listed before their red > equivalants in the formats, so we'd end up picking an intensity format > for DrawPixels( GL_RED, ... > > If that happens, then the actual draw later in DrawPixels would write > <I, I, I, I> to the destination, rather than <R, 0, 0, 1>. > > https://bugs.freedesktop.org/show_bug.cgi?id=76601 > https://bugs.freedesktop.org/show_bug.cgi?id=76602 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev