diff options
author | Marek Olšák <[email protected]> | 2012-07-18 05:16:40 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-07-18 06:25:36 +0200 |
commit | 1b699a483233d29699865e317f1009a58ebd5416 (patch) | |
tree | 098eb7642b67372f430bd9d6d06101404e23592a /src/gallium | |
parent | 82a1d241754a52934b41bd152d25741b0c9c6294 (diff) |
r600g: fix alphatest without a colorbuffer on evergreen
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index d90ef3c6042..54438afc779 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -1701,7 +1701,10 @@ static void evergreen_emit_cb_misc_state(struct r600_context *rctx, struct r600_ r600_write_context_reg_seq(cs, R_028238_CB_TARGET_MASK, 2); r600_write_value(cs, a->blend_colormask & fb_colormask); /* R_028238_CB_TARGET_MASK */ - r600_write_value(cs, (a->dual_src_blend ? ps_colormask : 0) | fb_colormask); /* R_02823C_CB_SHADER_MASK */ + /* Always enable the first colorbuffer in CB_SHADER_MASK. This + * will assure that the alpha-test will work even if there is + * no colorbuffer bound. */ + r600_write_value(cs, 0xf | (a->dual_src_blend ? ps_colormask : 0) | fb_colormask); /* R_02823C_CB_SHADER_MASK */ } static void evergreen_emit_db_misc_state(struct r600_context *rctx, struct r600_atom *atom) |