nv50: report some supported formats to keep the state tracker from asserting.
authorBen Skeggs <skeggsb@gmail.com>
Mon, 5 May 2008 09:49:06 +0000 (19:49 +1000)
committerBen Skeggs <skeggsb@gmail.com>
Tue, 13 May 2008 02:00:14 +0000 (12:00 +1000)
src/gallium/drivers/nv50/nv50_screen.c

index 4902f16de3abe2bdf7ff138a363db5e668bb5c7a..e4ca72c717123ecade6bbd5386cd4e063e86f574 100644 (file)
@@ -14,6 +14,30 @@ static boolean
 nv50_screen_is_format_supported(struct pipe_screen *pscreen,
                                enum pipe_format format, uint type)
 {
+       switch (type) {
+       case PIPE_SURFACE:
+               switch (format) {
+               case PIPE_FORMAT_A8R8G8B8_UNORM:
+               case PIPE_FORMAT_R5G6B5_UNORM:
+               case PIPE_FORMAT_Z24S8_UNORM:
+               case PIPE_FORMAT_Z16_UNORM:
+                       return TRUE;
+               default:
+                       break;
+               }
+               break;
+       case PIPE_TEXTURE:
+               switch (format) {
+               case PIPE_FORMAT_I8_UNORM:
+                       return TRUE;
+               default:
+                       break;
+               }
+               break;
+       default:
+               assert(0);
+       }
+
        return FALSE;
 }