* commit 'afc9f5bcfe16481d124ae7721f18e9bdcae3ad14': GLES translator: don't delete EGLImage textures
This commit is contained in:
@@ -1664,10 +1664,13 @@ GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOE
|
||||
if (ctx->shareGroup().Ptr()) {
|
||||
ObjectLocalName tex = TextureLocalName(target,ctx->getBindedTexture(target));
|
||||
unsigned int oldGlobal = ctx->shareGroup()->getGlobalName(TEXTURE, tex);
|
||||
// Delete old texture object
|
||||
// Delete old texture object but only if it is not a target of a EGLImage
|
||||
if (oldGlobal) {
|
||||
TextureData* oldTexData = getTextureData(tex);
|
||||
if (!oldTexData || oldTexData->sourceEGLImage == 0) {
|
||||
ctx->dispatcher().glDeleteTextures(1, &oldGlobal);
|
||||
}
|
||||
}
|
||||
// replace mapping and bind the new global object
|
||||
ctx->shareGroup()->replaceGlobalName(TEXTURE, tex,img->globalTexName);
|
||||
ctx->dispatcher().glBindTexture(GL_TEXTURE_2D, img->globalTexName);
|
||||
|
||||
Reference in New Issue
Block a user