r600g: add evergreen texture border support to new path
authorDave Airlie <airlied@redhat.com>
Tue, 28 Sep 2010 23:10:01 +0000 (09:10 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 28 Sep 2010 23:19:22 +0000 (09:19 +1000)
src/gallium/drivers/r600/evergreen_state.c

index 0803a5768c05f565506aa33ededdfb867693525a..b9fadabd15ebb3917a785ae902d9c307756b9ed3 100644 (file)
@@ -367,7 +367,10 @@ static void *evergreen_create_sampler_state(struct pipe_context *ctx,
                                0xFFFFFFFF, NULL);
 
        if (uc.ui) {
-               /* TODO border color */
+               r600_pipe_state_add_reg(rstate, EVERGREEN_GROUP_SAMPLER_BORDER, R_00A404_TD_PS_SAMPLER0_BORDER_RED, fui(state->border_color[0]), 0xFFFFFFFF, NULL);
+               r600_pipe_state_add_reg(rstate, EVERGREEN_GROUP_SAMPLER_BORDER, R_00A408_TD_PS_SAMPLER0_BORDER_GREEN, fui(state->border_color[1]), 0xFFFFFFFF, NULL);
+               r600_pipe_state_add_reg(rstate, EVERGREEN_GROUP_SAMPLER_BORDER, R_00A40C_TD_PS_SAMPLER0_BORDER_BLUE, fui(state->border_color[2]), 0xFFFFFFFF, NULL);
+               r600_pipe_state_add_reg(rstate, EVERGREEN_GROUP_SAMPLER_BORDER, R_00A410_TD_PS_SAMPLER0_BORDER_ALPHA, fui(state->border_color[3]), 0xFFFFFFFF, NULL);
        }
        return rstate;
 }