summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Justen <jljusten@gmail.com>2014-03-01 21:13:24 -0800
committerJordan Justen <jljusten@gmail.com>2014-03-01 21:13:24 -0800
commit4bce150ce69aa186ffbec469de1c5bdf77eb24c7 (patch)
tree3df8e161f99b6f2f4435738b08f66632392e703e
parente68b81f6bcb672bbbcd821b5f6512a1e2f797ccb (diff)
wflinfo: support --profile=compat without a specified versionwflinfo
Similar to the behavior of --profile=core, we will now scan a list of 'known' profile supporting GL versions when the user specifies 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>
-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 ee0a50b..c8d490a 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)