st/vega: Require both depth and stencil.
authorChia-I Wu <olv@lunarg.com>
Sat, 10 Apr 2010 17:14:42 +0000 (01:14 +0800)
committerChia-I Wu <olv@lunarg.com>
Sat, 10 Apr 2010 17:17:47 +0000 (01:17 +0800)
The implementation requires not only a depth buffer, but also a stencil
buffer.

src/gallium/state_trackers/vega/vg_manager.c

index 256c23775e0a9cd7c5422ee0595861694b5a7d52..19a3405360fa3c74545c0e6039ffd4cfe7416fca 100644 (file)
@@ -32,6 +32,7 @@
 #include "pipe/p_screen.h"
 #include "util/u_memory.h"
 #include "util/u_inlines.h"
+#include "util/u_format.h"
 
 #include "vg_manager.h"
 #include "vg_context.h"
@@ -332,10 +333,7 @@ vg_api_is_visual_supported(struct st_api *stapi,
                            const struct st_visual *visual)
 {
    /* the impl requires a depth/stencil buffer */
-   if (visual->depth_stencil_format == PIPE_FORMAT_NONE)
-      return FALSE;
-
-   return TRUE;
+   return util_format_is_depth_and_stencil(visual->depth_stencil_format);
 }
 
 static st_proc_t