diff options
author | Timothy Arceri <[email protected]> | 2019-08-27 14:22:30 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2019-11-20 05:05:55 +0000 |
commit | f2d01cac7ea3e696c6e61952443920aa14637e7d (patch) | |
tree | 651e17375e754fb6851ad2b3dbfd7c8bdb633b77 /src/mesa/main/shaderapi.c | |
parent | ae2e41841fa93a14e76f63033b7691c007141062 (diff) |
mesa: split _mesa_lookup_shader_include() in two
The new local function lookup_shader_include() will be used by
glDeleteNamedStringARB() in the following patch.
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Reviewed-by: Witold Baryluk <[email protected]>
Diffstat (limited to 'src/mesa/main/shaderapi.c')
-rw-r--r-- | src/mesa/main/shaderapi.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 77513c5c529..162015c5b39 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -3280,9 +3280,9 @@ validate_and_tokenise_sh_incl(struct gl_context *ctx, return true; } -const char * -_mesa_lookup_shader_include(struct gl_context *ctx, char *path, - bool error_check) +static struct sh_incl_path_ht_entry * +lookup_shader_include(struct gl_context *ctx, char *path, + bool error_check) { void *mem_ctx = ralloc_context(NULL); struct sh_incl_path_entry *path_list; @@ -3313,7 +3313,17 @@ _mesa_lookup_shader_include(struct gl_context *ctx, char *path, ralloc_free(mem_ctx); - return sh_incl_ht_entry ? sh_incl_ht_entry->shader_source : NULL; + return sh_incl_ht_entry; +} + +const char * +_mesa_lookup_shader_include(struct gl_context *ctx, char *path, + bool error_check) +{ + struct sh_incl_path_ht_entry *shader_include = + lookup_shader_include(ctx, path, error_check); + + return shader_include ? shader_include->shader_source : NULL; } static char * |