clean-up/re-org of intel_framebuffer code
[mesa.git] / src / mesa / drivers / x11 / xm_surface.c
index dbbf26e33ffd880a3936ea096a0ed21ade1cb44b..5533158ece00b8904b48939e617a5bdfe2e26230 100644 (file)
@@ -195,18 +195,16 @@ xmesa_surface_alloc(struct pipe_context *pipe, GLuint pipeFormat)
 }
 
 
-const GLuint *
-xmesa_supported_formats(struct pipe_context *pipe, GLuint *numFormats)
+boolean
+xmesa_is_format_supported(struct pipe_context *pipe, uint format)
 {
-   static const GLuint formats[] = {
-      PIPE_FORMAT_U_A8_R8_G8_B8,
-      PIPE_FORMAT_S_R16_G16_B16_A16,
-      PIPE_FORMAT_S8_Z24
+   switch( format ) {
+   case PIPE_FORMAT_U_A8_R8_G8_B8:
+   case PIPE_FORMAT_S_R16_G16_B16_A16:
+   case PIPE_FORMAT_S8_Z24:
+      return TRUE;
    };
-
-   *numFormats = sizeof(formats) / sizeof(formats[0]);
-
-   return formats;
+   return FALSE;
 }