The motivation was to use the same names as Gallium and then to fix the Gallium naming. Also, core Mesa is likely to share u_format tools and code generation with Gallium eventually anyway and then all the Mesa format pack and unpack functions will get removed. Given that, I don't see a point in improving Mesa formats alone.
Marek On Tue, Dec 24, 2013 at 4:57 AM, Michel Dänzer <mic...@daenzer.net> wrote: > On Son, 2013-12-22 at 03:46 +0100, Marek Olšák wrote: >> From: Marek Olšák <marek.ol...@amd.com> >> >> The renaming was driven by the function st_mesa_format_to_pipe_format. >> Only whole words are renamed to prevent regressions. >> >> For the MESA formats which don't have corresponding PIPE formats, I tried >> to follow the PIPE_FORMAT_* conventions except for a few REV packed formats, >> whose renaming is left for a future patch. > > This patch conflicts with Mark's MESA_FORMAT patches, right? Can you > guys work out which way you want to take this? :) > > >> /* msb <------ TEXEL BITS -----------> lsb */ >> /* ---- ---- ---- ---- ---- ---- ---- ---- */ > [...] >> + MESA_FORMAT_B8G8R8_UNORM, /* RRRR RRRR GGGG GGGG BBBB BBBB */ >> + MESA_FORMAT_R8G8B8_UNORM, /* BBBB BBBB GGGG GGGG RRRR RRRR */ > [...] >> + MESA_FORMAT_R8G8B8_SRGB, /* RRRR RRRR GGGG GGGG BBBB BBBB >> */ > > I guess these are examples of formats where Mark called out the memory > layout documentation comments being wrong. These formats cannot be > usefully defined as packed values, so the format names and comments > should be changed to reflect that, e.g. per this example: > >> - MESA_FORMAT_SIGNED_RGB_16, /* ushort[0]=R, ushort[1]=G, ushort[2]=B >> */ > > >> - MESA_FORMAT_RGBA_FLOAT32, >> - MESA_FORMAT_RGBA_FLOAT16, >> - MESA_FORMAT_RGB_FLOAT32, >> - MESA_FORMAT_RGB_FLOAT16, > [...] >> + MESA_FORMAT_R32G32B32A32_FLOAT, >> + MESA_FORMAT_R16G16B16A16_FLOAT, >> + MESA_FORMAT_R32G32B32_FLOAT, >> + MESA_FORMAT_R16G16B16_FLOAT, > > [...] > >> - MESA_FORMAT_R_INT16, >> - MESA_FORMAT_RG_INT16, >> - MESA_FORMAT_RGB_INT16, >> - MESA_FORMAT_RGBA_INT16, >> - MESA_FORMAT_R_INT32, >> - MESA_FORMAT_RG_INT32, >> - MESA_FORMAT_RGB_INT32, >> - MESA_FORMAT_RGBA_INT32, > [...] >> + MESA_FORMAT_R16_SINT, >> + MESA_FORMAT_R16G16_SINT, >> + MESA_FORMAT_R16G16B16_SINT, >> + MESA_FORMAT_R16G16B16A16_SINT, >> + MESA_FORMAT_R32_SINT, >> + MESA_FORMAT_R32G32_SINT, >> + MESA_FORMAT_R32G32B32_SINT, >> + MESA_FORMAT_R32G32B32A32_SINT, > > These changes remove the naming distinction between formats which are > defined as packed values and formats which are defined as arrays of > values. I think that's a bad idea, there should be an explicit naming > distinction between the two kinds of formats. > > > -- > Earthling Michel Dänzer | http://www.amd.com > Libre software enthusiast | Mesa and X developer > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev