mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1461293 - TexStorage needs only one of w,h,d>>(levels-1) to be non-zero. - r=kvark
MozReview-Commit-ID: IUlrfWrLdUc
This commit is contained in:
parent
dc7e617a12
commit
d94ed3573f
@ -1146,10 +1146,10 @@ WebGLTexture::TexStorage(const char* funcName, TexTarget target, GLsizei levels,
|
||||
const auto lastLevelHeight = uint32_t(height) >> lastLevel;
|
||||
|
||||
// If these are all zero, then some earlier level was the final 1x1(x1) level.
|
||||
bool ok = lastLevelWidth && lastLevelHeight;
|
||||
bool ok = lastLevelWidth || lastLevelHeight;
|
||||
if (target == LOCAL_GL_TEXTURE_3D) {
|
||||
const auto lastLevelDepth = uint32_t(depth) >> lastLevel;
|
||||
ok &= bool(lastLevelDepth);
|
||||
ok |= bool(lastLevelDepth);
|
||||
}
|
||||
return ok;
|
||||
}();
|
||||
|
Loading…
Reference in New Issue
Block a user