Bug 1232502. Use the correct internalFormat when calling CopyTexImage2D. r=jgilbert

Previously we were just using the internalFormat directly from the caller.
This broken when trying to do RGBA8 -> L8 copies because L8 is not supported
in Core Profile OpenGL
This commit is contained in:
Jeff Muizelaar 2015-12-14 19:47:00 -05:00
Родитель f5746f61bb
Коммит beda3fab62
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -1770,7 +1770,8 @@ WebGLTexture::CopyTexImage2D(TexImageTarget target, GLint level, GLenum internal
GLenum error;
if (rwWidth == uint32_t(width) && rwHeight == uint32_t(height)) {
error = DoCopyTexImage2D(gl, target, level, internalFormat, x, y, width, height,
MOZ_ASSERT(dstUsage->idealUnpack);
error = DoCopyTexImage2D(gl, target, level, dstUsage->idealUnpack->internalFormat, x, y, width, height,
border);
} else {
// 1. Zero the texture data.