From: Marek Olšák Date: Thu, 20 Feb 2020 03:06:53 +0000 (-0500) Subject: glthread: add support for glCallLists, glPatchParameterfv X-Git-Tag: upstream/20.1.8~2804 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b5c58bbf6ce49199eca076225a7985f3e149ffd3;p=platform%2Fupstream%2Fmesa.git glthread: add support for glCallLists, glPatchParameterfv Reviewed-by: Timothy Arceri Part-of: --- diff --git a/src/mapi/glapi/gen/ARB_tessellation_shader.xml b/src/mapi/glapi/gen/ARB_tessellation_shader.xml index d0b0375..696dfe4 100644 --- a/src/mapi/glapi/gen/ARB_tessellation_shader.xml +++ b/src/mapi/glapi/gen/ARB_tessellation_shader.xml @@ -56,7 +56,7 @@ - + diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index ff4bd81..e9f2713 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -1127,7 +1127,8 @@ - + diff --git a/src/mesa/main/marshal.h b/src/mesa/main/marshal.h index a9d9569..350e7c4 100644 --- a/src/mesa/main/marshal.h +++ b/src/mesa/main/marshal.h @@ -440,4 +440,40 @@ _mesa_point_param_enum_to_count(GLenum pname) } } +static inline unsigned +_mesa_calllists_enum_to_count(GLenum type) +{ + switch (type) { + case GL_BYTE: + case GL_UNSIGNED_BYTE: + return 1; + case GL_SHORT: + case GL_UNSIGNED_SHORT: + case GL_2_BYTES: + return 2; + case GL_3_BYTES: + return 3; + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + case GL_4_BYTES: + return 4; + default: + return 0; + } +} + +static inline unsigned +_mesa_patch_param_enum_to_count(GLenum pname) +{ + switch (pname) { + case GL_PATCH_DEFAULT_OUTER_LEVEL: + return 4; + case GL_PATCH_DEFAULT_INNER_LEVEL: + return 2; + default: + return 0; + } +} + #endif /* MARSHAL_H */