diff options
author | Dave Airlie <[email protected]> | 2012-04-22 20:51:43 +0100 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2012-05-02 12:06:22 +0100 |
commit | 4a26454e979251db25bab68685835fa32c099429 (patch) | |
tree | 7b3ccab068bf54b380e7c8108cf0f8ab4bdb043a /src/gallium/drivers/r600/evergreen_state.c | |
parent | 494619ebacb632a879ebeecf0a1d732c10ddf25b (diff) |
r600g: bypass alpha for integer types (v2)
This moves the alpha test control to derived state and disables alpha
testing for integer fbs.
fbo-blending test in piglit gets further when we do this (not a pass
but less fail).
v2: drop the fb_sx_alpha_test_control
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_state.c')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index 97a27d242c0..82313ea6031 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -796,11 +796,11 @@ static void *evergreen_create_dsa_state(struct pipe_context *ctx, alpha_test_control |= S_028410_ALPHA_TEST_ENABLE(1); alpha_ref = fui(state->alpha.ref_value); } + dsa->sx_alpha_test_control = alpha_test_control & 0xff; dsa->alpha_ref = alpha_ref; /* misc */ db_render_control = 0; - r600_pipe_state_add_reg(rstate, R_028410_SX_ALPHA_TEST_CONTROL, alpha_test_control); r600_pipe_state_add_reg(rstate, R_028800_DB_DEPTH_CONTROL, db_depth_control); r600_pipe_state_add_reg(rstate, R_028000_DB_RENDER_CONTROL, db_render_control); return rstate; @@ -1428,6 +1428,11 @@ static void evergreen_cb(struct r600_context *rctx, struct r600_pipe_state *rsta blend_bypass = 1; } + if (ntype == V_028C70_NUMBER_UINT || ntype == V_028C70_NUMBER_SINT) + rctx->sx_alpha_test_control |= S_028410_ALPHA_TEST_BYPASS(1); + else + rctx->sx_alpha_test_control &= C_028410_ALPHA_TEST_BYPASS; + color_info |= S_028C70_FORMAT(format) | S_028C70_COMP_SWAP(swap) | S_028C70_BLEND_CLAMP(blend_clamp) | |