Bug 1258061 - Clarify FramebufferTexture2D handling for tex2D and cubeMap; r=jgilbert

MozReview-Commit-ID: B2oAcP6zzKZ

--HG--
extra : transplant_source : %EB%E6%CAg%9B%97%91%A9%3CW%20%C8%D8%13t%CE%E0%BF-%03
This commit is contained in:
Daosheng Mu 2016-03-30 16:41:42 +08:00
parent ddd1904862
commit 6c74338b06

View File

@ -630,9 +630,8 @@ WebGLFramebuffer::FramebufferTexture2D(GLenum attachment, TexImageTarget texImag
return;
}
bool isTexture2D = tex->Target() == LOCAL_GL_TEXTURE_2D;
bool isTexTarget2D = texImageTarget == LOCAL_GL_TEXTURE_2D;
if (isTexture2D != isTexTarget2D) {
const TexTarget destTexTarget = TexImageTargetToTexTarget(texImageTarget);
if (tex->Target() != destTexTarget) {
mContext->ErrorInvalidOperation("framebufferTexture2D: Mismatched"
" texture and texture target.");
return;