aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2019-08-26 14:01:52 +1000
committerTimothy Arceri <[email protected]>2019-11-20 05:05:55 +0000
commit575137e61348ae0fdc6da4a6c280bc4148b8628f (patch)
tree74c224b80fb8125a48220c74e958d2d5cd2989fb
parentfafda321275984c19476795257552eb18d640a38 (diff)
mesa: implement glIsNamedStringARB()
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Reviewed-by: Witold Baryluk <[email protected]>
-rw-r--r--src/mesa/main/shaderapi.c15
1 files changed, 14 insertions, 1 deletions
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