[Mesa-dev] [PATCH 06/16] gallium: add blending to pipe blit

Jose Fonseca jfonseca at vmware.com
Mon Oct 20 13:18:34 PDT 2014


I also can't see where this is being used in https://github.com/iXit/Mesa-3D/commit/9671cfd9bdad5c310b34c57befcfd7c43034b925.patch

Jose
________________________________________
From: mesa-dev <mesa-dev-bounces at lists.freedesktop.org> on behalf of Roland Scheidegger <sroland at vmware.com>
Sent: 18 October 2014 16:09
To: mesa-dev at lists.freedesktop.org
Subject: Re: [Mesa-dev] [PATCH 06/16] gallium: add blending to pipe blit

Hmm shouldn't there be a cap bit for this unless you fix all drivers to
actually honor it?
(Though I'm unsure if it makes all that much sense in general, pipe blit
is already quite a can-do-everything call.)

Roland

On 10/18/2014 01:54 PM, David Heidelberger wrote:
> From: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
>
> Signed-off-by: David Heidelberger <david.heidelberger at ixit.cz>
> ---
>   src/gallium/include/pipe/p_state.h        | 1 +
>   src/mesa/state_tracker/st_cb_blit.c       | 1 +
>   src/mesa/state_tracker/st_cb_readpixels.c | 1 +
>   src/mesa/state_tracker/st_cb_texture.c    | 3 +++
>   4 files changed, 6 insertions(+)
>
> diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
> index 7b9996d..b7adb99 100644
> --- a/src/gallium/include/pipe/p_state.h
> +++ b/src/gallium/include/pipe/p_state.h
> @@ -619,6 +619,7 @@ struct pipe_blit_info
>
>      boolean render_condition_enable; /**< whether the blit should honor the
>                                       current render condition */
> +   boolean alpha_blend; /* dst.rgb = src.rgb * src.a + dst.rgb * (1 - src.a) */
>   };
>
>
> diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c
> index 9c33f4e..93b5c4f 100644
> --- a/src/mesa/state_tracker/st_cb_blit.c
> +++ b/src/mesa/state_tracker/st_cb_blit.c
> @@ -188,6 +188,7 @@ st_BlitFramebuffer(struct gl_context *ctx,
>
>      blit.filter = pFilter;
>      blit.render_condition_enable = TRUE;
> +   blit.alpha_blend = FALSE;
>
>      if (mask & GL_COLOR_BUFFER_BIT) {
>         struct gl_renderbuffer_attachment *srcAtt =
> diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
> index d95a608..c9ff6f7 100644
> --- a/src/mesa/state_tracker/st_cb_readpixels.c
> +++ b/src/mesa/state_tracker/st_cb_readpixels.c
> @@ -184,6 +184,7 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y,
>      blit.mask = st_get_blit_mask(rb->_BaseFormat, format);
>      blit.filter = PIPE_TEX_FILTER_NEAREST;
>      blit.scissor_enable = FALSE;
> +   blit.alpha_blend = FALSE;
>
>      if (st_fb_orientation(ctx->ReadBuffer) == Y_0_TOP) {
>         blit.src.box.y = rb->Height - blit.src.box.y;
> diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
> index a8dbb78..914aaf5 100644
> --- a/src/mesa/state_tracker/st_cb_texture.c
> +++ b/src/mesa/state_tracker/st_cb_texture.c
> @@ -842,6 +842,7 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims,
>      blit.mask = st_get_blit_mask(format, texImage->_BaseFormat);
>      blit.filter = PIPE_TEX_FILTER_NEAREST;
>      blit.scissor_enable = FALSE;
> +   blit.alpha_blend = FALSE;
>
>      st->pipe->blit(st->pipe, &blit);
>
> @@ -1089,6 +1090,7 @@ st_GetTexImage(struct gl_context * ctx,
>      blit.mask = st_get_blit_mask(texImage->_BaseFormat, format);
>      blit.filter = PIPE_TEX_FILTER_NEAREST;
>      blit.scissor_enable = FALSE;
> +   blit.alpha_blend = FALSE;
>
>      /* blit/render/decompress */
>      st->pipe->blit(st->pipe, &blit);
> @@ -1455,6 +1457,7 @@ st_CopyTexSubImage(struct gl_context *ctx, GLuint dims,
>      blit.dst.box.depth = 1;
>      blit.mask = st_get_blit_mask(rb->_BaseFormat, texImage->_BaseFormat);
>      blit.filter = PIPE_TEX_FILTER_NEAREST;
> +   blit.alpha_blend = FALSE;
>      pipe->blit(pipe, &blit);
>      return;
>
>

_______________________________________________
mesa-dev mailing list
mesa-dev at lists.freedesktop.org
https://urldefense.proofpoint.com/v1/url?u=http://lists.freedesktop.org/mailman/listinfo/mesa-dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=NMr9uy2iTjWVixC0wOcYCWEIYhfo80qKwRgdodpoDzA%3D%0A&m=6fDUa5kroMEUrsObLfmOppxRKA1ISE4Z7wbEvTzNDvc%3D%0A&s=bf28d34c7730bcda2b8bb43446aefaea0374cc182539897f43715cce3287410d


More information about the mesa-dev mailing list