mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 05:48:07 +02:00
mesa: Include null terminator in GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH.
From the KHR_debug spec: "Applications can query the number of messages currently in the log by obtaining the value of DEBUG_LOGGED_MESSAGES, and the string length (including its null terminator) of the oldest message in the log through the value of DEBUG_NEXT_LOGGED_MESSAGE_LENGTH." Because we weren't including the null terminator, many dEQP tests called glGetDebugMessageLog with a bufSize parameter that was 1 too small, and unable to contain the message, so we skipped returning it, failing many cases. Fixes 298 dEQP-GLES31.functional.debug.* tests. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Stephane Marchesin <stephane.marchesin@gmail.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
This commit is contained in:
parent
6b763c026d
commit
412e686da9
1 changed files with 1 additions and 1 deletions
|
|
@ -779,7 +779,7 @@ _mesa_get_debug_state_int(struct gl_context *ctx, GLenum pname)
|
|||
break;
|
||||
case GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH:
|
||||
val = (debug->Log.NumMessages) ?
|
||||
debug->Log.Messages[debug->Log.NextMessage].length : 0;
|
||||
debug->Log.Messages[debug->Log.NextMessage].length + 1 : 0;
|
||||
break;
|
||||
case GL_DEBUG_GROUP_STACK_DEPTH:
|
||||
val = debug->CurrentGroup + 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue