From 575137e61348ae0fdc6da4a6c280bc4148b8628f Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Mon, 26 Aug 2019 14:01:52 +1000 Subject: mesa: implement glIsNamedStringARB() Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Witold Baryluk --- src/mesa/main/shaderapi.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/shaderapi.c') 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 -- cgit v1.2.3