<p dir="ltr">Iirc invalidate_resource is to allow backend to discard the contents...</p>
<div class="gmail_quote">On May 25, 2016 9:18 AM, "Philipp Zabel" <<a href="mailto:p.zabel@pengutronix.de">p.zabel@pengutronix.de</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Use the invalidate_resource pipe callback to invalidate external<br>
textures when they are (re-)bound. This is needed to comply with the<br>
requirement from the GL_OES_EGL_image_external extension that a call<br>
to glBindTexture guarantees that all further sampling will return<br>
values that correspond to the values in the external texture at or<br>
after the time that glBindTexture was called.<br>
<br>
Signed-off-by: Philipp Zabel <<a href="mailto:p.zabel@pengutronix.de">p.zabel@pengutronix.de</a>><br>
---<br>
 src/mesa/state_tracker/st_atom_texture.c | 4 ++++<br>
 1 file changed, 4 insertions(+)<br>
<br>
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c<br>
index 4b7ad77..96be2b2 100644<br>
--- a/src/mesa/state_tracker/st_atom_texture.c<br>
+++ b/src/mesa/state_tracker/st_atom_texture.c<br>
@@ -410,6 +410,10 @@ update_single_texture(struct st_context *st,<br>
       }<br>
    }<br>
<br>
+   if (texObj->TargetIndex == TEXTURE_EXTERNAL_INDEX &&<br>
+       st->pipe->invalidate_resource)<br>
+         st->pipe->invalidate_resource(st->pipe, stObj->pt);<br>
+<br>
    *sampler_view =<br>
       st_get_texture_sampler_view_from_stobj(st, stObj, view_format,<br>
                                              glsl_version);<br>
--<br>
2.8.1<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>