mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
r600g/Cayman: Fix blending using destination alpha factor but non-alpha dest
Only compile tested, but should fix at least some piglit fbo-blending tests.
NOTE: This is a candidate for the stable branches.
Reviewed-by: Marek Olšák <maraeo@gmail.com>
(cherry picked from commit 73bf626713)
This commit is contained in:
parent
6d60f8cfc4
commit
ba4f4cead4
1 changed files with 9 additions and 4 deletions
|
|
@ -1406,10 +1406,15 @@ void evergreen_init_color_surface(struct r600_context *rctx,
|
|||
S_028C74_NON_DISP_TILING_ORDER(non_disp_tiling) |
|
||||
S_028C74_FMASK_BANK_HEIGHT(fmask_bankh);
|
||||
|
||||
if (rctx->chip_class == CAYMAN && rtex->resource.b.b.nr_samples > 1) {
|
||||
unsigned log_samples = util_logbase2(rtex->resource.b.b.nr_samples);
|
||||
color_attrib |= S_028C74_NUM_SAMPLES(log_samples) |
|
||||
S_028C74_NUM_FRAGMENTS(log_samples);
|
||||
if (rctx->chip_class == CAYMAN) {
|
||||
color_attrib |= S_028C74_FORCE_DST_ALPHA_1(desc->swizzle[3] ==
|
||||
UTIL_FORMAT_SWIZZLE_1);
|
||||
|
||||
if (rtex->resource.b.b.nr_samples > 1) {
|
||||
unsigned log_samples = util_logbase2(rtex->resource.b.b.nr_samples);
|
||||
color_attrib |= S_028C74_NUM_SAMPLES(log_samples) |
|
||||
S_028C74_NUM_FRAGMENTS(log_samples);
|
||||
}
|
||||
}
|
||||
|
||||
ntype = V_028C70_NUMBER_UNORM;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue