r300-gallium: Actually do framebuffer setup.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Fri, 6 Mar 2009 22:13:21 +0000 (14:13 -0800)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 7 Mar 2009 03:07:53 +0000 (19:07 -0800)
Can't believe this wasn't wired up.

src/gallium/drivers/r300/r300_emit.c

index 86325f675be180a1e6e72510c3cf5e32e062e37c..4e82c322df1a074bc3f53bd1f72479755d507d4b 100644 (file)
@@ -152,7 +152,7 @@ uint32_t translate_out_fmt(enum pipe_format format)
     return 0;
 }
 
-/* XXX add pitch, stride */
+/* XXX add pitch, stride, clean up */
 void r300_emit_fb_state(struct r300_context* r300,
                         struct pipe_framebuffer_state* fb)
 {
@@ -324,6 +324,11 @@ void r300_emit_dirty_state(struct r300_context* r300)
         r300->dirty_state &= ~R300_NEW_FRAGMENT_SHADER;
     }
 
+    if (r300->dirty_state & R300_NEW_FRAMEBUFFERS) {
+        r300_emit_fb_state(r300, &r300->framebuffer_state);
+        r300->dirty_state &= ~R300_NEW_FRAMEBUFFERS;
+    }
+
     if (r300->dirty_state & R300_NEW_RASTERIZER) {
         r300_emit_rs_state(r300, r300->rs_state);
         r300->dirty_state &= ~R300_NEW_RASTERIZER;