r300-gallium: Fix RS.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 28 Feb 2009 07:40:18 +0000 (23:40 -0800)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 28 Feb 2009 16:14:35 +0000 (08:14 -0800)
I should just stop using "git stash" altogether.

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

index b3b8f494999d0f00537ea1643038759f747a38be..e0da9d361e43633edca6d9dc1fd9d9eb0da00f76 100644 (file)
@@ -1220,14 +1220,18 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define R500_RS_INST_14                                        0x4358
 #define R500_RS_INST_15                                        0x435c
 #define R500_RS_INST_TEX_ID_SHIFT                      0
+#        define R500_RS_INST_TEX_ID(x)                  ((x) << 0)
 #define R500_RS_INST_TEX_CN_WRITE                      (1 << 4)
 #define R500_RS_INST_TEX_ADDR_SHIFT                    5
+#        define R500_RS_INST_TEX_ADDR(x)                ((x) << 0)
 #define R500_RS_INST_COL_ID_SHIFT                      12
+#        define R500_RS_INST_COL_ID(x)                  ((x) << 12)
 #define R500_RS_INST_COL_CN_NO_WRITE                   (0 << 16)
 #define R500_RS_INST_COL_CN_WRITE                      (1 << 16)
 #define R500_RS_INST_COL_CN_WRITE_FBUFFER              (2 << 16)
 #define R500_RS_INST_COL_CN_WRITE_BACKFACE             (3 << 16)
 #define R500_RS_INST_COL_ADDR_SHIFT                    18
+#        define R500_RS_INST_COL_ADDR(x)                ((x) << 18)
 #define R500_RS_INST_TEX_ADJ                           (1 << 25)
 #define R500_RS_INST_W_CN                              (1 << 26)
 
index d17050e0d762f31a2a19f2fcb61f04fb39b311f0..5bf4f24b7a8156e71476921eadd70a0c36ed5341 100644 (file)
@@ -208,11 +208,10 @@ static void r300_update_rs_block(struct r300_context* r300)
                     break;
                 case INTERP_PERSPECTIVE:
                     rs->ip[tex_count] |=
-                        R500_RS_TEX_PTR(vinfo->attrib[i].src_index) |
-                        R500_RS_SEL_S(tex_count) |
-                        R500_RS_SEL_T(tex_count + 1) |
-                        R500_RS_SEL_R(tex_count + 2) |
-                        R500_RS_SEL_Q(tex_count + 3);
+                        R500_RS_SEL_S(vinfo->attrib[i].src_index) |
+                        R500_RS_SEL_T(vinfo->attrib[i].src_index + 1) |
+                        R500_RS_SEL_R(vinfo->attrib[i].src_index + 2) |
+                        R500_RS_SEL_Q(vinfo->attrib[i].src_index + 3);
                     tex_count++;
                     break;
             }