Error out if depth textures have more than one level.

Trac #20959 Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1135 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 8833dd22
......@@ -5373,8 +5373,9 @@ void __stdcall glTexImage2D(GLenum target, GLint level, GLint internalformat, GL
{
return error(GL_INVALID_OPERATION);
}
// OES_depth_texture supports loading depth data, but ANGLE_depth_texture does not
if (pixels != NULL)
// OES_depth_texture supports loading depth data and multiple levels,
// but ANGLE_depth_texture does not
if (pixels != NULL || level != 0)
{
return error(GL_INVALID_OPERATION);
}
......@@ -5660,6 +5661,11 @@ void __stdcall glTexStorage2DEXT(GLenum target, GLsizei levels, GLenum internalf
{
return error(GL_INVALID_OPERATION);
}
// ANGLE_depth_texture only supports 1-level textures
if (levels != 1)
{
return error(GL_INVALID_OPERATION);
}
break;
default:
break;
......
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