slang: Explicitly enable ARB_draw_buffers and ARB_texture_rectangle.
authorMichal Krol <michal@vmware.com>
Thu, 10 Dec 2009 11:39:10 +0000 (12:39 +0100)
committerMichal Krol <michal@vmware.com>
Thu, 10 Dec 2009 11:39:10 +0000 (12:39 +0100)
They are no longer built into the glsl preprocessor.

src/mesa/shader/slang/slang_compile.c

index a194f2fc9e649e47bda2eef174f5f9d62949c7fc..00db299a271b08e0006241f2f6cfafc078a8d826 100644 (file)
@@ -2603,6 +2603,13 @@ compile_with_grammar(const char *source,
       return GL_FALSE;
    }
 
+   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")) {
+      slang_info_log_error(infolog, "%s", sl_pp_context_error_message(context));
+      sl_pp_context_destroy(context);
+      return GL_FALSE;
+   }
+
    memset(&options, 0, sizeof(options));
    if (sl_pp_tokenise(context, source, &options, &intokens)) {
       slang_info_log_error(infolog, "%s", sl_pp_context_error_message(context));