Correct texture storage levels count validation.

TRAC #18730 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@881 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent c333699d
#define MAJOR_VERSION 0
#define MINOR_VERSION 0
#define BUILD_VERSION 0
#define BUILD_REVISION 880
#define BUILD_REVISION 881
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
......
......@@ -5011,7 +5011,7 @@ void __stdcall glTexStorage2DEXT(GLenum target, GLsizei levels, GLenum internalf
return error(GL_INVALID_VALUE);
}
if (levels > gl::log2(std::max(width, height)) + 1)
if (levels != 1 && levels != gl::log2(std::max(width, height)) + 1)
{
return error(GL_INVALID_OPERATION);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment