summaryrefslogtreecommitdiffstats
path: root/src/glsl/pp/sl_pp_version.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/pp/sl_pp_version.c')
-rw-r--r--src/glsl/pp/sl_pp_version.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/glsl/pp/sl_pp_version.c b/src/glsl/pp/sl_pp_version.c
index 6cd63f4925c..814da46a672 100644
--- a/src/glsl/pp/sl_pp_version.c
+++ b/src/glsl/pp/sl_pp_version.c
@@ -79,18 +79,11 @@ sl_pp_version(struct sl_pp_context *context,
break;
case SL_PP_IDENTIFIER:
- {
- const char *id = sl_pp_context_cstr(context, input[i].data.identifier);
-
- if (!id) {
- return -1;
- }
- if (strcmp(id, "version")) {
- return 0;
- }
- i++;
- found_version = 1;
+ if (input[i].data.identifier != context->dict.version) {
+ return 0;
}
+ i++;
+ found_version = 1;
break;
default: