<div dir="auto">Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>></div><div class="gmail_extra"><br><div class="gmail_quote">On Dec 6, 2016 2:57 PM, "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 resource_changed callback to invalidate internal resources<br>
derived from external textures when they are (re-)bound. This is needed<br>
to comply with the requirement from the GL_OES_EGL_image_external<br>
extension that a call to glBindTexture guarantees that all further<br>
sampling will return values that correspond to the values in the<br>
external texture at or 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_<wbr>atom_texture.c | 4 ++++<br>
 1 file changed, 4 insertions(+)<br>
<br>
diff --git a/src/mesa/state_tracker/st_<wbr>atom_texture.c b/src/mesa/state_tracker/st_<wbr>atom_texture.c<br>
index a1b1b88..32d0201 100644<br>
--- a/src/mesa/state_tracker/st_<wbr>atom_texture.c<br>
+++ b/src/mesa/state_tracker/st_<wbr>atom_texture.c<br>
@@ -91,6 +91,10 @@ update_single_texture(struct st_context *st,<br>
       stObj->prev_sRGBDecode = samp->sRGBDecode;<br>
    }<br>
<br>
+   if (texObj->TargetIndex == TEXTURE_EXTERNAL_INDEX &&<br>
+       stObj->pt->screen->resource_<wbr>changed)<br>
+         stObj->pt->screen->resource_<wbr>changed(stObj->pt->screen, stObj->pt);<br>
+<br>
    *sampler_view =<br>
       st_get_texture_sampler_view_<wbr>from_stobj(st, stObj, samp, glsl_version);<br>
    return GL_TRUE;<br>
--<br>
2.10.2<br>
<br>
</blockquote></div></div>