mesa: implement glIsNamedStringARB()
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 26 Aug 2019 04:01:52 +0000 (14:01 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 20 Nov 2019 05:05:55 +0000 (05:05 +0000)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
src/mesa/main/shaderapi.c

index 13faf787a2d68af0233ecc94e6a410bd455cc06c..0af9871a508c80c40caad4117b4b30c15dea3d69 100644 (file)
@@ -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