r300-gallium: Ooops, forgot to apply this stash.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Mon, 16 Feb 2009 11:13:16 +0000 (03:13 -0800)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Mon, 16 Feb 2009 11:16:59 +0000 (03:16 -0800)
"git stash": The cause of, and solution to, all my problems.

src/gallium/drivers/r300/r300_state_derived.c
src/gallium/drivers/r300/r300_state_derived.h

index fc2730d4c6065f84fb45cc8c1032dec68a2a621a..df19f20fc8f4a3f40c458ac4620a51107d2c8df1 100644 (file)
@@ -107,8 +107,28 @@ static void r300_update_vertex_layout(struct r300_context* r300)
         vinfo.hwfmt[1] |= (4 << (3 * i));
     }
 
+    draw_compute_vertex_size(&vinfo);
+
     if (memcmp(&r300->vertex_info, &vinfo, sizeof(struct vertex_info))) {
         memcpy(&r300->vertex_info, &vinfo, sizeof(struct vertex_info));
         r300->dirty_state |= R300_NEW_VERTEX_FORMAT;
     }
 }
+
+/* Set up the RS block. This is the part of the chipset that actually does
+ * the rasterization of vertices into fragments. This is also the part of the
+ * chipset that locks up if any part of it is even slightly wrong. */
+void r300_update_rs_block(struct r300_context* r300)
+{
+}
+
+void r300_update_derived_state(struct r300_context* r300)
+{
+    if (r300->dirty_state & R300_NEW_FRAGMENT_SHADER) {
+        r300_update_vertex_layout(r300);
+    }
+
+    if (r300->dirty_state & R300_NEW_VERTEX_FORMAT) {
+        r300_update_rs_block(r300);
+    }
+}
index 11d0787d127561e0ebc9f6aa2d48385714d58975..72ba6b928d6ea93df885ba6c71b13faf8893bc73 100644 (file)
@@ -28,4 +28,6 @@
 #include "r300_context.h"
 #include "r300_reg.h"
 
+void r300_update_derived_state(struct r300_context* r300);
+
 #endif /* R300_STATE_DERIVED_H */