* Only the glGetTexLevelParameter() functions accept proxy targets.
*/
static struct gl_texture_object *
-get_texobj_by_name(struct gl_context *ctx, GLuint texture, GLboolean get)
+get_texobj_by_name(struct gl_context *ctx, GLuint texture, const char *name)
{
struct gl_texture_object *texObj;
case GL_TEXTURE_RECTANGLE:
return texObj;
default:
- _mesa_error(ctx, GL_INVALID_ENUM,
- "gl%sTextureParameter(target)", get ? "Get" : "");
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(target)", name);
return NULL;
}
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
- texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
+ texObj = get_texobj_by_name(ctx, texture, "glTextureParameterfv");
if (!texObj) {
/* User passed a non-generated name. */
_mesa_error(ctx, GL_INVALID_OPERATION, "glTextureParameterfv(texture)");
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
- texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
+ texObj = get_texobj_by_name(ctx, texture, "glTextureParameterf");
if (!texObj) {
/* User passed a non-generated name. */
_mesa_error(ctx, GL_INVALID_OPERATION, "glTextureParameterf(texture)");
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
- texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
+ texObj = get_texobj_by_name(ctx, texture, "glTextureParameteri");
if (!texObj) {
/* User passed a non-generated name. */
_mesa_error(ctx, GL_INVALID_OPERATION, "glTextureParameteri(texture)");
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
- texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
+ texObj = get_texobj_by_name(ctx, texture, "glTextureParameteriv");
if (!texObj) {
/* User passed a non-generated name. */
_mesa_error(ctx, GL_INVALID_OPERATION, "glTextureParameteriv(texture)");
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
- texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
+ texObj = get_texobj_by_name(ctx, texture, "glTextureParameterIiv");
if (!texObj) {
/* User passed a non-generated name. */
_mesa_error(ctx, GL_INVALID_OPERATION,
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
- texObj = get_texobj_by_name(ctx, texture, GL_FALSE);
+ texObj = get_texobj_by_name(ctx, texture, "glTextureParameterIuiv");
if (!texObj) {
/* User passed a non-generated name. */
_mesa_error(ctx, GL_INVALID_OPERATION,
struct gl_texture_object *obj;
GET_CURRENT_CONTEXT(ctx);
- obj = get_texobj_by_name(ctx, texture, GL_TRUE);
+ obj = get_texobj_by_name(ctx, texture, "glGetTextureParameterfv");
if (!obj) {
/* User passed a non-generated name. */
_mesa_error(ctx, GL_INVALID_OPERATION,
struct gl_texture_object *obj;
GET_CURRENT_CONTEXT(ctx);
- obj = get_texobj_by_name(ctx, texture, GL_TRUE);
+ obj = get_texobj_by_name(ctx, texture, "glGetTextureParameteriv");
if (!obj) {
/* User passed a non-generated name. */
_mesa_error(ctx, GL_INVALID_OPERATION,
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
- texObj = get_texobj_by_name(ctx, texture, GL_TRUE);
+ texObj = get_texobj_by_name(ctx, texture, "glGetTextureParameterIiv");
if (!texObj) {
/* User passed a non-generated name. */
_mesa_error(ctx, GL_INVALID_OPERATION,
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
- texObj = get_texobj_by_name(ctx, texture, GL_TRUE);
+ texObj = get_texobj_by_name(ctx, texture, "glGetTextureParameterIuiv");
if (!texObj) {
/* User passed a non-generated name. */
_mesa_error(ctx, GL_INVALID_OPERATION,