svga: return 1 for PIPE_CAP_MIXED_COLORBUFFER_FORMATS
authorBrian Paul <brianp@vmware.com>
Tue, 26 Jun 2012 18:59:30 +0000 (12:59 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 26 Jun 2012 21:03:43 +0000 (15:03 -0600)
This is actually required for GL_ARB_framebuffer_object, but the state
tracker doesn't currently check it.
Direct3D 9 allows mixed format color buffers with some restrictions.
Setting this allows Unigine Heaven 2.5 and 3.0 to run.  Tested both on
GL and D3D hosts.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
src/gallium/drivers/svga/svga_screen.c

index b137e954a577939da9419d29aa962081f1d26667..0d8b1d20cf940bc02f4b5536c1f96bf87bb19a9e 100644 (file)
@@ -215,8 +215,10 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_FRAGMENT_COLOR_CLAMPED:
       return 0; /* The driver can't clamp fragment colors */
 
-   /* Unsupported features */
    case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
+      return 1; /* expected for GL_ARB_framebuffer_object */
+
+   /* Unsupported features */
    case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
    case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
    case PIPE_CAP_SM3: