summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Justen <jljusten@gmail.com>2014-03-01 21:25:26 -0800
committerChad Versace <chad.versace@linux.intel.com>2014-03-07 17:02:27 -0800
commit3991ad8398cb880383fb83edaf44fb1b9dd5ff15 (patch)
treec6f20d41bfbbab8973a4882f19eaa12cc906377d
parentc8b09b01f69424b86b71d3a4ddba0a4704a3fcab (diff)
utils/wflinfo: allow requesting a compat profile without a version
Similar to the behavior of --profile=core, we will now scan a list of 'known' profile supporting GL versions when the user requests a compat profile, but does not specify a version. Tested on the NVIDIA 310.44 driver. It exposes GL_ARB_compatibility as expected when --profile=compat is used, and does not when --profile=core is used. Signed-off-by: Jordan Justen <jljusten@gmail.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--src/utils/wflinfo.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c
index ed61620..89a8432 100644
--- a/src/utils/wflinfo.c
+++ b/src/utils/wflinfo.c
@@ -695,19 +695,19 @@ wflinfo_create_context(struct options *opts,
{
struct waffle_context *ctx;
- if (opts->context_profile == WAFFLE_CONTEXT_CORE_PROFILE &&
+ if (opts->context_profile != WAFFLE_NONE &&
opts->context_api == WAFFLE_CONTEXT_OPENGL &&
opts->context_version == -1) {
- // If the user requested OpenGL and a CORE profile, but
- // they didn't specify a version, then we'll try a set
+ // If the user requested OpenGL and a CORE or COMPAT profile,
+ // but they didn't specify a version, then we'll try a set
// of known versions from highest to lowest.
- static int known_gl_core_versions[] =
+ static int known_gl_profile_versions[] =
{ 32, 33, 40, 41, 42, 43, 44 };
- for (int i = ARRAY_SIZE(known_gl_core_versions) - 1; i >= 0; i--) {
- opts->context_version = known_gl_core_versions[i];
+ for (int i = ARRAY_SIZE(known_gl_profile_versions) - 1; i >= 0; i--) {
+ opts->context_version = known_gl_profile_versions[i];
ctx = wflinfo_try_create_context(opts, config, dpy);
opts->context_version = -1;
if (ctx)