Bug 1239259 - Fix WebGL2 generateMipmap checking. r=jgilbert

--HG--
extra : rebase_source : 7bc5579f227ee5c21e2019aec53ac225e4e2dca9
This commit is contained in:
Ethan Lin 2016-01-13 02:08:00 +01:00
Родитель 7fc76b31cd
Коммит d0a5f2f401
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -742,6 +742,12 @@ WebGLTexture::GenerateMipmap(TexTarget texTarget)
return;
}
if (!baseImageInfo.mFormat->isRenderable || !baseImageInfo.mFormat->isFilterable) {
mContext->ErrorInvalidOperation("generateMipmap: Texture at base level is not"
" color-renderable or texture-filterable.");
return;
}
// Done with validation. Do the operation.
mContext->MakeContextCurrent();