Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
/* No gallium format for this one */
return PIPE_FORMAT_NONE;
case OSMESA_RGB_565:
+ if (type != GL_UNSIGNED_SHORT_5_6_5)
+ return PIPE_FORMAT_NONE;
return PIPE_FORMAT_B5G6R5_UNORM;
default:
; /* fall-through */
return GL_FALSE;
}
- if (osmesa->format == OSMESA_RGB_565 && type != GL_UNSIGNED_SHORT_5_6_5) {
- return GL_FALSE;
- }
-
color_format = osmesa_choose_format(osmesa->format, type);
if (color_format == PIPE_FORMAT_NONE) {
fprintf(stderr, "OSMesaMakeCurrent(unsupported format/type)\n");