[Mesa-dev] [PATCH 1/4] gallium: add pipe_screen::resource_changed

Marek Olšák maraeo at gmail.com
Fri Dec 2 22:10:04 UTC 2016


Shouldn't this be in pipe_context if it does a copy? It's basically
the opposite of flush_resource, right?

Marek

On Fri, Dec 2, 2016 at 4:27 PM, Philipp Zabel <p.zabel at pengutronix.de> wrote:
> Add a hook to tell drivers that an imported resource may have changed
> and they need to update their internal derived resources.
>
> Signed-off-by: Philipp Zabel <p.zabel at pengutronix.de>
> ---
>  src/gallium/include/pipe/p_screen.h | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
> index 255647e..e21229e 100644
> --- a/src/gallium/include/pipe/p_screen.h
> +++ b/src/gallium/include/pipe/p_screen.h
> @@ -224,6 +224,12 @@ struct pipe_screen {
>                                   struct winsys_handle *handle,
>                                   unsigned usage);
>
> +   /**
> +    * Trigger recreation of derived internal resources. This can be used for
> +    * reimporting external images that can't be directly used as texture
> +    * sampler source.
> +    */
> +   void (*resource_changed)(struct pipe_screen *, struct pipe_resource *pt);
>
>     void (*resource_destroy)(struct pipe_screen *,
>                             struct pipe_resource *pt);
> --
> 2.10.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list