glthread: add support for glMemoryObjectParameteriv, glSemaphoreParameterui64v

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
This commit is contained in:
Marek Olšák
2020-02-19 22:15:51 -05:00
committed by Marge Bot
parent b5c58bbf6c
commit b9eef27920
2 changed files with 23 additions and 2 deletions

View File

@@ -55,7 +55,7 @@
<function name="MemoryObjectParameterivEXT" es2="3.2">
<param name="memoryObject" type="GLuint"/>
<param name="pname" type="GLenum"/>
<param name="params" type="const GLint *"/>
<param name="params" type="const GLint *" count="_mesa_memobj_enum_to_count(pname)"/>
</function>
<function name="GetMemoryObjectParameterivEXT" es2="3.2">
@@ -202,7 +202,7 @@
<function name="SemaphoreParameterui64vEXT" es2="3.2">
<param name="semaphore" type="GLuint"/>
<param name="pname" type="GLenum"/>
<param name="params" type="const GLuint64 *"/>
<param name="params" type="const GLuint64 *" count="_mesa_semaphore_enum_to_count(pname)"/>
</function>
<function name="GetSemaphoreParameterui64vEXT" es2="3.2">

View File

@@ -476,4 +476,25 @@ _mesa_patch_param_enum_to_count(GLenum pname)
}
}
static inline unsigned
_mesa_memobj_enum_to_count(GLenum pname)
{
switch (pname) {
case GL_DEDICATED_MEMORY_OBJECT_EXT:
return 1;
default:
return 0;
}
}
static inline unsigned
_mesa_semaphore_enum_to_count(GLenum pname)
{
switch (pname) {
/* EXT_semaphore and EXT_semaphore_fd define no parameters */
default:
return 0;
}
}
#endif /* MARSHAL_H */