texture_format_error_check_gles() displays error like "glTexImage%dD".
This patch just replace the %d by the correct dimension.
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* \param format pixel data format given by the user.
* \param type pixel data type given by the user.
* \param internalFormat internal format given by the user.
* \param format pixel data format given by the user.
* \param type pixel data type given by the user.
* \param internalFormat internal format given by the user.
- * \param dimensions texture image dimensions (must be 1, 2 or 3).
* \param callerName name of the caller function to print in the error message
*
* \return true if a error is found, false otherwise
* \param callerName name of the caller function to print in the error message
*
* \return true if a error is found, false otherwise
*/
static bool
texture_format_error_check_gles(struct gl_context *ctx, GLenum format,
*/
static bool
texture_format_error_check_gles(struct gl_context *ctx, GLenum format,
- GLenum type, GLenum internalFormat,
- GLuint dimensions, const char *callerName)
+ GLenum type, GLenum internalFormat, const char *callerName)
{
GLenum err = _mesa_es3_error_check_format_and_type(ctx, format, type,
internalFormat);
{
GLenum err = _mesa_es3_error_check_format_and_type(ctx, format, type,
internalFormat);
* Formats and types that require additional extensions (e.g., GL_FLOAT
* requires GL_OES_texture_float) are filtered elsewhere.
*/
* Formats and types that require additional extensions (e.g., GL_FLOAT
* requires GL_OES_texture_float) are filtered elsewhere.
*/
+ char bufCallerName[20];
+ snprintf(bufCallerName, 20, "glTexImage%dD", dimensions);
if (_mesa_is_gles(ctx) &&
if (_mesa_is_gles(ctx) &&
- texture_format_error_check_gles(ctx, format, type, internalFormat,
- dimensions, "glTexImage%dD")) {
+ texture_format_error_check_gles(ctx, format, type,
+ internalFormat, bufCallerName)) {
*/
if (_mesa_is_gles(ctx) &&
texture_format_error_check_gles(ctx, format, type,
*/
if (_mesa_is_gles(ctx) &&
texture_format_error_check_gles(ctx, format, type,
- internalFormat,
- dimensions, callerName)) {
+ internalFormat, callerName)) {