mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
r300: finish conversion of RS_INST regs
This commit is contained in:
parent
a9802328cd
commit
6054788f36
3 changed files with 6 additions and 22 deletions
|
|
@ -285,7 +285,7 @@ static void r300EmitClearState(GLcontext * ctx)
|
|||
|
||||
R300_STATECHANGE(r300, rr);
|
||||
reg_start(R300_RS_INST_0, 0);
|
||||
e32(R300_RS_ROUTE_0_COLOR);
|
||||
e32(R300_RS_INST_COL_CN_WRITE);
|
||||
|
||||
R300_STATECHANGE(r300, fp);
|
||||
reg_start(R300_PFS_CNTL_0, 2);
|
||||
|
|
|
|||
|
|
@ -1175,7 +1175,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#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_COL_ADDR_SHIFT 18
|
||||
#define R500_RS_INST_COL_ADDR_SHIFT 18
|
||||
#define R500_RS_INST_TEX_ADJ (1 << 25)
|
||||
#define R500_RS_INST_W_CN (1 << 26)
|
||||
|
||||
|
|
@ -1194,27 +1194,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
# define R300_RS_INST_TEX_CN_WRITE (1 << 3)
|
||||
# define R300_RS_INST_TEX_ADDR_SHIFT 6
|
||||
# define R300_RS_INST_COL_ID(x) ((x) << 11)
|
||||
# define R300_RS_INST_COL_CN_WRITE (1 << 14)
|
||||
# define R300_RS_INST_COL_ADDR_SHIFT 17
|
||||
# define R300_RS_INST_TEX_ADJ (1 << 22)
|
||||
# define R300_RS_COL_BIAS_UNUSED_SHIFT 23
|
||||
|
||||
/* Special handling for color: When the fragment program uses color,
|
||||
* the ROUTE_0_COLOR bit is set and ROUTE_0_COLOR_DEST contains the
|
||||
* color register index.
|
||||
*
|
||||
* Apperently you may set the R300_RS_ROUTE_0_COLOR bit, but not provide any
|
||||
* R300_RS_ROUTE_0_COLOR_DEST value; this setup is used for clearing the state.
|
||||
* See r300_ioctl.c:r300EmitClearState. I'm not sure if this setup is strictly
|
||||
* correct or not. - Oliver.
|
||||
*/
|
||||
# define R300_RS_ROUTE_0_COLOR (1 << 14)
|
||||
# define R300_RS_ROUTE_0_COLOR_DEST_SHIFT 17
|
||||
# define R300_RS_ROUTE_0_COLOR_DEST_MASK (31 << 17) /* GUESS */
|
||||
/* As above, but for secondary color */
|
||||
# define R300_RS_ROUTE_1_COLOR1 (1 << 14)
|
||||
# define R300_RS_ROUTE_1_COLOR1_DEST_SHIFT 17
|
||||
# define R300_RS_ROUTE_1_COLOR1_DEST_MASK (31 << 17)
|
||||
# define R300_RS_ROUTE_1_UNKNOWN11 (1 << 11)
|
||||
/* END: Rasterization / Interpolators - many guesses */
|
||||
|
||||
/* Hierarchical Z Enable */
|
||||
|
|
|
|||
|
|
@ -1565,7 +1565,7 @@ static void r300SetupRSUnit(GLcontext * ctx)
|
|||
|
||||
if (InputsRead & FRAG_BIT_COL0) {
|
||||
if (R300_OUTPUTS_WRITTEN_TEST(OutputsWritten, VERT_RESULT_COL0, _TNL_ATTRIB_COLOR0)) {
|
||||
r300->hw.rr.cmd[R300_RR_INST_0] |= 0 | R300_RS_ROUTE_0_COLOR | (fp_reg++ << R300_RS_ROUTE_0_COLOR_DEST_SHIFT);
|
||||
r300->hw.rr.cmd[R300_RR_INST_0] |= R300_RS_INST_COL_ID(0) | R300_RS_INST_COL_CN_WRITE | (fp_reg++ << R300_RS_INST_COL_ADDR_SHIFT);
|
||||
InputsRead &= ~FRAG_BIT_COL0;
|
||||
col_interp_nr++;
|
||||
} else {
|
||||
|
|
@ -1575,7 +1575,7 @@ static void r300SetupRSUnit(GLcontext * ctx)
|
|||
|
||||
if (InputsRead & FRAG_BIT_COL1) {
|
||||
if (R300_OUTPUTS_WRITTEN_TEST(OutputsWritten, VERT_RESULT_COL1, _TNL_ATTRIB_COLOR1)) {
|
||||
r300->hw.rr.cmd[R300_RR_INST_1] |= R300_RS_ROUTE_1_UNKNOWN11 | R300_RS_ROUTE_1_COLOR1 | (fp_reg++ << R300_RS_ROUTE_1_COLOR1_DEST_SHIFT);
|
||||
r300->hw.rr.cmd[R300_RR_INST_1] |= R300_RS_INST_COL_ID(1) | R300_RS_INST_COL_CN_WRITE | (fp_reg++ << R300_RS_INST_COL_ADDR_SHIFT);
|
||||
InputsRead &= ~FRAG_BIT_COL1;
|
||||
if (high_rr < 1)
|
||||
high_rr = 1;
|
||||
|
|
@ -1587,7 +1587,7 @@ static void r300SetupRSUnit(GLcontext * ctx)
|
|||
|
||||
/* Need at least one. This might still lock as the values are undefined... */
|
||||
if (in_texcoords == 0 && col_interp_nr == 0) {
|
||||
r300->hw.rr.cmd[R300_RR_INST_0] |= 0 | R300_RS_ROUTE_0_COLOR | (fp_reg++ << R300_RS_ROUTE_0_COLOR_DEST_SHIFT);
|
||||
r300->hw.rr.cmd[R300_RR_INST_0] |= R300_RS_INST_COL_ID(0) | R300_RS_INST_COL_CN_WRITE | (fp_reg++ << R300_RS_INST_COL_ADDR_SHIFT);
|
||||
col_interp_nr++;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue