mesa: minor tidy up for memory object error strings

Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
Andres Rodriguez
2017-11-10 19:07:23 -05:00
committed by Eric Anholt
parent f7580e7204
commit 60baf1a962

View File

@@ -148,8 +148,7 @@ _mesa_CreateMemoryObjectsEXT(GLsizei n, GLuint *memoryObjects)
_mesa_debug(ctx, "%s(%d, %p)", func, n, memoryObjects); _mesa_debug(ctx, "%s(%d, %p)", func, n, memoryObjects);
if (!ctx->Extensions.EXT_memory_object) { if (!ctx->Extensions.EXT_memory_object) {
_mesa_error(ctx, GL_INVALID_OPERATION, _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func);
"glCreateMemoryObjectsEXT(unsupported)");
return; return;
} }
@@ -195,9 +194,10 @@ _mesa_MemoryObjectParameterivEXT(GLuint memoryObject,
GET_CURRENT_CONTEXT(ctx); GET_CURRENT_CONTEXT(ctx);
struct gl_memory_object *memObj; struct gl_memory_object *memObj;
const char *func = "glMemoryObjectParameterivEXT";
if (!ctx->Extensions.EXT_memory_object) { if (!ctx->Extensions.EXT_memory_object) {
_mesa_error(ctx, GL_INVALID_OPERATION, _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func);
"glMemoryObjectParameterivEXT(unsupported)");
return; return;
} }
@@ -206,8 +206,7 @@ _mesa_MemoryObjectParameterivEXT(GLuint memoryObject,
return; return;
if (memObj->Immutable) { if (memObj->Immutable) {
_mesa_error(ctx, GL_INVALID_OPERATION, _mesa_error(ctx, GL_INVALID_OPERATION, "%s(memoryObject is immutable", func);
"glMemoryObjectParameterivEXT(memoryObject is immutable");
return; return;
} }
@@ -224,8 +223,7 @@ _mesa_MemoryObjectParameterivEXT(GLuint memoryObject,
return; return;
invalid_pname: invalid_pname:
_mesa_error(ctx, GL_INVALID_ENUM, _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=0x%x)", func, pname);
"glMemoryObjectParameterivEXT(pname=0x%x)", pname);
} }
void GLAPIENTRY void GLAPIENTRY
@@ -236,9 +234,10 @@ _mesa_GetMemoryObjectParameterivEXT(GLuint memoryObject,
GET_CURRENT_CONTEXT(ctx); GET_CURRENT_CONTEXT(ctx);
struct gl_memory_object *memObj; struct gl_memory_object *memObj;
const char *func = "glMemoryObjectParameterivEXT";
if (!ctx->Extensions.EXT_memory_object) { if (!ctx->Extensions.EXT_memory_object) {
_mesa_error(ctx, GL_INVALID_OPERATION, _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func);
"glGetMemoryObjectParameterivEXT(unsupported)");
return; return;
} }
@@ -259,8 +258,7 @@ _mesa_GetMemoryObjectParameterivEXT(GLuint memoryObject,
return; return;
invalid_pname: invalid_pname:
_mesa_error(ctx, GL_INVALID_ENUM, _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=0x%x)", func, pname);
"glGetMemoryObjectParameterivEXT(pname=0x%x)", pname);
} }
static struct gl_memory_object * static struct gl_memory_object *
@@ -611,15 +609,15 @@ _mesa_ImportMemoryFdEXT(GLuint memory,
{ {
GET_CURRENT_CONTEXT(ctx); GET_CURRENT_CONTEXT(ctx);
const char *func = "glImportMemoryFdEXT";
if (!ctx->Extensions.EXT_memory_object_fd) { if (!ctx->Extensions.EXT_memory_object_fd) {
_mesa_error(ctx, GL_INVALID_OPERATION, _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func);
"glImportMemoryFdEXT(unsupported)");
return; return;
} }
if (handleType != GL_HANDLE_TYPE_OPAQUE_FD_EXT) { if (handleType != GL_HANDLE_TYPE_OPAQUE_FD_EXT) {
_mesa_error(ctx, GL_INVALID_VALUE, "glImportMemoryFdEXT(handleType=%u)", _mesa_error(ctx, GL_INVALID_VALUE, "%s(handleType=%u)", func, handleType);
handleType);
return; return;
} }