diff options
author | Michel Dänzer <[email protected]> | 2014-05-14 16:30:33 +0900 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2014-05-14 22:53:30 +0900 |
commit | c5828b0599a5c00ebab488b795c63a21f1dc53cd (patch) | |
tree | 38629d59d7056a7f7dd2e7ff9e60fa1ccb47c3f4 /src/gallium/drivers/radeonsi | |
parent | 12d97fb7c100059d9aa37e1b6331ee1cfe977aa6 (diff) |
radeonsi: Fix anisotropic filtering state setup
Bring it back in line with r600g. I broke this in the original radeonsi
bringup. :(
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78537
Cc: "10.1 10.2" <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index a98be24897b..e3b72c25c31 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2601,16 +2601,15 @@ static void *si_create_sampler_state(struct pipe_context *ctx, rstate->val[0] = (S_008F30_CLAMP_X(si_tex_wrap(state->wrap_s)) | S_008F30_CLAMP_Y(si_tex_wrap(state->wrap_t)) | S_008F30_CLAMP_Z(si_tex_wrap(state->wrap_r)) | - (state->max_anisotropy & 0x7) << 9 | /* XXX */ + r600_tex_aniso_filter(state->max_anisotropy) << 9 | S_008F30_DEPTH_COMPARE_FUNC(si_tex_compare(state->compare_func)) | S_008F30_FORCE_UNNORMALIZED(!state->normalized_coords) | - aniso_flag_offset << 16 | /* XXX */ S_008F30_DISABLE_CUBE_WRAP(!state->seamless_cube_map)); rstate->val[1] = (S_008F34_MIN_LOD(S_FIXED(CLAMP(state->min_lod, 0, 15), 8)) | S_008F34_MAX_LOD(S_FIXED(CLAMP(state->max_lod, 0, 15), 8))); rstate->val[2] = (S_008F38_LOD_BIAS(S_FIXED(CLAMP(state->lod_bias, -16, 16), 8)) | - S_008F38_XY_MAG_FILTER(si_tex_filter(state->mag_img_filter)) | - S_008F38_XY_MIN_FILTER(si_tex_filter(state->min_img_filter)) | + S_008F38_XY_MAG_FILTER(si_tex_filter(state->mag_img_filter) | aniso_flag_offset) | + S_008F38_XY_MIN_FILTER(si_tex_filter(state->min_img_filter) | aniso_flag_offset) | S_008F38_MIP_FILTER(si_tex_mipfilter(state->min_mip_filter))); rstate->val[3] = S_008F3C_BORDER_COLOR_TYPE(border_color_type); |