[Mesa-dev] [PATCH 2/2] r600g/Cayman: Fix blending using destination alpha factor but non-alpha dest
Marek Olšák
maraeo at gmail.com
Wed Feb 20 04:41:16 PST 2013
Reviewed-by: Marek Olšák <maraeo at gmail.com>
Marek
On Wed, Feb 20, 2013 at 1:16 PM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Only compile tested, but should fix at least some piglit fbo-blending tests.
>
> NOTE: This is a candidate for the stable branches.
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
> src/gallium/drivers/r600/evergreen_state.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
> index ad0a62e..fd73613 100644
> --- a/src/gallium/drivers/r600/evergreen_state.c
> +++ b/src/gallium/drivers/r600/evergreen_state.c
> @@ -1460,10 +1460,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;
> --
> 1.8.1.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list