diff options
author | David Heidelberg <[email protected]> | 2014-12-28 01:11:14 +0100 |
---|---|---|
committer | David Heidelberg <[email protected]> | 2015-02-06 18:27:30 +0100 |
commit | bae23a1756c361dd74b97be6c9d4762bca4ca81a (patch) | |
tree | f4d2db1d517f876b1270edf8a8b1796005907e32 /src/gallium | |
parent | 71a36e0a2c0f301aa83989dc4ade700a9751493d (diff) |
r300g: small code cleanup (v2)
v2: incorporated changes from Marek Olšák
Reviewed-by: Marek Olšák <[email protected]>
Signed-off-by: David Heidelberg <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r300/r300_reg.h | 22 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_screen.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_state_inlines.h | 1 |
4 files changed, 4 insertions, 26 deletions
diff --git a/src/gallium/drivers/r300/r300_reg.h b/src/gallium/drivers/r300/r300_reg.h index 46aeba0b040..8a0728d9430 100644 --- a/src/gallium/drivers/r300/r300_reg.h +++ b/src/gallium/drivers/r300/r300_reg.h @@ -191,7 +191,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. # define R300_VAP_TCL_BYPASS (1 << 8) /* Read only flag if TCL engine is busy. */ # define R300_VAP_PVS_BUSY (1 << 11) -/* TODO: gap for MAX_MPS */ /* Read only flag if the vertex store is busy. */ # define R300_VAP_VS_BUSY (1 << 24) /* Read only flag if the reciprocal engine is busy. */ @@ -921,9 +920,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. * * The line width is given in multiples of 6. * In default mode lines are classified as vertical lines. - * HO: horizontal - * VE: vertical or horizontal - * HO & VE: no classification */ #define R300_GA_LINE_CNTL 0x4234 # define R300_GA_LINE_CNTL_WIDTH_SHIFT 0 @@ -934,12 +930,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. # define R300_GA_LINE_CNTL_END_TYPE_COMP (3 << 16) /* Computed (perpendicular to slope) */ # define R500_GA_LINE_CNTL_SORT_NO (0 << 18) # define R500_GA_LINE_CNTL_SORT_MINX_MINY (1 << 18) -/** TODO: looks wrong */ -# define R300_LINESIZE_MAX (R300_GA_LINE_CNTL_WIDTH_MASK / 6) -/** TODO: looks wrong */ -# define R300_LINE_CNT_HO (1 << 16) -/** TODO: looks wrong */ -# define R300_LINE_CNT_VE (1 << 17) /* Line Stipple configuration information. */ #define R300_GA_LINE_STIPPLE_CONFIG 0x4238 @@ -1278,8 +1268,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define R300_RS_IP_1 0x4314 #define R300_RS_IP_2 0x4318 #define R300_RS_IP_3 0x431C -# define R300_RS_INTERP_SRC_SHIFT 2 /* TODO: check for removal */ -# define R300_RS_INTERP_SRC_MASK (7 << 2) /* TODO: check for removal */ # define R300_RS_TEX_PTR(x) (x << 0) # define R300_RS_COL_PTR(x) ((x) << 6) # define R300_RS_COL_FMT(x) ((x) << 9) @@ -3300,7 +3288,7 @@ enum { # define R500_INST_ALPHA_PRED_SEL_GGGG (3 << 25) # define R500_INST_ALPHA_PRED_SEL_BBBB (4 << 25) # define R500_INST_ALPHA_PRED_SEL_AAAA (5 << 25) -/* XXX next four are kind of guessed */ +/* Next four are guessed, documentation doesn't mention order. */ # define R500_INST_STAT_WE_R (1 << 28) # define R500_INST_STAT_WE_G (1 << 29) # define R500_INST_STAT_WE_B (1 << 30) @@ -3546,19 +3534,13 @@ enum { /* * CP type-3 packets */ -#define R300_CP_CMD_BITBLT_MULTI 0xC0009B00 - -/* XXX Corbin's stuff from radeon and r200 */ - #define RADEON_WAIT_UNTIL 0x1720 # define RADEON_WAIT_CRTC_PFLIP (1 << 0) # define RADEON_WAIT_2D_IDLECLEAN (1 << 16) # define RADEON_WAIT_3D_IDLECLEAN (1 << 17) # define RADEON_WAIT_HOST_IDLECLEAN (1 << 18) -#define R200_3D_DRAW_IMMD_2 0xC0003500 - -#define RADEON_CP_PACKET0 0x0 /* XXX stolen from radeon_reg.h */ +#define RADEON_CP_PACKET0 0x00000000 #define RADEON_CP_PACKET3 0xC0000000 #define RADEON_ONE_REG_WR (1 << 15) diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 640d54723bf..7794fc26cd9 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -271,7 +271,7 @@ static int r300_get_shader_param(struct pipe_screen *pscreen, unsigned shader, e case PIPE_SHADER_CAP_MAX_TEMPS: return is_r500 ? 128 : is_r400 ? 64 : 32; case PIPE_SHADER_CAP_MAX_PREDS: - return is_r500 ? 1 : 0; + return 0; /* unused */ case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS: return r300screen->caps.num_tex_units; @@ -321,7 +321,7 @@ static int r300_get_shader_param(struct pipe_screen *pscreen, unsigned shader, e case PIPE_SHADER_CAP_MAX_TEMPS: return 32; case PIPE_SHADER_CAP_MAX_PREDS: - return is_r500 ? 4 : 0; /* XXX guessed. */ + return 0; /* unused */ case PIPE_SHADER_CAP_INDIRECT_CONST_ADDR: return 1; case PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS: @@ -372,8 +372,6 @@ static float r300_get_paramf(struct pipe_screen* pscreen, case PIPE_CAPF_GUARD_BAND_TOP: case PIPE_CAPF_GUARD_BAND_RIGHT: case PIPE_CAPF_GUARD_BAND_BOTTOM: - /* XXX I don't know what these should be but the least we can do is - * silence the potential error message */ return 0.0f; default: debug_printf("r300: Warning: Unknown CAP %d in get_paramf.\n", diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 6ce03293e94..e886df87a60 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -1156,7 +1156,6 @@ static void r300_delete_fs_state(struct pipe_context* pipe, void* shader) static void r300_set_polygon_stipple(struct pipe_context* pipe, const struct pipe_poly_stipple* state) { - /* XXX no idea how to set this up, but not terribly important */ } /* Create a new rasterizer state based on the CSO rasterizer state. diff --git a/src/gallium/drivers/r300/r300_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h index 97619dbd2ba..feec494c4dc 100644 --- a/src/gallium/drivers/r300/r300_state_inlines.h +++ b/src/gallium/drivers/r300/r300_state_inlines.h @@ -60,7 +60,6 @@ static INLINE uint32_t r300_translate_blend_function(int blend_func, return 0; } -/* XXX we can also offer the D3D versions of some of these... */ static INLINE uint32_t r300_translate_blend_factor(int blend_fact) { switch (blend_fact) { |