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

Nicolai Hähnle nhaehnle at gmail.com
Tue Dec 6 14:20:27 UTC 2016


On 05.12.2016 16:49, Philipp Zabel wrote:
> Add a hook to tell drivers that an imported resource may have changed
> and they need to update their internal derived resources.

You should probably add this to the various wrapper drivers, like trace, 
ddebug, etc.

Nicolai

> Signed-off-by: Philipp Zabel <p.zabel at pengutronix.de>
> ---
> Changes since v1:
>  - Clarified intended of pipe_screen::resource_changed
> ---
>  src/gallium/include/pipe/p_screen.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
> index 255647e..0d3e4b6 100644
> --- a/src/gallium/include/pipe/p_screen.h
> +++ b/src/gallium/include/pipe/p_screen.h
> @@ -224,6 +224,14 @@ struct pipe_screen {
>  				  struct winsys_handle *handle,
>  				  unsigned usage);
>
> +   /**
> +    * Mark the resource as changed so derived internal resources will be
> +    * recreated on next use.
> +    *
> +    * This is necessary when reimporting external images that can't be directly
> +    * used as texture sampler source, to avoid sampling from old copies.
> +    */
> +   void (*resource_changed)(struct pipe_screen *, struct pipe_resource *pt);
>
>     void (*resource_destroy)(struct pipe_screen *,
>  			    struct pipe_resource *pt);
>


More information about the mesa-dev mailing list