summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/glformats.c7
-rw-r--r--src/mesa/main/readpix.c1
2 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index c1d3c7df488..eb4a02acd17 100644
--- a/src/mesa/main/glformats.c
+++ b/src/mesa/main/glformats.c
@@ -494,7 +494,8 @@ _mesa_bytes_per_pixel(GLenum format, GLenum type)
else
return -1;
case GL_UNSIGNED_INT_24_8_EXT:
- if (format == GL_DEPTH_STENCIL_EXT)
+ if (format == GL_DEPTH_COMPONENT ||
+ format == GL_DEPTH_STENCIL_EXT)
return sizeof(GLuint);
else
return -1;
@@ -1789,6 +1790,10 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx,
return GL_INVALID_OPERATION;
case GL_UNSIGNED_INT_24_8:
+ /* Depth buffer OK to read in OpenGL ES (NV_read_depth). */
+ if (ctx->API == API_OPENGLES2 && format == GL_DEPTH_COMPONENT)
+ return GL_NO_ERROR;
+
if (format != GL_DEPTH_STENCIL) {
return GL_INVALID_OPERATION;
}
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index 76ef8ee9487..81bb912beb6 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -963,6 +963,7 @@ read_pixels_es3_error_check(GLenum format, GLenum type,
return GL_NO_ERROR;
break;
case GL_UNSIGNED_SHORT:
+ case GL_UNSIGNED_INT:
case GL_UNSIGNED_INT_24_8:
if (!is_float_depth)
return GL_NO_ERROR;