radeon: If the CS emit fails, dump it to stderr.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 4 Apr 2009 09:20:29 +0000 (02:20 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 4 Apr 2009 09:20:29 +0000 (02:20 -0700)
src/gallium/winsys/drm/radeon/core/radeon_r300.c

index ce03bf2260b886934b1113f1e1d8ac6de3da0877..293b6c2d389cf49f1646d2293b3d231112e54b44 100644 (file)
@@ -39,7 +39,13 @@ static void radeon_r300_write_cs_reloc(struct radeon_cs* cs,
 
 static void radeon_r300_flush_cs(struct radeon_cs* cs)
 {
-    radeon_cs_emit(cs);
+    int retval = 0;
+
+    retval = radeon_cs_emit(cs);
+    if (retval) {
+        debug_printf("radeon: Bad CS, dumping...\n");
+        radeon_cs_print(cs, stderr);
+    }
     radeon_cs_erase(cs);
 }