diff options
author | Oliver McFadden <z3ro.geek@gmail.com> | 2007-05-27 02:25:31 +0000 |
---|---|---|
committer | Oliver McFadden <z3ro.geek@gmail.com> | 2007-05-27 02:25:31 +0000 |
commit | 1fc08251eece0cd1d859592ab03e775e971dca63 (patch) | |
tree | 6627f5021801b78001a6fe4eff6c02de9b769f0e | |
parent | d42c8ab630af1ee7a153823f23a46a0e05c01019 (diff) |
Revert "r300: Removed the R300_RS_INTERP_[0-9]_UNKNOWN (magic) defines."
This reverts commit bb3558e6517209086cf8426bbe4743da50351158.
This commit caused a regression reported by Markus Amsler
<markus.amsler@oribi.org>. Apparently these defines are required, although I'm
not sure why.
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_reg.h | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_state.c | 14 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h index 9356c48b8d..f98af8e1d2 100644 --- a/src/mesa/drivers/dri/r300/r300_reg.h +++ b/src/mesa/drivers/dri/r300/r300_reg.h @@ -628,11 +628,17 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. * Set INTERP_USED on all interpolators that produce data used by * the fragment program. INTERP_USED looks like a swizzling mask, * but I haven't seen it used that way. + * + * Note: The _UNKNOWN constants are always set in their respective + * register. I don't know if this is necessary. */ #define R300_RS_INTERP_0 0x4310 #define R300_RS_INTERP_1 0x4314 +# define R300_RS_INTERP_1_UNKNOWN 0x40 #define R300_RS_INTERP_2 0x4318 +# define R300_RS_INTERP_2_UNKNOWN 0x80 #define R300_RS_INTERP_3 0x431C +# define R300_RS_INTERP_3_UNKNOWN 0xC0 #define R300_RS_INTERP_4 0x4320 #define R300_RS_INTERP_5 0x4324 #define R300_RS_INTERP_6 0x4328 diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 22d780a096..a9b20622e4 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1354,6 +1354,17 @@ union r300_outputs_written { static void r300SetupRSUnit(GLcontext * ctx) { r300ContextPtr r300 = R300_CONTEXT(ctx); + /* I'm still unsure if these are needed */ + GLuint interp_magic[8] = { + 0x00, + R300_RS_INTERP_1_UNKNOWN, + R300_RS_INTERP_2_UNKNOWN, + R300_RS_INTERP_3_UNKNOWN, + 0x00, + 0x00, + 0x00, + 0x00 + }; union r300_outputs_written OutputsWritten; GLuint InputsRead; int fp_reg, high_rr; @@ -1399,7 +1410,8 @@ static void r300SetupRSUnit(GLcontext * ctx) for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { r300->hw.ri.cmd[R300_RI_INTERP_0 + i] = 0 | R300_RS_INTERP_USED - | (in_texcoords << R300_RS_INTERP_SRC_SHIFT); + | (in_texcoords << R300_RS_INTERP_SRC_SHIFT) + | interp_magic[i]; r300->hw.rr.cmd[R300_RR_ROUTE_0 + fp_reg] = 0; if (InputsRead & (FRAG_BIT_TEX0 << i)) { |