diff options
author | Matt Turner <mattst88@gmail.com> | 2012-12-06 14:51:29 -0800 |
---|---|---|
committer | Jordan Justen <jordan.l.justen@intel.com> | 2013-01-14 20:48:13 -0800 |
commit | f5a3d151b0741ab00cc0954c6de094484706a666 (patch) | |
tree | dfc49371a4c9fe6824b70d5786566ceb64a50d44 /src | |
parent | 9cfcac45283e12188de915bd6be3522f13b690d3 (diff) |
teximage: use _mesa_es3_error_check_format_and_type for GLES3
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/teximage.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 7d3abb7e043..d87808de9ff 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -1893,23 +1893,30 @@ texture_error_check( struct gl_context *ctx, * requires GL_OES_texture_float) are filtered elsewhere. */ - if (_mesa_is_gles(ctx) && !_mesa_is_gles3(ctx)) { - if (format != internalFormat) { + if (_mesa_is_gles(ctx)) { + if (_mesa_is_gles3(ctx)) { + err = _mesa_es3_error_check_format_and_type(format, type, + internalFormat, + dimensions); + } else { + if (format != internalFormat) { _mesa_error(ctx, GL_INVALID_OPERATION, "glTexImage%dD(format = %s, internalFormat = %s)", dimensions, _mesa_lookup_enum_by_nr(format), _mesa_lookup_enum_by_nr(internalFormat)); return GL_TRUE; - } + } - err = _mesa_es_error_check_format_and_type(format, type, dimensions); + err = _mesa_es_error_check_format_and_type(format, type, dimensions); + } if (err != GL_NO_ERROR) { _mesa_error(ctx, err, - "glTexImage%dD(format = %s, type = %s)", + "glTexImage%dD(format = %s, type = %s, internalFormat = %s)", dimensions, _mesa_lookup_enum_by_nr(format), - _mesa_lookup_enum_by_nr(type)); + _mesa_lookup_enum_by_nr(type), + _mesa_lookup_enum_by_nr(internalFormat)); return GL_TRUE; } } |