[Mesa-dev] [PATCH 6/8] dri: Convert driCreateConfigs to use a gl_format enum

Chad Versace chad.versace at linux.intel.com
Fri Oct 26 11:42:39 PDT 2012


This is great. I wanted to do this when I last touched
intel_screen_make_dri_configs but was unable to find the motivation.

I have one suggestion below, but that nit doesn't block the patch.

Reviewed-by: Chad Versace <chad.versace at linux.intel.com>

> +   switch (format) {
> +   case MESA_FORMAT_RGB565:
> +      masks = masks_table[0];
> +      break;
> +   case MESA_FORMAT_XRGB8888:
> +      masks = masks_table[1];
> +      break;
> +   case MESA_FORMAT_ARGB8888:
> +      masks = masks_table[2];
> +      break;
> +   default:
> +      fprintf(stderr, "[%s:%u] Unknown framebuffer type %s (%d).\n",
> +              __FUNCTION__, __LINE__,
> +              _mesa_get_format_name(format), format);
> +      return NULL;
>     }

I think _mesa_problem() is more appropriate here than fprintf(). But to call
_mesa_problem() here you would need to pass ctx=NULL to it, which I'm ok with
but other people might not like. Meh.


More information about the mesa-dev mailing list