From: Andres Rodriguez Date: Thu, 21 Dec 2017 22:59:07 +0000 (-0500) Subject: mesa: fix error codes for importing memory/semaphore FDs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ebd3cc86318269a1fafc368b0fd95c71b19c634;p=mesa.git mesa: fix error codes for importing memory/semaphore FDs This fixes the following piglit tests: spec/ext_semaphore_fd/api-errors/import-semaphore-fd-bad-enum spec/ext_memory_object_fd/api-errors/import-memory-fd-bad-enum Signed-off-by: Andres Rodriguez Reviewed-by: Marek Olšák --- diff --git a/src/mesa/main/externalobjects.c b/src/mesa/main/externalobjects.c index 8f31ba4c354..463debd268a 100644 --- a/src/mesa/main/externalobjects.c +++ b/src/mesa/main/externalobjects.c @@ -809,7 +809,7 @@ _mesa_ImportMemoryFdEXT(GLuint memory, } if (handleType != GL_HANDLE_TYPE_OPAQUE_FD_EXT) { - _mesa_error(ctx, GL_INVALID_VALUE, "%s(handleType=%u)", func, handleType); + _mesa_error(ctx, GL_INVALID_ENUM, "%s(handleType=%u)", func, handleType); return; } @@ -836,7 +836,7 @@ _mesa_ImportSemaphoreFdEXT(GLuint semaphore, } if (handleType != GL_HANDLE_TYPE_OPAQUE_FD_EXT) { - _mesa_error(ctx, GL_INVALID_VALUE, "%s(handleType=%u)", func, handleType); + _mesa_error(ctx, GL_INVALID_ENUM, "%s(handleType=%u)", func, handleType); return; }