mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 14:50:10 +01:00
slang: Predefine ES symbols for FEATURE_es2_glsl.
This commit is contained in:
parent
417f36ccb0
commit
f00805a117
1 changed files with 9 additions and 0 deletions
|
|
@ -2610,6 +2610,15 @@ compile_with_grammar(const char *source,
|
|||
return GL_FALSE;
|
||||
}
|
||||
|
||||
#if FEATURE_es2_glsl
|
||||
if (sl_pp_context_add_predefined(context, "GL_ES", "1") ||
|
||||
sl_pp_context_add_predefined(context, "GL_FRAGMENT_PRECISION_HIGH", "1")) {
|
||||
slang_info_log_error(infolog, "%s", sl_pp_context_error_message(context));
|
||||
sl_pp_context_destroy(context);
|
||||
return GL_FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
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));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue