r300g: Don't multisample non-32-bpp render targets.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 16 Jun 2010 17:51:04 +0000 (10:51 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 16 Jun 2010 17:54:09 +0000 (10:54 -0700)
src/gallium/drivers/r300/r300_screen.c

index c599f76e5648d7bd93607a70d0fec54cfd4473cf..8f7c96b829c967ac96f4503e024fd2e0423bd3c9 100644 (file)
@@ -278,10 +278,16 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
     switch (sample_count) {
         case 0:
         case 1:
+            break;
         case 2:
         case 3:
         case 4:
         case 6:
+            if (usage != PIPE_BIND_RENDER_TARGET ||
+                !util_format_is_rgba8_variant(
+                    util_format_description(format))) {
+                return FALSE;
+            }
             break;
         default:
             return FALSE;