static GLenum
-read_pixels_es3_error_check(GLenum format, GLenum type,
+read_pixels_es3_error_check(struct gl_context *ctx, GLenum format, GLenum type,
const struct gl_renderbuffer *rb)
{
const GLenum internalFormat = rb->InternalFormat;
return GL_NO_ERROR;
if (internalFormat == GL_RGB10_A2UI && type == GL_UNSIGNED_BYTE)
return GL_NO_ERROR;
+ if (type == GL_UNSIGNED_SHORT) {
+ switch (internalFormat) {
+ case GL_R16:
+ case GL_RG16:
+ case GL_RGB16:
+ case GL_RGBA16:
+ if (_mesa_has_EXT_texture_norm16(ctx))
+ return GL_NO_ERROR;
+ }
+ }
break;
case GL_BGRA:
/* GL_EXT_read_format_bgra */
}
}
} else {
- err = read_pixels_es3_error_check(format, type, rb);
+ err = read_pixels_es3_error_check(ctx, format, type, rb);
}
if (err != GL_NO_ERROR) {