diff options
author | Andres Rodriguez <[email protected]> | 2017-10-06 17:50:20 -0400 |
---|---|---|
committer | Andres Rodriguez <[email protected]> | 2018-01-30 15:13:49 -0500 |
commit | 260f7fcc46f5feb10a3bc5fe5f29f8f08a0c202c (patch) | |
tree | 8341aa389d86733bb88ce5e75830f30f6eb8f978 /src | |
parent | 382067f065fb758faeca27fb433c76cbb727ec53 (diff) |
mesa: add semaphore parameter stub v2
EXT_semaphore and EXT_semaphore_fd define no pnames. Therefore there
isn't much to do besides determining the correct error code.
v2: removed useless return
Signed-off-by: Andres Rodriguez <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/externalobjects.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/main/externalobjects.c b/src/mesa/main/externalobjects.c index 8b5ecb2cd8a..b72fe13d048 100644 --- a/src/mesa/main/externalobjects.c +++ b/src/mesa/main/externalobjects.c @@ -667,12 +667,32 @@ _mesa_IsSemaphoreEXT(GLuint semaphore) return obj ? GL_TRUE : GL_FALSE; } +/** + * Helper that outputs the correct error status for parameter + * calls where no pnames are defined + */ +static void +semaphore_parameter_stub(const char* func, GLenum pname) +{ + GET_CURRENT_CONTEXT(ctx); + + if (!ctx->Extensions.EXT_semaphore) { + _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func); + return; + } + + /* EXT_semaphore and EXT_semaphore_fd define no parameters */ + _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=0x%x)", func, pname); +} + void GLAPIENTRY _mesa_SemaphoreParameterui64vEXT(GLuint semaphore, GLenum pname, const GLuint64 *params) { + const char *func = "glSemaphoreParameterui64vEXT"; + semaphore_parameter_stub(func, pname); } void GLAPIENTRY @@ -680,7 +700,9 @@ _mesa_GetSemaphoreParameterui64vEXT(GLuint semaphore, GLenum pname, GLuint64 *params) { + const char *func = "glGetSemaphoreParameterui64vEXT"; + semaphore_parameter_stub(func, pname); } void GLAPIENTRY |