summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe
diff options
context:
space:
mode:
authorPhilipp Zabel <[email protected]>2017-01-19 15:05:36 +0100
committerLucas Stach <[email protected]>2017-01-20 15:30:29 +0100
commit30853f55a3b4c409802ac470ae0530311c36e0c7 (patch)
treec16a4c1d50f70f4f5a883a5c9ad6225ce43ea897 /src/gallium/include/pipe
parent5872850b8868f00c031d21387b0516d844d070be (diff)
gallium: add pipe_screen::resource_changed
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 <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Lucas Stach <[email protected]>
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r--src/gallium/include/pipe/p_screen.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
index f04c2ed83ab..b6203f1da0c 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);