diff options
author | Marek Olšák <[email protected]> | 2015-08-30 13:17:15 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-09-01 21:51:15 +0200 |
commit | 5e2619ef3078fe4f9c3e0780ee520fbfb727ee54 (patch) | |
tree | b7d303ac73ee3646aebfce2f024ea63a20f53ed9 /src/gallium/drivers/radeonsi | |
parent | fbbebeae10f85e6fe9b81cf4187b8eb8ecba6da5 (diff) |
radeonsi: use all built-in border colors
Reviewed-by: Alex Deucher <[email protected]>
Acked-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 7f4e846cd16..52fa8fec033 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2709,10 +2709,25 @@ static void *si_create_sampler_state(struct pipe_context *ctx, return NULL; } - if (sampler_state_needs_border_color(state)) - border_color_type = V_008F3C_SQ_TEX_BORDER_COLOR_REGISTER; - else + if (!sampler_state_needs_border_color(state)) + border_color_type = V_008F3C_SQ_TEX_BORDER_COLOR_TRANS_BLACK; + else if (state->border_color.f[0] == 0 && + state->border_color.f[1] == 0 && + state->border_color.f[2] == 0 && + state->border_color.f[3] == 0) border_color_type = V_008F3C_SQ_TEX_BORDER_COLOR_TRANS_BLACK; + else if (state->border_color.f[0] == 0 && + state->border_color.f[1] == 0 && + state->border_color.f[2] == 0 && + state->border_color.f[3] == 1) + border_color_type = V_008F3C_SQ_TEX_BORDER_COLOR_OPAQUE_BLACK; + else if (state->border_color.f[0] == 1 && + state->border_color.f[1] == 1 && + state->border_color.f[2] == 1 && + state->border_color.f[3] == 1) + border_color_type = V_008F3C_SQ_TEX_BORDER_COLOR_OPAQUE_WHITE; + else + border_color_type = V_008F3C_SQ_TEX_BORDER_COLOR_REGISTER; rstate->val[0] = (S_008F30_CLAMP_X(si_tex_wrap(state->wrap_s)) | S_008F30_CLAMP_Y(si_tex_wrap(state->wrap_t)) | |