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

Philipp Zabel p.zabel at pengutronix.de
Fri Dec 2 15:27:44 UTC 2016


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



More information about the mesa-dev mailing list