From 8b1c332a77555b94f5665517e5fdcb416e1a67b7 Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Wed, 10 Feb 2010 18:04:07 +0100 Subject: Simplify GLSL extension mechanism. Since extension name and extension name string are the same, collapse them into one name. --- src/glsl/pp/sl_pp_extension.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/glsl/pp/sl_pp_extension.c') diff --git a/src/glsl/pp/sl_pp_extension.c b/src/glsl/pp/sl_pp_extension.c index 8af5731e84..630a7975c7 100644 --- a/src/glsl/pp/sl_pp_extension.c +++ b/src/glsl/pp/sl_pp_extension.c @@ -34,8 +34,7 @@ int sl_pp_context_add_extension(struct sl_pp_context *context, - const char *name, - const char *name_string) + const char *name) { struct sl_pp_extension ext; @@ -48,11 +47,6 @@ sl_pp_context_add_extension(struct sl_pp_context *context, return -1; } - ext.name_string = sl_pp_context_add_unique_str(context, name_string); - if (ext.name_string == -1) { - return -1; - } - context->extensions[context->num_extensions++] = ext; return 0; } @@ -86,7 +80,7 @@ sl_pp_process_extension(struct sl_pp_context *context, out.data.extension = -1; for (i = 0; i < context->num_extensions; i++) { - if (extension_name == context->extensions[i].name_string) { + if (extension_name == context->extensions[i].name) { out.data.extension = extension_name; break; } -- cgit v1.2.3