r300-gallium: Unbreak fallback in surface_fill.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Tue, 10 Mar 2009 07:55:26 +0000 (00:55 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Tue, 10 Mar 2009 07:57:32 +0000 (00:57 -0700)
src/gallium/drivers/r300/r300_surface.c

index b607b98a024571ed29b06086ff5c6921ce188c1e..938a521b87770154aaf7c27cb458eccee36bdc42 100644 (file)
@@ -47,14 +47,11 @@ static void r300_surface_fill(struct pipe_context* pipe,
         dest, x, y, w, h, pixpitch, color);
 
     /* Fallback? */
-    /*if (0) {
+    if (tex->tex.format != PIPE_FORMAT_A8R8G8B8_UNORM) {
         debug_printf("r300: Falling back on surface clear...");
-        void* map = pipe->screen->surface_map(pipe->screen, dest,
-            PIPE_BUFFER_USAGE_CPU_WRITE);
-        pipe_fill_rect(map, &dest->block, &dest->stride, x, y, w, h, color);
-        pipe->screen->surface_unmap(pipe->screen, dest);
+        util_surface_fill(pipe, dest, x, y, w, h, color);
         return;
-    }*/
+    }
 
     r300_emit_invariant_state(r300);