GLenum severity, GLint length,
const GLchar *buf)
{
- const char *callerstr = "glDebugMessageInsert";
-
GET_CURRENT_CONTEXT(ctx);
+ const char *callerstr;
+
+ if (_mesa_is_desktop_gl(ctx))
+ callerstr = "glDebugMessageInsert";
+ else
+ callerstr = "glDebugMessageInsertKHR";
if (!validate_params(ctx, INSERT, callerstr, source, type, severity))
return; /* GL_INVALID_ENUM */
{
GET_CURRENT_CONTEXT(ctx);
struct gl_debug_state *debug;
+ const char *callerstr;
GLuint ret;
+ if (_mesa_is_desktop_gl(ctx))
+ callerstr = "glGetDebugMessageLog";
+ else
+ callerstr = "glGetDebugMessageLogKHR";
+
if (!messageLog)
logSize = 0;
if (logSize < 0) {
_mesa_error(ctx, GL_INVALID_VALUE,
- "glGetDebugMessageLog(logSize=%d : logSize must not be"
- " negative)", logSize);
+ "%s(logSize=%d : logSize must not be negative)",
+ callerstr, logSize);
return 0;
}
enum mesa_debug_source source = gl_enum_to_debug_source(gl_source);
enum mesa_debug_type type = gl_enum_to_debug_type(gl_type);
enum mesa_debug_severity severity = gl_enum_to_debug_severity(gl_severity);
- const char *callerstr = "glDebugMessageControl";
+ const char *callerstr;
struct gl_debug_state *debug;
+ if (_mesa_is_desktop_gl(ctx))
+ callerstr = "glDebugMessageControl";
+ else
+ callerstr = "glDebugMessageControlKHR";
+
if (count < 0) {
_mesa_error(ctx, GL_INVALID_VALUE,
"%s(count=%d : count must not be negative)", callerstr,
const GLchar *message)
{
GET_CURRENT_CONTEXT(ctx);
- const char *callerstr = "glPushDebugGroup";
+ const char *callerstr;
struct gl_debug_state *debug;
struct gl_debug_message *emptySlot;
+ GLuint ret;
+
+ if (_mesa_is_desktop_gl(ctx))
+ callerstr = "glPushDebugGroup";
+ else
+ callerstr = "glPushDebugGroupKHR";
switch(source) {
case GL_DEBUG_SOURCE_APPLICATION:
_mesa_PopDebugGroup(void)
{
GET_CURRENT_CONTEXT(ctx);
- const char *callerstr = "glPopDebugGroup";
+ const char *callerstr;
struct gl_debug_state *debug;
struct gl_debug_message *gdmessage, msg;
+ if (_mesa_is_desktop_gl(ctx))
+ callerstr = "glPopDebugGroup";
+ else
+ callerstr = "glPopDebugGroupKHR";
+
debug = _mesa_lock_debug_state(ctx);
if (!debug)
return;
{
GET_CURRENT_CONTEXT(ctx);
const GLuint clientUnit = ctx->Array.ActiveTexture;
+ const char *callerstr;
+
+ if (_mesa_is_desktop_gl(ctx))
+ callerstr = "glGetPointerv";
+ else
+ callerstr = "glGetPointervKHR";
if (!params)
return;
if (MESA_VERBOSE & VERBOSE_API)
- _mesa_debug(ctx, "glGetPointerv %s\n", _mesa_enum_to_string(pname));
+ _mesa_debug(ctx, "%s %s\n", callerstr, _mesa_enum_to_string(pname));
switch (pname) {
case GL_VERTEX_ARRAY_POINTER:
return;
invalid_pname:
- _mesa_error( ctx, GL_INVALID_ENUM, "glGetPointerv" );
+ _mesa_error( ctx, GL_INVALID_ENUM, "%s", callerstr);
return;
}
const GLchar *label)
{
GET_CURRENT_CONTEXT(ctx);
+ const char *callerstr;
char **labelPtr;
- labelPtr = get_label_pointer(ctx, identifier, name, "glObjectLabel");
+ if (_mesa_is_desktop_gl(ctx))
+ callerstr = "glObjectLabel";
+ else
+ callerstr = "glObjectLabelKHR";
+
+ labelPtr = get_label_pointer(ctx, identifier, name, callerstr);
if (!labelPtr)
return;
- set_label(ctx, labelPtr, label, length, "glObjectLabel");
+ set_label(ctx, labelPtr, label, length, callerstr);
}
void GLAPIENTRY
GLsizei *length, GLchar *label)
{
GET_CURRENT_CONTEXT(ctx);
+ const char *callerstr;
char **labelPtr;
+ if (_mesa_is_desktop_gl(ctx))
+ callerstr = "glGetObjectLabel";
+ else
+ callerstr = "glGetObjectLabelKHR";
+
if (bufSize < 0) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGetObjectLabel(bufSize = %d)",
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(bufSize = %d)", callerstr,
bufSize);
return;
}
- labelPtr = get_label_pointer(ctx, identifier, name, "glGetObjectLabel");
+ labelPtr = get_label_pointer(ctx, identifier, name, callerstr);
if (!labelPtr)
return;
_mesa_ObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label)
{
GET_CURRENT_CONTEXT(ctx);
- char **labelPtr;
struct gl_sync_object *const syncObj = (struct gl_sync_object *) ptr;
+ const char *callerstr;
+ char **labelPtr;
+
+ if (_mesa_is_desktop_gl(ctx))
+ callerstr = "glObjectPtrLabel";
+ else
+ callerstr = "glObjectPtrLabelKHR";
if (!_mesa_validate_sync(ctx, syncObj)) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glObjectPtrLabel (not a valid sync object)");
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s (not a valid sync object)",
+ callerstr);
return;
}
labelPtr = &syncObj->Label;
- set_label(ctx, labelPtr, label, length, "glObjectPtrLabel");
+ set_label(ctx, labelPtr, label, length, callerstr);
}
void GLAPIENTRY
GLchar *label)
{
GET_CURRENT_CONTEXT(ctx);
- char **labelPtr;
struct gl_sync_object *const syncObj = (struct gl_sync_object *) ptr;
+ const char *callerstr;
+ char **labelPtr;
+
+ if (_mesa_is_desktop_gl(ctx))
+ callerstr = "glGetObjectPtrLabel";
+ else
+ callerstr = "glGetObjectPtrLabelKHR";
if (bufSize < 0) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGetObjectPtrLabel(bufSize = %d)",
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(bufSize = %d)", callerstr,
bufSize);
return;
}
if (!_mesa_validate_sync(ctx, syncObj)) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGetObjectPtrLabel (not a valid sync object)");
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s (not a valid sync object)",
+ callerstr);
return;
}