Commit 1c29d8f4 authored by Ian Romanick's avatar Ian Romanick

mesa/es3: Allow unsized depth and depth-stencil formats in ES3

They're part of GL_OES_depth_texture_cube_map, and we'll always enable
that extension in ES3 contexts.
Signed-off-by: default avatarIan Romanick <ian.d.romanick@intel.com>
Reviewed-by: default avatarMatt Turner <mattst88@gmail.com>
Reviewed-by: default avatarKenneth Graunke <kenneth@whitecape.org>
parent b3eed73c
......@@ -2069,12 +2069,14 @@ _mesa_es3_error_check_format_and_type(GLenum format, GLenum type,
case GL_DEPTH_COMPONENT:
switch (type) {
case GL_UNSIGNED_SHORT:
if (internalFormat != GL_DEPTH_COMPONENT16)
if (internalFormat != GL_DEPTH_COMPONENT
&& internalFormat != GL_DEPTH_COMPONENT16)
return GL_INVALID_OPERATION;
break;
case GL_UNSIGNED_INT:
switch (internalFormat) {
case GL_DEPTH_COMPONENT:
case GL_DEPTH_COMPONENT16:
case GL_DEPTH_COMPONENT24:
break;
......@@ -2096,7 +2098,8 @@ _mesa_es3_error_check_format_and_type(GLenum format, GLenum type,
case GL_DEPTH_STENCIL:
switch (type) {
case GL_UNSIGNED_INT_24_8:
if (internalFormat != GL_DEPTH24_STENCIL8)
if (internalFormat != GL_DEPTH_STENCIL
&& internalFormat != GL_DEPTH24_STENCIL8)
return GL_INVALID_OPERATION;
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