mesa: make ARB_debug_output functions an alias of
KHR_debug Also update dispatch sanity removing ARB_debug_output checks and removing KHR_debug placeholders as the checks have already been added V2: Make sure we exit case statements with conditional breaks rather than just dropping through. Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
0608d346aa
commit
fb78fa58d2
|
@ -52,7 +52,7 @@
|
||||||
<enum name="DEBUG_SEVERITY_LOW_ARB" value="0x9148"/>
|
<enum name="DEBUG_SEVERITY_LOW_ARB" value="0x9148"/>
|
||||||
|
|
||||||
|
|
||||||
<function name="DebugMessageControlARB" offset="assign">
|
<function name="DebugMessageControlARB" alias="DebugMessageControl">
|
||||||
<param name="source" type="GLenum"/>
|
<param name="source" type="GLenum"/>
|
||||||
<param name="type" type="GLenum"/>
|
<param name="type" type="GLenum"/>
|
||||||
<param name="severity" type="GLenum"/>
|
<param name="severity" type="GLenum"/>
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
<param name="enabled" type="GLboolean"/>
|
<param name="enabled" type="GLboolean"/>
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
<function name="DebugMessageInsertARB" offset="assign">
|
<function name="DebugMessageInsertARB" alias="DebugMessageInsert">
|
||||||
<param name="source" type="GLenum"/>
|
<param name="source" type="GLenum"/>
|
||||||
<param name="type" type="GLenum"/>
|
<param name="type" type="GLenum"/>
|
||||||
<param name="id" type="GLuint"/>
|
<param name="id" type="GLuint"/>
|
||||||
|
@ -70,12 +70,12 @@
|
||||||
<param name="buf" type="const GLcharARB *"/>
|
<param name="buf" type="const GLcharARB *"/>
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
<function name="DebugMessageCallbackARB" offset="assign">
|
<function name="DebugMessageCallbackARB" alias="DebugMessageCallback">
|
||||||
<param name="callback" type="GLDEBUGPROCARB"/>
|
<param name="callback" type="GLDEBUGPROCARB"/>
|
||||||
<param name="userParam" type="const GLvoid *"/>
|
<param name="userParam" type="const GLvoid *"/>
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
<function name="GetDebugMessageLogARB" offset="assign">
|
<function name="GetDebugMessageLogARB" alias="GetDebugMessageLog">
|
||||||
<return type="GLuint"/>
|
<return type="GLuint"/>
|
||||||
<param name="count" type="GLuint"/>
|
<param name="count" type="GLuint"/>
|
||||||
<param name="bufsize" type="GLsizei"/>
|
<param name="bufsize" type="GLsizei"/>
|
||||||
|
|
|
@ -38,9 +38,6 @@
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "hash_table.h"
|
#include "hash_table.h"
|
||||||
|
|
||||||
#define MESSAGE_LOG 1
|
|
||||||
#define MESSAGE_LOG_ARB 2
|
|
||||||
|
|
||||||
static mtx_t DynamicIDMutex = _MTX_INITIALIZER_NP;
|
static mtx_t DynamicIDMutex = _MTX_INITIALIZER_NP;
|
||||||
static GLuint NextDynamicID = 1;
|
static GLuint NextDynamicID = 1;
|
||||||
|
|
||||||
|
@ -372,40 +369,6 @@ store_message_details(struct gl_debug_msg *emptySlot,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remap any type exclusive to KHR_debug to something suitable
|
|
||||||
* for ARB_debug_output
|
|
||||||
*/
|
|
||||||
inline static int
|
|
||||||
remap_type(GLenum type) {
|
|
||||||
|
|
||||||
switch(type) {
|
|
||||||
case GL_DEBUG_TYPE_MARKER:
|
|
||||||
case GL_DEBUG_TYPE_PUSH_GROUP:
|
|
||||||
case GL_DEBUG_TYPE_POP_GROUP:
|
|
||||||
type = GL_DEBUG_TYPE_OTHER;
|
|
||||||
default:
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remap severity exclusive to KHR_debug to something suitable
|
|
||||||
* for ARB_debug_output
|
|
||||||
*/
|
|
||||||
inline static int
|
|
||||||
remap_severity(GLenum severity) {
|
|
||||||
|
|
||||||
if (GL_DEBUG_SEVERITY_NOTIFICATION == severity)
|
|
||||||
severity = GL_DEBUG_SEVERITY_LOW;
|
|
||||||
|
|
||||||
return severity;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 'buf' is not necessarily a null-terminated string. When logging, copy
|
* 'buf' is not necessarily a null-terminated string. When logging, copy
|
||||||
* 'len' characters from it, store them in a new, null-terminated string,
|
* 'len' characters from it, store them in a new, null-terminated string,
|
||||||
|
@ -433,10 +396,6 @@ log_msg(struct gl_context *ctx, enum mesa_debug_source source,
|
||||||
GLenum gl_type = debug_type_enums[type];
|
GLenum gl_type = debug_type_enums[type];
|
||||||
GLenum gl_severity = debug_severity_enums[severity];
|
GLenum gl_severity = debug_severity_enums[severity];
|
||||||
|
|
||||||
if (debug->ARBCallback) {
|
|
||||||
gl_severity = remap_severity(gl_severity);
|
|
||||||
gl_type = remap_type(gl_type);
|
|
||||||
}
|
|
||||||
debug->Callback(debug_source_enums[source], gl_type, id, gl_severity,
|
debug->Callback(debug_source_enums[source], gl_type, id, gl_severity,
|
||||||
len, buf, debug->CallbackData);
|
len, buf, debug->CallbackData);
|
||||||
return;
|
return;
|
||||||
|
@ -470,8 +429,7 @@ log_msg(struct gl_context *ctx, enum mesa_debug_source source,
|
||||||
*/
|
*/
|
||||||
static GLsizei
|
static GLsizei
|
||||||
get_msg(struct gl_context *ctx, GLenum *source, GLenum *type,
|
get_msg(struct gl_context *ctx, GLenum *source, GLenum *type,
|
||||||
GLuint *id, GLenum *severity, GLsizei bufSize, char *buf,
|
GLuint *id, GLenum *severity, GLsizei bufSize, char *buf)
|
||||||
unsigned caller)
|
|
||||||
{
|
{
|
||||||
struct gl_debug_state *debug = _mesa_get_debug_state(ctx);
|
struct gl_debug_state *debug = _mesa_get_debug_state(ctx);
|
||||||
struct gl_debug_msg *msg;
|
struct gl_debug_msg *msg;
|
||||||
|
@ -490,8 +448,6 @@ get_msg(struct gl_context *ctx, GLenum *source, GLenum *type,
|
||||||
|
|
||||||
if (severity) {
|
if (severity) {
|
||||||
*severity = debug_severity_enums[msg->severity];
|
*severity = debug_severity_enums[msg->severity];
|
||||||
if (caller == MESSAGE_LOG_ARB)
|
|
||||||
*severity = remap_severity(*severity);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (source) {
|
if (source) {
|
||||||
|
@ -500,8 +456,6 @@ get_msg(struct gl_context *ctx, GLenum *source, GLenum *type,
|
||||||
|
|
||||||
if (type) {
|
if (type) {
|
||||||
*type = debug_type_enums[msg->type];
|
*type = debug_type_enums[msg->type];
|
||||||
if (caller == MESSAGE_LOG_ARB)
|
|
||||||
*type = remap_type(*type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id) {
|
if (id) {
|
||||||
|
@ -529,12 +483,9 @@ get_msg(struct gl_context *ctx, GLenum *source, GLenum *type,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verify that source, type, and severity are valid enums.
|
* Verify that source, type, and severity are valid enums.
|
||||||
* glDebugMessageInsertARB only accepts two values for 'source',
|
|
||||||
* and glDebugMessageControlARB will additionally accept GL_DONT_CARE
|
|
||||||
* in any parameter, so handle those cases specially.
|
|
||||||
*
|
*
|
||||||
* There is also special cases for handling values available in
|
* The 'caller' param is used for handling values available
|
||||||
* GL_KHR_debug that are not avaliable in GL_ARB_debug_output
|
* only in glDebugMessageInsert or glDebugMessageControl
|
||||||
*/
|
*/
|
||||||
static GLboolean
|
static GLboolean
|
||||||
validate_params(struct gl_context *ctx, unsigned caller,
|
validate_params(struct gl_context *ctx, unsigned caller,
|
||||||
|
@ -543,8 +494,6 @@ validate_params(struct gl_context *ctx, unsigned caller,
|
||||||
{
|
{
|
||||||
#define INSERT 1
|
#define INSERT 1
|
||||||
#define CONTROL 2
|
#define CONTROL 2
|
||||||
#define INSERT_ARB 3
|
|
||||||
#define CONTROL_ARB 4
|
|
||||||
switch(source) {
|
switch(source) {
|
||||||
case GL_DEBUG_SOURCE_APPLICATION_ARB:
|
case GL_DEBUG_SOURCE_APPLICATION_ARB:
|
||||||
case GL_DEBUG_SOURCE_THIRD_PARTY_ARB:
|
case GL_DEBUG_SOURCE_THIRD_PARTY_ARB:
|
||||||
|
@ -553,11 +502,15 @@ validate_params(struct gl_context *ctx, unsigned caller,
|
||||||
case GL_DEBUG_SOURCE_SHADER_COMPILER_ARB:
|
case GL_DEBUG_SOURCE_SHADER_COMPILER_ARB:
|
||||||
case GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB:
|
case GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB:
|
||||||
case GL_DEBUG_SOURCE_OTHER_ARB:
|
case GL_DEBUG_SOURCE_OTHER_ARB:
|
||||||
if (caller != INSERT || caller == INSERT_ARB)
|
if (caller != INSERT)
|
||||||
break;
|
break;
|
||||||
|
else
|
||||||
|
goto error;
|
||||||
case GL_DONT_CARE:
|
case GL_DONT_CARE:
|
||||||
if (caller == CONTROL || caller == CONTROL_ARB)
|
if (caller == CONTROL)
|
||||||
break;
|
break;
|
||||||
|
else
|
||||||
|
goto error;
|
||||||
default:
|
default:
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
@ -569,14 +522,13 @@ validate_params(struct gl_context *ctx, unsigned caller,
|
||||||
case GL_DEBUG_TYPE_PERFORMANCE_ARB:
|
case GL_DEBUG_TYPE_PERFORMANCE_ARB:
|
||||||
case GL_DEBUG_TYPE_PORTABILITY_ARB:
|
case GL_DEBUG_TYPE_PORTABILITY_ARB:
|
||||||
case GL_DEBUG_TYPE_OTHER_ARB:
|
case GL_DEBUG_TYPE_OTHER_ARB:
|
||||||
break;
|
|
||||||
case GL_DEBUG_TYPE_MARKER:
|
case GL_DEBUG_TYPE_MARKER:
|
||||||
/* this value is only valid for GL_KHR_debug functions */
|
break;
|
||||||
if (caller == CONTROL || caller == INSERT)
|
|
||||||
break;
|
|
||||||
case GL_DONT_CARE:
|
case GL_DONT_CARE:
|
||||||
if (caller == CONTROL || caller == CONTROL_ARB)
|
if (caller == CONTROL)
|
||||||
break;
|
break;
|
||||||
|
else
|
||||||
|
goto error;
|
||||||
default:
|
default:
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
@ -585,14 +537,13 @@ validate_params(struct gl_context *ctx, unsigned caller,
|
||||||
case GL_DEBUG_SEVERITY_HIGH_ARB:
|
case GL_DEBUG_SEVERITY_HIGH_ARB:
|
||||||
case GL_DEBUG_SEVERITY_MEDIUM_ARB:
|
case GL_DEBUG_SEVERITY_MEDIUM_ARB:
|
||||||
case GL_DEBUG_SEVERITY_LOW_ARB:
|
case GL_DEBUG_SEVERITY_LOW_ARB:
|
||||||
break;
|
|
||||||
case GL_DEBUG_SEVERITY_NOTIFICATION:
|
case GL_DEBUG_SEVERITY_NOTIFICATION:
|
||||||
/* this value is only valid for GL_KHR_debug functions */
|
break;
|
||||||
if (caller == CONTROL || caller == INSERT)
|
|
||||||
break;
|
|
||||||
case GL_DONT_CARE:
|
case GL_DONT_CARE:
|
||||||
if (caller == CONTROL || caller == CONTROL_ARB)
|
if (caller == CONTROL)
|
||||||
break;
|
break;
|
||||||
|
else
|
||||||
|
goto error;
|
||||||
default:
|
default:
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
@ -705,44 +656,6 @@ control_app_messages(struct gl_context *ctx, GLenum esource, GLenum etype,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is a generic message control function for use by both
|
|
||||||
* glDebugMessageControlARB and glDebugMessageControl.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
message_control(GLenum gl_source, GLenum gl_type,
|
|
||||||
GLenum gl_severity,
|
|
||||||
GLsizei count, const GLuint *ids,
|
|
||||||
GLboolean enabled,
|
|
||||||
unsigned caller, const char *callerstr)
|
|
||||||
{
|
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
|
||||||
|
|
||||||
if (count < 0) {
|
|
||||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
|
||||||
"%s(count=%d : count must not be negative)", callerstr,
|
|
||||||
count);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!validate_params(ctx, caller, callerstr, gl_source, gl_type,
|
|
||||||
gl_severity))
|
|
||||||
return; /* GL_INVALID_ENUM */
|
|
||||||
|
|
||||||
if (count && (gl_severity != GL_DONT_CARE || gl_type == GL_DONT_CARE
|
|
||||||
|| gl_source == GL_DONT_CARE)) {
|
|
||||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
|
||||||
"%s(When passing an array of ids, severity must be"
|
|
||||||
" GL_DONT_CARE, and source and type must not be GL_DONT_CARE.",
|
|
||||||
callerstr);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
control_app_messages(ctx, gl_source, gl_type, gl_severity,
|
|
||||||
count, ids, enabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a generic message insert function.
|
* This is a generic message insert function.
|
||||||
* Validation of source, type and severity parameters should be done
|
* Validation of source, type and severity parameters should be done
|
||||||
|
@ -773,58 +686,6 @@ message_insert(GLenum source, GLenum type, GLuint id,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is a generic message insert function for use by both
|
|
||||||
* glGetDebugMessageLogARB and glGetDebugMessageLog.
|
|
||||||
*/
|
|
||||||
static GLuint
|
|
||||||
get_message_log(GLuint count, GLsizei logSize, GLenum *sources,
|
|
||||||
GLenum *types, GLenum *ids, GLenum *severities,
|
|
||||||
GLsizei *lengths, GLchar *messageLog,
|
|
||||||
unsigned caller, const char *callerstr)
|
|
||||||
{
|
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
|
||||||
GLuint ret;
|
|
||||||
|
|
||||||
if (!messageLog)
|
|
||||||
logSize = 0;
|
|
||||||
|
|
||||||
if (logSize < 0) {
|
|
||||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
|
||||||
"%s(logSize=%d : logSize must not be negative)", callerstr,
|
|
||||||
logSize);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (ret = 0; ret < count; ret++) {
|
|
||||||
GLsizei written = get_msg(ctx, sources, types, ids, severities,
|
|
||||||
logSize, messageLog, caller);
|
|
||||||
if (!written)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (messageLog) {
|
|
||||||
messageLog += written;
|
|
||||||
logSize -= written;
|
|
||||||
}
|
|
||||||
if (lengths) {
|
|
||||||
*lengths = written;
|
|
||||||
lengths++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (severities)
|
|
||||||
severities++;
|
|
||||||
if (sources)
|
|
||||||
sources++;
|
|
||||||
if (types)
|
|
||||||
types++;
|
|
||||||
if (ids)
|
|
||||||
ids++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
do_nothing(GLuint key, void *data, void *userData)
|
do_nothing(GLuint key, void *data, void *userData)
|
||||||
{
|
{
|
||||||
|
@ -887,22 +748,79 @@ _mesa_GetDebugMessageLog(GLuint count, GLsizei logSize, GLenum *sources,
|
||||||
GLenum *types, GLenum *ids, GLenum *severities,
|
GLenum *types, GLenum *ids, GLenum *severities,
|
||||||
GLsizei *lengths, GLchar *messageLog)
|
GLsizei *lengths, GLchar *messageLog)
|
||||||
{
|
{
|
||||||
const char *callerstr = "glGetDebugMessageLog";
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
|
GLuint ret;
|
||||||
|
|
||||||
return get_message_log(count, logSize, sources, types, ids, severities,
|
if (!messageLog)
|
||||||
lengths, messageLog, MESSAGE_LOG, callerstr);
|
logSize = 0;
|
||||||
|
|
||||||
|
if (logSize < 0) {
|
||||||
|
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||||
|
"glGetDebugMessageLog(logSize=%d : logSize must not be"
|
||||||
|
" negative)", logSize);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (ret = 0; ret < count; ret++) {
|
||||||
|
GLsizei written = get_msg(ctx, sources, types, ids, severities,
|
||||||
|
logSize, messageLog);
|
||||||
|
if (!written)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (messageLog) {
|
||||||
|
messageLog += written;
|
||||||
|
logSize -= written;
|
||||||
|
}
|
||||||
|
if (lengths) {
|
||||||
|
*lengths = written;
|
||||||
|
lengths++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (severities)
|
||||||
|
severities++;
|
||||||
|
if (sources)
|
||||||
|
sources++;
|
||||||
|
if (types)
|
||||||
|
types++;
|
||||||
|
if (ids)
|
||||||
|
ids++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
_mesa_DebugMessageControl(GLenum source, GLenum type, GLenum severity,
|
_mesa_DebugMessageControl(GLenum gl_source, GLenum gl_type,
|
||||||
GLsizei count, const GLuint *ids,
|
GLenum gl_severity, GLsizei count,
|
||||||
GLboolean enabled)
|
const GLuint *ids, GLboolean enabled)
|
||||||
{
|
{
|
||||||
const char *callerstr = "glDebugMessageControl";
|
const char *callerstr = "glDebugMessageControl";
|
||||||
|
|
||||||
message_control(source, type, severity, count, ids,
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
enabled, CONTROL, callerstr);
|
|
||||||
|
if (count < 0) {
|
||||||
|
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||||
|
"%s(count=%d : count must not be negative)", callerstr,
|
||||||
|
count);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!validate_params(ctx, CONTROL, callerstr, gl_source, gl_type,
|
||||||
|
gl_severity))
|
||||||
|
return; /* GL_INVALID_ENUM */
|
||||||
|
|
||||||
|
if (count && (gl_severity != GL_DONT_CARE || gl_type == GL_DONT_CARE
|
||||||
|
|| gl_source == GL_DONT_CARE)) {
|
||||||
|
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||||
|
"%s(When passing an array of ids, severity must be"
|
||||||
|
" GL_DONT_CARE, and source and type must not be GL_DONT_CARE.",
|
||||||
|
callerstr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
control_app_messages(ctx, gl_source, gl_type, gl_severity,
|
||||||
|
count, ids, enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -914,7 +832,6 @@ _mesa_DebugMessageCallback(GLDEBUGPROC callback, const void *userParam)
|
||||||
if (debug) {
|
if (debug) {
|
||||||
debug->Callback = callback;
|
debug->Callback = callback;
|
||||||
debug->CallbackData = userParam;
|
debug->CallbackData = userParam;
|
||||||
debug->ARBCallback = GL_FALSE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1041,60 +958,6 @@ _mesa_PopDebugGroup(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GLAPIENTRY
|
|
||||||
_mesa_DebugMessageInsertARB(GLenum source, GLenum type, GLuint id,
|
|
||||||
GLenum severity, GLint length,
|
|
||||||
const GLcharARB *buf)
|
|
||||||
{
|
|
||||||
const char *callerstr = "glDebugMessageInsertARB";
|
|
||||||
|
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
|
||||||
|
|
||||||
if (!validate_params(ctx, INSERT_ARB, callerstr, source, type, severity))
|
|
||||||
return; /* GL_INVALID_ENUM */
|
|
||||||
|
|
||||||
message_insert(source, type, id, severity, length, buf, callerstr);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
GLuint GLAPIENTRY
|
|
||||||
_mesa_GetDebugMessageLogARB(GLuint count, GLsizei logSize, GLenum *sources,
|
|
||||||
GLenum *types, GLenum *ids, GLenum *severities,
|
|
||||||
GLsizei *lengths, GLcharARB *messageLog)
|
|
||||||
{
|
|
||||||
const char *callerstr = "glGetDebugMessageLogARB";
|
|
||||||
|
|
||||||
return get_message_log(count, logSize, sources, types, ids, severities,
|
|
||||||
lengths, messageLog, MESSAGE_LOG_ARB, callerstr);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void GLAPIENTRY
|
|
||||||
_mesa_DebugMessageControlARB(GLenum gl_source, GLenum gl_type,
|
|
||||||
GLenum gl_severity,
|
|
||||||
GLsizei count, const GLuint *ids,
|
|
||||||
GLboolean enabled)
|
|
||||||
{
|
|
||||||
const char *callerstr = "glDebugMessageControlARB";
|
|
||||||
|
|
||||||
message_control(gl_source, gl_type, gl_severity, count, ids,
|
|
||||||
enabled, CONTROL_ARB, callerstr);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void GLAPIENTRY
|
|
||||||
_mesa_DebugMessageCallbackARB(GLDEBUGPROCARB callback, const void *userParam)
|
|
||||||
{
|
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
|
||||||
struct gl_debug_state *debug = _mesa_get_debug_state(ctx);
|
|
||||||
if (debug) {
|
|
||||||
debug->Callback = callback;
|
|
||||||
debug->CallbackData = userParam;
|
|
||||||
debug->ARBCallback = GL_TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_mesa_init_errors(struct gl_context *ctx)
|
_mesa_init_errors(struct gl_context *ctx)
|
||||||
{
|
{
|
||||||
|
|
|
@ -91,21 +91,6 @@ _mesa_shader_debug(struct gl_context *ctx, GLenum type, GLuint *id,
|
||||||
const char *msg, int len);
|
const char *msg, int len);
|
||||||
|
|
||||||
void GLAPIENTRY
|
void GLAPIENTRY
|
||||||
_mesa_DebugMessageInsertARB(GLenum source, GLenum type, GLuint id,
|
|
||||||
GLenum severity, GLint length,
|
|
||||||
const GLcharARB* buf);
|
|
||||||
GLuint GLAPIENTRY
|
|
||||||
_mesa_GetDebugMessageLogARB(GLuint count, GLsizei logSize, GLenum* sources,
|
|
||||||
GLenum* types, GLenum* ids, GLenum* severities,
|
|
||||||
GLsizei* lengths, GLcharARB* messageLog);
|
|
||||||
void GLAPIENTRY
|
|
||||||
_mesa_DebugMessageControlARB(GLenum source, GLenum type, GLenum severity,
|
|
||||||
GLsizei count, const GLuint *ids,
|
|
||||||
GLboolean enabled);
|
|
||||||
void GLAPIENTRY
|
|
||||||
_mesa_DebugMessageCallbackARB(GLDEBUGPROCARB callback,
|
|
||||||
const void *userParam);
|
|
||||||
void GLAPIENTRY
|
|
||||||
_mesa_DebugMessageInsert(GLenum source, GLenum type, GLuint id,
|
_mesa_DebugMessageInsert(GLenum source, GLenum type, GLuint id,
|
||||||
GLenum severity, GLint length,
|
GLenum severity, GLint length,
|
||||||
const GLchar* buf);
|
const GLchar* buf);
|
||||||
|
|
|
@ -3845,7 +3845,6 @@ struct gl_debug_state
|
||||||
const void *CallbackData;
|
const void *CallbackData;
|
||||||
GLboolean SyncOutput;
|
GLboolean SyncOutput;
|
||||||
GLboolean DebugOutput;
|
GLboolean DebugOutput;
|
||||||
GLboolean ARBCallback; /* Used to track if current callback is of type ARB_debug_output or KHR_debug */
|
|
||||||
GLboolean Defaults[MAX_DEBUG_GROUP_STACK_DEPTH][MESA_DEBUG_SEVERITY_COUNT][MESA_DEBUG_SOURCE_COUNT][MESA_DEBUG_TYPE_COUNT];
|
GLboolean Defaults[MAX_DEBUG_GROUP_STACK_DEPTH][MESA_DEBUG_SEVERITY_COUNT][MESA_DEBUG_SOURCE_COUNT][MESA_DEBUG_TYPE_COUNT];
|
||||||
struct gl_debug_namespace Namespaces[MAX_DEBUG_GROUP_STACK_DEPTH][MESA_DEBUG_SOURCE_COUNT][MESA_DEBUG_TYPE_COUNT];
|
struct gl_debug_namespace Namespaces[MAX_DEBUG_GROUP_STACK_DEPTH][MESA_DEBUG_SOURCE_COUNT][MESA_DEBUG_TYPE_COUNT];
|
||||||
struct gl_debug_msg Log[MAX_DEBUG_LOGGED_MESSAGES];
|
struct gl_debug_msg Log[MAX_DEBUG_LOGGED_MESSAGES];
|
||||||
|
|
|
@ -797,10 +797,6 @@ const struct function gl_core_functions_possible[] = {
|
||||||
{ "glGetFloati_v", 43, -1 },
|
{ "glGetFloati_v", 43, -1 },
|
||||||
{ "glGetDoublei_v", 43, -1 },
|
{ "glGetDoublei_v", 43, -1 },
|
||||||
// { "glCreateSyncFromCLeventARB", 43, -1 }, // XXX: Add to xml
|
// { "glCreateSyncFromCLeventARB", 43, -1 }, // XXX: Add to xml
|
||||||
{ "glDebugMessageControlARB", 43, -1 },
|
|
||||||
{ "glDebugMessageInsertARB", 43, -1 },
|
|
||||||
{ "glDebugMessageCallbackARB", 43, -1 },
|
|
||||||
{ "glGetDebugMessageLogARB", 43, -1 },
|
|
||||||
{ "glGetGraphicsResetStatusARB", 43, -1 },
|
{ "glGetGraphicsResetStatusARB", 43, -1 },
|
||||||
{ "glGetnMapdvARB", 43, -1 },
|
{ "glGetnMapdvARB", 43, -1 },
|
||||||
{ "glGetnMapfvARB", 43, -1 },
|
{ "glGetnMapfvARB", 43, -1 },
|
||||||
|
@ -836,16 +832,6 @@ const struct function gl_core_functions_possible[] = {
|
||||||
{ "glTextureStorage1DEXT", 43, -1 },
|
{ "glTextureStorage1DEXT", 43, -1 },
|
||||||
{ "glTextureStorage2DEXT", 43, -1 },
|
{ "glTextureStorage2DEXT", 43, -1 },
|
||||||
{ "glTextureStorage3DEXT", 43, -1 },
|
{ "glTextureStorage3DEXT", 43, -1 },
|
||||||
// { "glDebugMessageControl", 43, -1 }, // XXX: Add to xml
|
|
||||||
// { "glDebugMessageInsert", 43, -1 }, // XXX: Add to xml
|
|
||||||
// { "glDebugMessageCallback", 43, -1 }, // XXX: Add to xml
|
|
||||||
// { "glGetDebugMessageLog", 43, -1 }, // XXX: Add to xml
|
|
||||||
// { "glPushDebugGroup", 43, -1 }, // XXX: Add to xml
|
|
||||||
// { "glPopDebugGroup", 43, -1 }, // XXX: Add to xml
|
|
||||||
// { "glObjectLabel", 43, -1 }, // XXX: Add to xml
|
|
||||||
// { "glGetObjectLabel", 43, -1 }, // XXX: Add to xml
|
|
||||||
// { "glObjectPtrLabel", 43, -1 }, // XXX: Add to xml
|
|
||||||
// { "glGetObjectPtrLabel", 43, -1 }, // XXX: Add to xml
|
|
||||||
{ "glClearBufferData", 43, -1 },
|
{ "glClearBufferData", 43, -1 },
|
||||||
{ "glClearBufferSubData", 43, -1 },
|
{ "glClearBufferSubData", 43, -1 },
|
||||||
// { "glClearNamedBufferDataEXT", 43, -1 }, // XXX: Add to xml
|
// { "glClearNamedBufferDataEXT", 43, -1 }, // XXX: Add to xml
|
||||||
|
@ -896,7 +882,7 @@ const struct function gl_core_functions_possible[] = {
|
||||||
/* GL_ARB_internalformat_query */
|
/* GL_ARB_internalformat_query */
|
||||||
{ "glGetInternalformativ", 30, -1 },
|
{ "glGetInternalformativ", 30, -1 },
|
||||||
|
|
||||||
/* GL_KHR_debug */
|
/* GL_KHR_debug/GL_ARB_debug_output */
|
||||||
{ "glPushDebugGroup", 11, -1 },
|
{ "glPushDebugGroup", 11, -1 },
|
||||||
{ "glPopDebugGroup", 11, -1 },
|
{ "glPopDebugGroup", 11, -1 },
|
||||||
{ "glDebugMessageCallback", 11, -1 },
|
{ "glDebugMessageCallback", 11, -1 },
|
||||||
|
@ -907,6 +893,11 @@ const struct function gl_core_functions_possible[] = {
|
||||||
{ "glGetObjectPtrLabel", 11, -1 },
|
{ "glGetObjectPtrLabel", 11, -1 },
|
||||||
{ "glObjectLabel", 11, -1 },
|
{ "glObjectLabel", 11, -1 },
|
||||||
{ "glObjectPtrLabel", 11, -1 },
|
{ "glObjectPtrLabel", 11, -1 },
|
||||||
|
/* aliased versions checked above */
|
||||||
|
//{ "glDebugMessageControlARB", 11, -1 },
|
||||||
|
//{ "glDebugMessageInsertARB", 11, -1 },
|
||||||
|
//{ "glDebugMessageCallbackARB", 11, -1 },
|
||||||
|
//{ "glGetDebugMessageLogARB", 11, -1 },
|
||||||
|
|
||||||
/* GL_AMD_performance_monitor */
|
/* GL_AMD_performance_monitor */
|
||||||
{ "glGetPerfMonitorGroupsAMD", 11, -1 },
|
{ "glGetPerfMonitorGroupsAMD", 11, -1 },
|
||||||
|
|
Loading…
Reference in New Issue