summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2017-07-27 16:02:33 -0400
committerAdam Jackson <ajax@redhat.com>2017-07-31 10:59:09 -0400
commitdb0dd06ddf47d5190f2349ed8b0e71caa9e8e1eb (patch)
treed97455c9ddc3cd495b070984e6158f9b7b176af3
parent3050d277616ef472a24d8ccd24afcbf8e31ed80e (diff)
glx: Allow arbitrary context attributes for direct contexts
For direct contexts, most context attributes don't require any particular awareness on the part of the server. Examples include GLX_ARB_create_context_no_error and GLX_ARB_context_flush_control, where all of the behavior change lives in the renderer; since that's on the client side for a direct context, there's no reason for the X server to validate the attribute. The context attributes will still be validated on the client side, and we still validate attributes for indirect contexts since the server implementation might need to handle them. For example, the indirect code might internally use ARB_context_flush_control for all contexts, in which case it would need to manually emit glFlush when the client switches between two indirect contexts that didn't request the no-flush attribute. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
-rw-r--r--glx/createcontext.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/glx/createcontext.c b/glx/createcontext.c
index c8b36ebb0..068b35fa7 100644
--- a/glx/createcontext.c
+++ b/glx/createcontext.c
@@ -207,7 +207,9 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
#endif
default:
- return BadValue;
+ if (!req->isDirect)
+ return BadValue;
+ break;
}
}