From: Marek Olšák Date: Thu, 20 Feb 2020 02:57:58 +0000 (-0500) Subject: glthread: add support for glClearNamedFramebuffer, glMaterial, glPointParameter X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1668a9390321e31ee19292590874e9b16a498936;p=mesa.git glthread: add support for glClearNamedFramebuffer, glMaterial, glPointParameter Reviewed-by: Timothy Arceri Part-of: --- diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index c652a412aa7..3e39253c2a9 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -222,21 +222,21 @@ - + - + - + diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 849a0b28d33..ff4bd8144d7 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -2080,7 +2080,8 @@ - + @@ -2094,7 +2095,8 @@ - + @@ -4780,7 +4782,8 @@ - + @@ -4792,7 +4795,8 @@ - + diff --git a/src/mapi/glapi/gen/gl_and_es_API.xml b/src/mapi/glapi/gen/gl_and_es_API.xml index 7d33d6dcf4a..6fd2c8dec66 100644 --- a/src/mapi/glapi/gen/gl_and_es_API.xml +++ b/src/mapi/glapi/gen/gl_and_es_API.xml @@ -107,7 +107,8 @@ - + @@ -257,7 +258,8 @@ - + diff --git a/src/mesa/main/marshal.h b/src/mesa/main/marshal.h index fc69f2704b8..a9d9569ad11 100644 --- a/src/mesa/main/marshal.h +++ b/src/mesa/main/marshal.h @@ -404,4 +404,40 @@ _mesa_texgen_enum_to_count(GLenum pname) } } +static inline unsigned +_mesa_material_enum_to_count(GLenum pname) +{ + switch (pname) { + case GL_EMISSION: + case GL_AMBIENT: + case GL_DIFFUSE: + case GL_SPECULAR: + case GL_AMBIENT_AND_DIFFUSE: + return 4; + case GL_COLOR_INDEXES: + return 3; + case GL_SHININESS: + return 1; + default: + return 0; + } +} + +static inline unsigned +_mesa_point_param_enum_to_count(GLenum pname) +{ + switch (pname) { + case GL_DISTANCE_ATTENUATION_EXT: + return 3; + case GL_POINT_SIZE_MIN_EXT: + case GL_POINT_SIZE_MAX_EXT: + case GL_POINT_FADE_THRESHOLD_SIZE_EXT: + case GL_POINT_SPRITE_R_MODE_NV: + case GL_POINT_SPRITE_COORD_ORIGIN: + return 1; + default: + return 0; + } +} + #endif /* MARSHAL_H */