From: Timothy Arceri Date: Mon, 26 Aug 2019 04:01:52 +0000 (+1000) Subject: mesa: implement glIsNamedStringARB() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=575137e61348ae0fdc6da4a6c280bc4148b8628f;p=mesa.git mesa: implement glIsNamedStringARB() Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Witold Baryluk --- diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 13faf787a2d..0af9871a508 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -3416,7 +3416,20 @@ _mesa_CompileShaderIncludeARB(GLuint shader, GLsizei count, GLboolean GLAPIENTRY _mesa_IsNamedStringARB(GLint namelen, const GLchar *name) { - return false; + GET_CURRENT_CONTEXT(ctx); + + if (!name) + return false; + + char *name_cp = copy_string(ctx, name, namelen, ""); + + const char *source = _mesa_lookup_shader_include(ctx, name_cp, false); + free(name_cp); + + if (!source) + return false; + + return true; } GLvoid GLAPIENTRY