diff options
author | Christian König <[email protected]> | 2012-07-17 14:52:08 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2012-07-24 12:29:29 +0200 |
commit | 9cbbe0d4e6a7deb01ff580eb3c49763f9f1d94d9 (patch) | |
tree | ec5f8f10f89d48faacf683f7947580ae0cc6852e /src/gallium/drivers/radeonsi/si_state.c | |
parent | 0a091a48242513e53a99976239405e8cb72d96be (diff) |
radeonsi: move clip state to new handling
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 51ee5c593d0..9e52f869579 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -193,10 +193,35 @@ static void si_set_blend_color(struct pipe_context *ctx, si_pm4_set_state(rctx, blend_color, pm4); } +static void si_set_clip_state(struct pipe_context *ctx, + const struct pipe_clip_state *state) +{ + struct r600_context *rctx = (struct r600_context *)ctx; + struct si_pm4_state *pm4 = CALLOC_STRUCT(si_pm4_state); + + if (pm4 == NULL) + return; + + for (int i = 0; i < 6; i++) { + si_pm4_set_reg(pm4, R_0285BC_PA_CL_UCP_0_X + i * 16, + fui(state->ucp[i][0])); + si_pm4_set_reg(pm4, R_0285C0_PA_CL_UCP_0_Y + i * 16, + fui(state->ucp[i][1])); + si_pm4_set_reg(pm4, R_0285C4_PA_CL_UCP_0_Z + i * 16, + fui(state->ucp[i][2])); + si_pm4_set_reg(pm4, R_0285C8_PA_CL_UCP_0_W + i * 16, + fui(state->ucp[i][3])); + } + + si_pm4_set_state(rctx, clip, pm4); +} + void si_init_state_functions(struct r600_context *rctx) { rctx->context.create_blend_state = si_create_blend_state; rctx->context.bind_blend_state = si_bind_blend_state; rctx->context.delete_blend_state = si_delete_blend_state; rctx->context.set_blend_color = si_set_blend_color; + + rctx->context.set_clip_state = si_set_clip_state; } |