diff options
author | Dave Airlie <airlied@linux.ie> | 2008-02-23 19:17:00 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2008-02-23 19:17:00 +1000 |
commit | d7cf6a8a697a2fb4da171a36968f65aa0f108b27 (patch) | |
tree | 1ddbbb5e34615d87bdb703d892661afa2fe4a02a /src | |
parent | df6e9e40a90dfe97e9b04582c3add598b612785d (diff) |
r300: fixup some more names
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_cmdbuf.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_ioctl.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_reg.h | 43 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_state.c | 6 |
4 files changed, 38 insertions, 27 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c index aee65fce48..a049e39505 100644 --- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c +++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c @@ -348,17 +348,17 @@ void r300InitCmdBuf(r300ContextPtr r300) ALLOC_STATE(unk4214, always, 2, 0); r300->hw.unk4214.cmd[0] = cmdpacket0(0x4214, 1); ALLOC_STATE(ps, always, R300_PS_CMDSIZE, 0); - r300->hw.ps.cmd[0] = cmdpacket0(R300_RE_POINTSIZE, 1); + r300->hw.ps.cmd[0] = cmdpacket0(R300_GA_POINT_SIZE, 1); ALLOC_STATE(unk4230, always, 4, 0); r300->hw.unk4230.cmd[0] = cmdpacket0(0x4230, 3); ALLOC_STATE(lcntl, always, 2, 0); - r300->hw.lcntl.cmd[0] = cmdpacket0(R300_RE_LINE_CNT, 1); + r300->hw.lcntl.cmd[0] = cmdpacket0(R300_GA_LINE_CNTL, 1); ALLOC_STATE(unk4260, always, 4, 0); r300->hw.unk4260.cmd[0] = cmdpacket0(0x4260, 3); ALLOC_STATE(shade, always, 5, 0); - r300->hw.shade.cmd[0] = cmdpacket0(R300_RE_SHADE, 4); + r300->hw.shade.cmd[0] = cmdpacket0(R300_GA_ENHANCE, 4); ALLOC_STATE(polygon_mode, always, 4, 0); - r300->hw.polygon_mode.cmd[0] = cmdpacket0(R300_RE_POLYGON_MODE, 3); + r300->hw.polygon_mode.cmd[0] = cmdpacket0(R300_GA_POLY_MODE, 3); ALLOC_STATE(fogp, always, 3, 0); r300->hw.fogp.cmd[0] = cmdpacket0(R300_RE_FOG_SCALE, 2); ALLOC_STATE(zbias_cntl, always, 2, 0); @@ -373,7 +373,7 @@ void r300InitCmdBuf(r300ContextPtr r300) ALLOC_STATE(unk42C0, always, 3, 0); r300->hw.unk42C0.cmd[0] = cmdpacket0(0x42C0, 2); ALLOC_STATE(rc, always, R300_RC_CMDSIZE, 0); - r300->hw.rc.cmd[R300_RC_CMD_0] = cmdpacket0(R300_RS_CNTL_0, 2); + r300->hw.rc.cmd[R300_RC_CMD_0] = cmdpacket0(R300_RS_COUNT, 2); ALLOC_STATE(ri, always, R300_RI_CMDSIZE, 0); r300->hw.ri.cmd[R300_RI_CMD_0] = cmdpacket0(R300_RS_INTERP_0, 8); ALLOC_STATE(rr, variable, R300_RR_CMDSIZE, 0); diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c index d4914c9cb6..7e586203e6 100644 --- a/src/mesa/drivers/dri/r300/r300_ioctl.c +++ b/src/mesa/drivers/dri/r300/r300_ioctl.c @@ -267,7 +267,7 @@ static void r300EmitClearState(GLcontext * ctx) } R300_STATECHANGE(r300, ps); - reg_start(R300_RE_POINTSIZE, 0); + reg_start(R300_GA_POINT_SIZE, 0); e32(((dPriv->w * 6) << R300_POINTSIZE_X_SHIFT) | ((dPriv->h * 6) << R300_POINTSIZE_Y_SHIFT)); @@ -279,8 +279,8 @@ static void r300EmitClearState(GLcontext * ctx) R300_STATECHANGE(r300, rc); /* The second constant is needed to get glxgears display anything .. */ - reg_start(R300_RS_CNTL_0, 1); - e32((1 << R300_RS_CNTL_CI_CNT_SHIFT) | R300_RS_CNTL_0_UNKNOWN_18); + reg_start(R300_RS_COUNT, 1); + e32((1 << R300_IC_COUNT_SHIFT) | R300_HIRES_EN); e32(0x0); R300_STATECHANGE(r300, rr); diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h index 13dc8cf4ce..bb497d3b92 100644 --- a/src/mesa/drivers/dri/r300/r300_reg.h +++ b/src/mesa/drivers/dri/r300/r300_reg.h @@ -582,11 +582,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. # define R500_TX_DIRECTION_HORIZONTAL (0<<27) # define R500_TX_DIRECTION_VERITCAL (1<<27) +#define R300_GA_TRIANGLE_STIPPLE 0x4214 /* The pointsize is given in multiples of 6. The pointsize can be * enormous: Clear() renders a single point that fills the entire * framebuffer. */ -#define R300_RE_POINTSIZE 0x421C +#define R300_GA_POINT_SIZE 0x421C # define R300_POINTSIZE_Y_SHIFT 0 # define R300_POINTSIZE_Y_MASK (0xFFFF << 0) /* GUESS */ # define R300_POINTSIZE_X_SHIFT 16 @@ -599,7 +600,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. * VE: vertical or horizontal * HO & VE: no classification */ -#define R300_RE_LINE_CNT 0x4234 +#define R300_GA_LINE_CNTL 0x4234 # define R300_LINESIZE_SHIFT 0 # define R300_LINESIZE_MASK (0xFFFF << 0) /* GUESS */ # define R300_LINESIZE_MAX (R300_LINESIZE_MASK / 6) @@ -607,17 +608,23 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. # define R300_LINE_CNT_VE (1 << 17) /* Some sort of scale or clamp value for texcoordless textures. */ -#define R300_RE_UNK4238 0x4238 +#define R300_GA_LINE_STIPPLE_CONFIG 0x4238 + +#define R500_GA_US_VECTOR_INDEX 0x4250 +#define R500_GA_US_VECTOR_DATA 0x4254 + /* Something shade related */ -#define R300_RE_SHADE 0x4274 +#define R300_GA_ENHANCE 0x4274 -#define R300_RE_SHADE_MODEL 0x4278 +#define R300_GA_COLOR_CONTROL 0x4278 # define R300_RE_SHADE_MODEL_SMOOTH 0x3aaaa # define R300_RE_SHADE_MODEL_FLAT 0x39595 +#define R300_GA_SOLID_RG 0x427c +#define R300_GA_SOLID_BA 0x4280 /* Dangerous */ -#define R300_RE_POLYGON_MODE 0x4288 +#define R300_GA_POLY_MODE 0x4288 # define R300_PM_ENABLED (1 << 0) # define R300_PM_FRONT_POINT (0 << 0) # define R300_PM_BACK_POINT (0 << 0) @@ -626,6 +633,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. # define R300_PM_BACK_LINE (1 << 7) # define R300_PM_BACK_FILL (1 << 8) +#define R300_GA_ROUND_MODE 0x428c /* Fog parameters */ #define R300_RE_FOG_SCALE 0x4294 #define R300_RE_FOG_START 0x4298 @@ -663,19 +671,22 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. /* BEGIN: Rasterization / Interpolators - many guesses */ -/* 0_UNKNOWN_18 has always been set except for clear operations. +/* * TC_CNT is the number of incoming texture coordinate sets (i.e. it depends * on the vertex program, *not* the fragment program) */ -#define R300_RS_CNTL_0 0x4300 -# define R300_RS_CNTL_TC_CNT_SHIFT 2 -# define R300_RS_CNTL_TC_CNT_MASK (7 << 2) - /* number of color interpolators used */ -# define R300_RS_CNTL_CI_CNT_SHIFT 7 -# define R300_RS_CNTL_0_UNKNOWN_18 (1 << 18) - /* Guess: RS_CNTL_1 holds the index of the highest used RS_ROUTE_n - register. */ -#define R300_RS_CNTL_1 0x4304 +#define R300_RS_COUNT 0x4300 +# define R300_IT_COUNT_SHIFT 0 +# define R300_IT_COUNT_MASK (0x7f << 0) +# define R300_IC_COUNT_SHIFT 7 +# define R300_IC_COUNT_MASK (0xf << 0) +# define R300_W_ADDR_SHIFT 12 +# define R300_W_ADDR_MASK (0x3f << 12) +# define R300_HIRES_EN (1<<18) + +#define R300_RS_INST_COUNT 0x4304 +# define R300_RS_INST_COUNT_MASK 0xf +# define R300_RS_TX_OFFSET_SHIFT 5 /* gap */ diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 2dbf7e0b2c..4596fbb9d2 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1500,9 +1500,9 @@ static void r300SetupRSUnit(GLcontext * ctx) col_interp_nr++; } - r300->hw.rc.cmd[1] = 0 | (in_texcoords << R300_RS_CNTL_TC_CNT_SHIFT) - | (col_interp_nr << R300_RS_CNTL_CI_CNT_SHIFT) - | R300_RS_CNTL_0_UNKNOWN_18; + r300->hw.rc.cmd[1] = 0 | ((in_texcoords << 2) << R300_IT_COUNT_SHIFT) + | (col_interp_nr << R300_IC_COUNT_SHIFT) + | R300_HIRES_EN; assert(high_rr >= 0); r300->hw.rr.cmd[R300_RR_CMD_0] = cmdpacket0(R300_RS_ROUTE_0, high_rr + 1); |