r300-gallium: Die on bad texture formats.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 16 May 2009 18:17:05 +0000 (11:17 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 16 May 2009 18:17:05 +0000 (11:17 -0700)
Odds are good that we'll die later anyway, so we might as well do it before
we start dancing on random memory.

src/gallium/drivers/r300/r300_screen.c

index ab095028fbc11b1d18aa19b68f9e8c1f080fc8ab..6fe724cc92317570db66eac2d1b6a91ce2871f34 100644 (file)
@@ -232,9 +232,16 @@ static boolean r300_is_format_supported(struct pipe_screen* pscreen,
         case PIPE_TEXTURE_2D:
             return check_tex_2d_format(format,
                 r300_screen(pscreen)->caps->is_r500);
+        case PIPE_TEXTURE_1D:
+        case PIPE_TEXTURE_3D:
+        case PIPE_TEXTURE_CUBE:
+            debug_printf("r300: Implementation error: Unsupported format "
+                    "target: %d\n", target);
+            break;
         default:
-            debug_printf("r300: Warning: Got unknown format target: %d\n",
-                format);
+            debug_printf("r300: Fatal: This is not a format target: %d\n",
+                target);
+            assert(0);
             break;
     }