glx: Implement glx_screen_vtable::create_context_attribs for indirect contexts
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 30 Nov 2011 21:10:17 +0000 (13:10 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 2 Jan 2012 20:41:44 +0000 (12:41 -0800)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
src/glx/indirect_glx.c

index b628688851a4dd1efa1747c1e1be0a1f4a4644b7..2399375a9bc2569bda92aa0bff7cea23502576b7 100644 (file)
@@ -436,9 +436,31 @@ indirect_create_context(struct glx_screen *psc,
    return gc;
 }
 
+static struct glx_context *
+indirect_create_context_attribs(struct glx_screen *base,
+                               struct glx_config *config_base,
+                               struct glx_context *shareList,
+                               unsigned num_attribs,
+                               const uint32_t *attribs,
+                               unsigned *error)
+{
+   /* All of the attribute validation for indirect contexts is handled on the
+    * server, so there's not much to do here.
+    */
+   (void) num_attribs;
+   (void) attribs;
+
+   /* The error parameter is only used on the server so that correct GLX
+    * protocol errors can be generated.  On the client, it can be ignored.
+    */
+   (void) error;
+
+   return indirect_create_context(base, config_base, shareList, 0);
+}
+
 struct glx_screen_vtable indirect_screen_vtable = {
    indirect_create_context,
-   NULL
+   indirect_create_context_attribs
 };
 
 _X_HIDDEN struct glx_screen *