Use the invalidate_resource pipe callback to invalidate external textures when they are (re-)bound. This is needed to comply with the requirement from the GL_OES_EGL_image_external extension that a call to glBindTexture guarantees that all further sampling will return values that correspond to the values in the external texture at or after the time that glBindTexture was called.
Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> --- src/mesa/state_tracker/st_atom_texture.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index 4b7ad77..96be2b2 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++ b/src/mesa/state_tracker/st_atom_texture.c @@ -410,6 +410,10 @@ update_single_texture(struct st_context *st, } } + if (texObj->TargetIndex == TEXTURE_EXTERNAL_INDEX && + st->pipe->invalidate_resource) + st->pipe->invalidate_resource(st->pipe, stObj->pt); + *sampler_view = st_get_texture_sampler_view_from_stobj(st, stObj, view_format, glsl_version); -- 2.8.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev