summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2016-09-14 13:51:19 -0700
committerIan Romanick <[email protected]>2016-09-27 12:06:46 -0700
commit798d1b8816fed0a88674c6d89d56e478519a5a55 (patch)
treee7e2c66e29393a9700a0a81835801d476fbb8d30 /src/compiler
parentafd99734db400ad5c0357735f239d45436809b7e (diff)
glsl/standalone: Use API_OPENGL_CORE if the GLSL version is >= 1.40
Otherwise extensions to 1.40 that are only for core profile won't work. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/standalone.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/glsl/standalone.cpp b/src/compiler/glsl/standalone.cpp
index d6e68291977..a7e625489f3 100644
--- a/src/compiler/glsl/standalone.cpp
+++ b/src/compiler/glsl/standalone.cpp
@@ -331,7 +331,11 @@ standalone_compile_shader(const struct standalone_options *_options,
return NULL;
}
- initialize_context(ctx, (glsl_es) ? API_OPENGLES2 : API_OPENGL_COMPAT);
+ if (glsl_es) {
+ initialize_context(ctx, API_OPENGLES2);
+ } else {
+ initialize_context(ctx, options->glsl_version > 130 ? API_OPENGL_CORE : API_OPENGL_COMPAT);
+ }
struct gl_shader_program *whole_program;