diff options
author | Matt Turner <[email protected]> | 2012-11-30 15:07:18 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2013-01-15 13:34:00 -0800 |
commit | 2906e2034c9d674601960a5b586b6e986e6ef04f (patch) | |
tree | 743eeba09971edb3d6dfe4342c22bae5c082802f /src | |
parent | c8901133a4525fc50fb34dfe24c549f1663468cc (diff) |
mesa: Return INVALID_OPERATION when type is known but not allowed
INVALID_ENUM is for when the type is simply not known.
Fixes part of es3conform's packed_depth_stencil_error test.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/glformats.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 85fe43d73d3..7969f77a4e3 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -1486,8 +1486,18 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, else if (ctx->Extensions.ARB_depth_buffer_float && type == GL_FLOAT_32_UNSIGNED_INT_24_8_REV) return GL_NO_ERROR; - else + switch (type) { + case GL_BYTE: + case GL_UNSIGNED_BYTE: + case GL_SHORT: + case GL_UNSIGNED_SHORT: + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + return GL_INVALID_OPERATION; + default: return GL_INVALID_ENUM; + } case GL_DUDV_ATI: case GL_DU8DV8_ATI: |