mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 822114 - Save and restore bound tex unit in DeleteTexture - r=bjacob
This commit is contained in:
parent
d632f81273
commit
4b5ec843d1
@ -1064,6 +1064,7 @@ WebGLContext::DeleteTexture(WebGLTexture *tex)
|
||||
if (mBoundFramebuffer)
|
||||
mBoundFramebuffer->DetachTexture(tex);
|
||||
|
||||
WebGLUint activeTexture = mActiveTexture;
|
||||
for (int32_t i = 0; i < mGLMaxTextureUnits; i++) {
|
||||
if ((tex->Target() == LOCAL_GL_TEXTURE_2D && mBound2DTextures[i] == tex) ||
|
||||
(tex->Target() == LOCAL_GL_TEXTURE_CUBE_MAP && mBoundCubeMapTextures[i] == tex))
|
||||
@ -1072,7 +1073,7 @@ WebGLContext::DeleteTexture(WebGLTexture *tex)
|
||||
BindTexture(tex->Target(), static_cast<WebGLTexture*>(nullptr));
|
||||
}
|
||||
}
|
||||
ActiveTexture(LOCAL_GL_TEXTURE0 + mActiveTexture);
|
||||
ActiveTexture(LOCAL_GL_TEXTURE0 + activeTexture);
|
||||
|
||||
tex->RequestDelete();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user