diff options
author | Marek Olšák <[email protected]> | 2012-02-21 20:24:34 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-02-23 20:29:56 +0100 |
commit | 5b84a8c3c3f85cd6b109861c6eebe3ece29d664e (patch) | |
tree | 9228d7bfa6f1a3133515ac34cabb526f29303b97 /src | |
parent | 89293287b8f1a24c1405750007ca20bd32e02eab (diff) |
r600g: cleanup magic numbers in set_xx_sampler
Reviewed-by: Jerome Glisse <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_hw_context.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_hw_context.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/r600/evergreen_hw_context.c b/src/gallium/drivers/r600/evergreen_hw_context.c index 989473b6ff5..0bc28632e09 100644 --- a/src/gallium/drivers/r600/evergreen_hw_context.c +++ b/src/gallium/drivers/r600/evergreen_hw_context.c @@ -820,7 +820,7 @@ void evergreen_context_pipe_state_set_ps_sampler(struct r600_context *ctx, struc { unsigned offset; - offset = 0x0003C000 + id * 0xc; + offset = R_03C000_SQ_TEX_SAMPLER_WORD0_0 + 12*id; r600_context_pipe_state_set_sampler(ctx, state, offset); evergreen_context_pipe_state_set_sampler_border(ctx, state, R_00A400_TD_PS_SAMPLER0_BORDER_INDEX, id); } @@ -829,7 +829,7 @@ void evergreen_context_pipe_state_set_vs_sampler(struct r600_context *ctx, struc { unsigned offset; - offset = 0x0003C0D8 + id * 0xc; + offset = R_03C000_SQ_TEX_SAMPLER_WORD0_0 + 12*(id + 18); r600_context_pipe_state_set_sampler(ctx, state, offset); evergreen_context_pipe_state_set_sampler_border(ctx, state, R_00A414_TD_VS_SAMPLER0_BORDER_INDEX, id); } diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c index 526b02afbf0..c1fa9db08a0 100644 --- a/src/gallium/drivers/r600/r600_hw_context.c +++ b/src/gallium/drivers/r600/r600_hw_context.c @@ -1059,9 +1059,9 @@ void r600_context_pipe_state_set_ps_sampler(struct r600_context *ctx, struct r60 { unsigned offset; - offset = 0x0003C000 + id * 0xc; + offset = R_03C000_SQ_TEX_SAMPLER_WORD0_0 + 12*id; r600_context_pipe_state_set_sampler(ctx, state, offset); - offset = 0x0000A400 + id * 0x10; + offset = R_00A400_TD_PS_SAMPLER0_BORDER_RED + 16*id; r600_context_pipe_state_set_sampler_border(ctx, state, offset); } @@ -1069,9 +1069,9 @@ void r600_context_pipe_state_set_vs_sampler(struct r600_context *ctx, struct r60 { unsigned offset; - offset = 0x0003C0D8 + id * 0xc; + offset = R_03C000_SQ_TEX_SAMPLER_WORD0_0 + 12*(id + 18); r600_context_pipe_state_set_sampler(ctx, state, offset); - offset = 0x0000A600 + id * 0x10; + offset = R_00A600_TD_VS_SAMPLER0_BORDER_RED + 16*id; r600_context_pipe_state_set_sampler_border(ctx, state, offset); } |