[Mesa-dev] [PATCH 7/7] r600g: initial r600 dual src blending support

Brian Paul brianp at vmware.com
Wed Apr 4 08:18:19 PDT 2012


On 04/03/2012 07:16 AM, Dave Airlie wrote:
> From: Dave Airlie<airlied at redhat.com>
>
> survives piglit with no regressions on rv610/evergreen
>
> Signed-off-by: Dave Airlie<airlied at redhat.com>
> ---
>   src/gallium/drivers/r600/evergreen_state.c   |   16 +++++++++-------
>   src/gallium/drivers/r600/r600_pipe.c         |    2 +-
>   src/gallium/drivers/r600/r600_pipe.h         |    7 +++++++
>   src/gallium/drivers/r600/r600_state.c        |   17 +++++++++++------
>   src/gallium/drivers/r600/r600_state_common.c |   19 +++++++++++++++++--
>   5 files changed, 45 insertions(+), 16 deletions(-)
>
> diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
> index 04844e8..237a490 100644
> --- a/src/gallium/drivers/r600/evergreen_state.c
> +++ b/src/gallium/drivers/r600/evergreen_state.c
> @@ -27,6 +27,7 @@
>   #include "util/u_pack_color.h"
>   #include "util/u_memory.h"
>   #include "util/u_framebuffer.h"
> +#include "util/u_dual_blend.h"
>
>   static uint32_t eg_num_banks(uint32_t nbanks)
>   {
> @@ -709,7 +710,8 @@ static void *evergreen_create_blend_state(struct pipe_context *ctx,
>   	
>   	r600_pipe_state_add_reg(rstate, R_028808_CB_COLOR_CONTROL,
>   				color_control, NULL, 0);
> -
> +	/* only have dual source on MRT0 */
> +	blend->dual_src_blend = util_blend_state_is_dual(state, 0);
>   	for (int i = 0; i<  8; i++) {
>   		/* state->rt entries>  0 only written if independent blending */
>   		const int j = state->independent_blend_enable ? i : 0;
> @@ -1459,6 +1461,8 @@ static void evergreen_cb(struct r600_context *rctx, struct r600_pipe_state *rsta
>   	}
>   	rctx->alpha_ref_dirty = true;
>
> +	if (cb == 0)
> +	    rctx->color0_format = color_info;

The indentation doesn't look right there.  The rest of the file uses tabs.

-Brian


More information about the mesa-dev mailing list