summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElie Tournier <[email protected]>2018-01-25 15:18:10 +0000
committerTapani Pälli <[email protected]>2018-01-30 07:48:56 +0200
commit6f8518e068718d48cc62402e7e739502e0bbde48 (patch)
tree495035fce7101f57d7c4e1cb78e606768e120464
parentd5f42f96e16f4b1242e51fb9eec6f608b221a1c4 (diff)
mesa: Correctly print glTexImage dimensions
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 <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
-rw-r--r--src/mesa/main/teximage.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index e5f8bb0718f..cc329e6410e 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1787,7 +1787,6 @@ texture_formats_agree(GLenum internalFormat,
* \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
@@ -1796,8 +1795,7 @@ texture_formats_agree(GLenum internalFormat,
*/
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);
@@ -1911,9 +1909,11 @@ texture_error_check( struct gl_context *ctx,
* 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) &&
- texture_format_error_check_gles(ctx, format, type, internalFormat,
- dimensions, "glTexImage%dD")) {
+ texture_format_error_check_gles(ctx, format, type,
+ internalFormat, bufCallerName)) {
return GL_TRUE;
}
@@ -2234,8 +2234,7 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
*/
if (_mesa_is_gles(ctx) &&
texture_format_error_check_gles(ctx, format, type,
- internalFormat,
- dimensions, callerName)) {
+ internalFormat, callerName)) {
return GL_TRUE;
}