r300g: better describe another flush and move it closer to the real problem
[mesa.git] / src / gallium / drivers / r300 / r300_state_invariant.c
index 64d1d18b454629458fe7a8b8ea6709765ecfc546..34d3a169d574ea3fd150bc79af9c7eff984f4185 100644 (file)
 #include "r300_screen.h"
 #include "r300_state_invariant.h"
 
-struct pipe_viewport_state r300_viewport_identity = {
-    .scale = {1.0, 1.0, 1.0, 1.0},
-    .translate = {0.0, 0.0, 0.0, 0.0},
-};
-
 /* Calculate and emit invariant state. This is data that the 3D engine
  * will probably want at the beginning of every CS, but it's not currently
  * handled by any CSO setup, and in addition it doesn't really change much.
@@ -43,15 +38,17 @@ void r300_emit_invariant_state(struct r300_context* r300,
 {
     CS_LOCALS(r300);
 
+    if (r300->rws->get_value(r300->rws, R300_VID_DRM_2_3_0)) {
+        /* Subpixel multisampling for AA. */
+        BEGIN_CS(4);
+        OUT_CS_REG(R300_GB_MSPOS0, 0x66666666);
+        OUT_CS_REG(R300_GB_MSPOS1, 0x6666666);
+        END_CS;
+    }
+
     BEGIN_CS(12 + (r300->screen->caps.has_tcl ? 2 : 0));
 
     /*** Graphics Backend (GB) ***/
-    /* Subpixel multisampling for AA
-     * These are commented out because glisse's CS checker doesn't like them.
-     * I presume these will be re-enabled later.
-     * OUT_CS_REG(R300_GB_MSPOS0, 0x66666666);
-     * OUT_CS_REG(R300_GB_MSPOS1, 0x6666666);
-     */
     /* Source of fog depth */
     OUT_CS_REG(R300_GB_SELECT, R300_GB_FOG_SELECT_1_1_W);