Mesa (main): gallium: add a is_dri_blit_image bool to pipe_blit_info

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Oct 7 09:44:50 UTC 2021


Module: Mesa
Branch: main
Commit: 22a1b7c5b3a9cdbf05a0fd97fb193763a525b732
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=22a1b7c5b3a9cdbf05a0fd97fb193763a525b732

Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date:   Thu Sep  9 16:57:15 2021 +0200

gallium: add a is_dri_blit_image bool to pipe_blit_info

This indicates driver that a given blit is coming from the DRI
frontend.
This information can then be used to pick an appropriate blitting
method.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12763>

---

 src/gallium/frontends/dri/dri2.c   | 1 +
 src/gallium/include/pipe/p_state.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c
index 991eeb8373d..6c087b2fcf7 100644
--- a/src/gallium/frontends/dri/dri2.c
+++ b/src/gallium/frontends/dri/dri2.c
@@ -1704,6 +1704,7 @@ dri2_blit_image(__DRIcontext *context, __DRIimage *dst, __DRIimage *src,
    blit.src.format = src->texture->format;
    blit.mask = PIPE_MASK_RGBA;
    blit.filter = PIPE_TEX_FILTER_NEAREST;
+   blit.is_dri_blit_image = true;
 
    pipe->blit(pipe, &blit);
 
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index cc600e0c762..a09abcc4e98 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -900,6 +900,7 @@ struct pipe_blit_info
    bool render_condition_enable; /**< whether the blit should honor the
                                  current render condition */
    bool alpha_blend; /* dst.rgb = src.rgb * src.a + dst.rgb * (1 - src.a) */
+   bool is_dri_blit_image;
 };
 
 /**



More information about the mesa-commit mailing list