Mesa (glsl-pp-rework-2): glsl/apps: Explicitly add ARB_draw_buffers and ARB_texture_rectangle.
MichaŠKról
michal at kemper.freedesktop.org
Thu Dec 10 11:59:45 UTC 2009
Module: Mesa
Branch: glsl-pp-rework-2
Commit: d1a09a9ba4a56067cc41e87d00fd7c395f0e7345
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d1a09a9ba4a56067cc41e87d00fd7c395f0e7345
Author: Michal Krol <michal at vmware.com>
Date: Thu Dec 10 12:39:37 2009 +0100
glsl/apps: Explicitly add ARB_draw_buffers and ARB_texture_rectangle.
---
src/glsl/apps/compile.c | 11 +++++++++++
src/glsl/apps/process.c | 11 +++++++++++
2 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/glsl/apps/compile.c b/src/glsl/apps/compile.c
index 03e6e58..63c2099 100644
--- a/src/glsl/apps/compile.c
+++ b/src/glsl/apps/compile.c
@@ -151,6 +151,17 @@ main(int argc,
return 0;
}
+ if (sl_pp_context_add_extension(context, "ARB_draw_buffers", "GL_ARB_draw_buffers") ||
+ sl_pp_context_add_extension(context, "ARB_texture_rectangle", "GL_ARB_texture_rectangle")) {
+ fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context));
+
+ printf("Error: %s\n", sl_pp_context_error_message(context));
+ sl_pp_context_destroy(context);
+ free(tokens);
+ fclose(out);
+ return 0;
+ }
+
if (sl_pp_process(context, &tokens[tokens_eaten], &outtokens)) {
fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context));
diff --git a/src/glsl/apps/process.c b/src/glsl/apps/process.c
index 2cec9a9..6c5c7bc 100644
--- a/src/glsl/apps/process.c
+++ b/src/glsl/apps/process.c
@@ -121,6 +121,17 @@ main(int argc,
return -1;
}
+ if (sl_pp_context_add_extension(context, "ARB_draw_buffers", "GL_ARB_draw_buffers") ||
+ sl_pp_context_add_extension(context, "ARB_texture_rectangle", "GL_ARB_texture_rectangle")) {
+ fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context));
+
+ printf("Error: %s\n", sl_pp_context_error_message(context));
+ sl_pp_context_destroy(context);
+ free(tokens);
+ fclose(out);
+ return 0;
+ }
+
if (sl_pp_process(context, &tokens[tokens_eaten], &outtokens)) {
fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context));
More information about the mesa-commit
mailing list