[Mesa-dev] [PATCH 7/7] mesa: HACK! tweak the MAX_DEBUG_MESSAGE_LENGTH limit
Timothy Arceri
t_arceri at yahoo.com.au
Sun Nov 22 16:35:19 PST 2015
On Sun, 2015-11-22 at 23:21 +0000, Emil Velikov wrote:
> Based on one's interpretation of the spec one may say that length (when
> non negative) either considers or doesn't the null terminator.
>
> I'm leaning towards the latter case, although the CTS authors are
> thinking about the former.
The spec says:
"The lengths of all messages, including their null terminators, must be
guaranteed to be less or equal to the value of the
implementation-dependent constant MAX_DEBUG_MESSAGE_LENGTH."
>
> Hack this for now and think about it later :-)
>
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
> src/mesa/main/errors.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c
> index b10c421..63fd910 100644
> --- a/src/mesa/main/errors.c
> +++ b/src/mesa/main/errors.c
> @@ -970,7 +970,7 @@ error:
> static GLboolean
> validate_length(struct gl_context *ctx, const char *callerstr, GLsizei
> length)
> {
> - if (length >= MAX_DEBUG_MESSAGE_LENGTH) {
> + if (length+1 >= MAX_DEBUG_MESSAGE_LENGTH) {
> _mesa_error(ctx, GL_INVALID_VALUE,
> "%s(length=%d, which is not less than "
> "GL_MAX_DEBUG_MESSAGE_LENGTH=%d)", callerstr, length,
More information about the mesa-dev
mailing list