2015-08-12 0:07 GMT+01:00 Nanley Chery <[email protected]>: > From: Nanley Chery <[email protected]> > > Combine the adjacent cases which have the same GL type in the switch statemnt. > > Signed-off-by: Nanley Chery <[email protected]> > --- > src/mesa/main/formats.c | 152 > ++++++------------------------------------------ > 1 file changed, 17 insertions(+), 135 deletions(-) > > diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c > index cb5ad21..9b9d79b 100644 > --- a/src/mesa/main/formats.c > +++ b/src/mesa/main/formats.c > @@ -1005,13 +1005,10 @@ > _mesa_uncompressed_format_to_type_and_comps(mesa_format format, > case MESA_FORMAT_R8G8B8X8_UNORM: > case MESA_FORMAT_B8G8R8X8_UNORM: > case MESA_FORMAT_X8R8G8B8_UNORM: > - *datatype = GL_UNSIGNED_BYTE; > - *comps = 4; > - return; > case MESA_FORMAT_BGR_UNORM8: > case MESA_FORMAT_RGB_UNORM8: > *datatype = GL_UNSIGNED_BYTE; > - *comps = 3; > + *comps = _mesa_format_num_components(format); With the datatype aside what is stopping us from using a single _mesa_format_num_components(format) ?
Thanks Emil _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
