aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/pp
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2010-02-10 18:04:07 +0100
committerMichal Krol <[email protected]>2010-02-10 18:04:07 +0100
commit8b1c332a77555b94f5665517e5fdcb416e1a67b7 (patch)
treeca8a42e51ab93b99d389e39237bdd4031a7bc4a5 /src/glsl/pp
parentc1395a71ac5f279edca933a325e32e1512e0046b (diff)
Simplify GLSL extension mechanism.
Since extension name and extension name string are the same, collapse them into one name.
Diffstat (limited to 'src/glsl/pp')
-rw-r--r--src/glsl/pp/sl_pp_context.h3
-rw-r--r--src/glsl/pp/sl_pp_extension.c10
-rw-r--r--src/glsl/pp/sl_pp_public.h3
3 files changed, 4 insertions, 12 deletions
diff --git a/src/glsl/pp/sl_pp_context.h b/src/glsl/pp/sl_pp_context.h
index 3eada380cd1..7b9f494f130 100644
--- a/src/glsl/pp/sl_pp_context.h
+++ b/src/glsl/pp/sl_pp_context.h
@@ -44,8 +44,7 @@
#define SL_PP_MAX_PREDEFINED 16
struct sl_pp_extension {
- int name; /*< VENDOR_extension_name */
- int name_string; /*< GL_VENDOR_extension_name */
+ int name; /*< GL_VENDOR_extension_name */
};
struct sl_pp_predefined {
diff --git a/src/glsl/pp/sl_pp_extension.c b/src/glsl/pp/sl_pp_extension.c
index 8af5731e840..630a7975c75 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;
}
diff --git a/src/glsl/pp/sl_pp_public.h b/src/glsl/pp/sl_pp_public.h
index 12528d6f8d1..ca6f722543d 100644
--- a/src/glsl/pp/sl_pp_public.h
+++ b/src/glsl/pp/sl_pp_public.h
@@ -53,8 +53,7 @@ sl_pp_context_error_position(const struct sl_pp_context *context,
int
sl_pp_context_add_extension(struct sl_pp_context *context,
- const char *name,
- const char *name_string);
+ const char *name);
int
sl_pp_context_add_predefined(struct sl_pp_context *context,