mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1357090 - Check that a texture's level_base is not too high. r=daoshengmu
MozReview-Commit-ID: 1EKDTrcTacw
This commit is contained in:
parent
26a0f7ac24
commit
eb27aad2c1
@ -314,6 +314,12 @@ WebGLTexture::IsComplete(const char* funcName, uint32_t texUnit,
|
||||
{
|
||||
*out_initFailed = false;
|
||||
|
||||
const auto maxLevel = kMaxLevelCount - 1;
|
||||
if (mBaseMipmapLevel > maxLevel) {
|
||||
*out_reason = "`level_base` too high.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!EnsureLevelInitialized(funcName, mBaseMipmapLevel)) {
|
||||
*out_initFailed = true;
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user