mesa: print the invalid enum when CreateShader fails
authorTimothy Arceri <timothy.arceri@collabora.com>
Tue, 12 Jan 2016 08:37:38 +0000 (19:37 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Tue, 12 Jan 2016 22:46:56 +0000 (09:46 +1100)
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/main/shaderapi.c

index e258ad9d1db1fb3a93589c3ba29d5c2bf21655be..cdc85f3413b04f290d613de62b0b438b77ac7e9c 100644 (file)
@@ -300,7 +300,8 @@ create_shader(struct gl_context *ctx, GLenum type)
    GLuint name;
 
    if (!_mesa_validate_shader_target(ctx, type)) {
-      _mesa_error(ctx, GL_INVALID_ENUM, "CreateShader(type)");
+      _mesa_error(ctx, GL_INVALID_ENUM, "CreateShader(%s)",
+                  _mesa_enum_to_string(type));
       return 0;
    }