[Mesa-dev] [PATCH v3 6/6] st/mesa: ask pipe driver to recreate derived internal resources when (re-)binding external textures
Marek Olšák
maraeo at gmail.com
Sat Jan 14 13:47:32 UTC 2017
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
On Dec 6, 2016 2:57 PM, "Philipp Zabel" <p.zabel at pengutronix.de> wrote:
> Use the resource_changed callback to invalidate internal resources
> derived from 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.zabel at 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 a1b1b88..32d0201 100644
> --- a/src/mesa/state_tracker/st_atom_texture.c
> +++ b/src/mesa/state_tracker/st_atom_texture.c
> @@ -91,6 +91,10 @@ update_single_texture(struct st_context *st,
> stObj->prev_sRGBDecode = samp->sRGBDecode;
> }
>
> + if (texObj->TargetIndex == TEXTURE_EXTERNAL_INDEX &&
> + stObj->pt->screen->resource_changed)
> + stObj->pt->screen->resource_changed(stObj->pt->screen,
> stObj->pt);
> +
> *sampler_view =
> st_get_texture_sampler_view_from_stobj(st, stObj, samp,
> glsl_version);
> return GL_TRUE;
> --
> 2.10.2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170114/020ad78b/attachment.html>
More information about the mesa-dev
mailing list