diff options
author | Philipp Zabel <[email protected]> | 2017-01-19 15:05:40 +0100 |
---|---|---|
committer | Lucas Stach <[email protected]> | 2017-01-20 15:30:30 +0100 |
commit | 9bab714c61fa1eb22c6723af81caf83fffe549f4 (patch) | |
tree | b3a8df711ca085db6e7c34cba8aabdfecdb2f02f | |
parent | c70ed79e79a717be80d9d480760dcbdb14f06c52 (diff) |
mesa: update external textures when (re-)binding
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,
do not bail out early from mesa_BindTextures if the target is
external.
This will later allow the state tracker to instruct the pipe driver
to invalidate internal resources derived from the external texture.
Signed-off-by: Philipp Zabel <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Signed-off-by: Lucas Stach <[email protected]>
-rw-r--r-- | src/mesa/main/texobj.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index e5b70701c44..25b959d1814 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -1619,9 +1619,10 @@ bind_texture(struct gl_context *ctx, assert(targetIndex < NUM_TEXTURE_TARGETS); /* Check if this texture is only used by this context and is already bound. - * If so, just return. + * If so, just return. For GL_OES_image_external, rebinding the texture + * always must invalidate cached resources. */ - { + if (targetIndex != TEXTURE_EXTERNAL_INDEX) { bool early_out; mtx_lock(&ctx->Shared->Mutex); early_out = ((ctx->Shared->RefCount == 1) |