diff options
author | Eric Anholt <[email protected]> | 2017-10-11 10:32:25 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2017-10-12 12:42:13 -0700 |
commit | 376a0a9b08543f3978efd6f51cec3d4cf628e939 (patch) | |
tree | 2b7bb0c28d294481af742b53d0ec710f113b0f28 /src | |
parent | f536f45250a52cedbcc867637f097cddaa8c4bac (diff) |
mesa: Disallow GL_RED/GL_RG with half-floats on GLES2.
Sure, you'd think that the combination of GL_OES_texture_half_float and
GL_EXT_texture_rg would mean that GL_RG16F exists, but it doesn't.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103227
Fixes: c16a7443e999 ("mesa: Expose GL_OES_required_internalformat on GLES contexts.")
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/glformats.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 7b4b405a814..1e797c24c2a 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -3119,6 +3119,8 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx, case GL_HALF_FLOAT_OES: switch (internalFormat) { case GL_RG16F: + if (ctx->Version <= 20) + return GL_INVALID_OPERATION; break; case GL_RG: if (ctx->Extensions.ARB_texture_rg && @@ -3207,6 +3209,8 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx, case GL_HALF_FLOAT_OES: switch (internalFormat) { case GL_R16F: + if (ctx->Version <= 20) + return GL_INVALID_OPERATION; break; case GL_RG: case GL_RED: |