glx: Validate the GLX_RENDER_TYPE value
Correctly handle the value of renderType in GLX context. In case of the
value being incorrect, context creation fails.
v2 (idr): indirect_create_context is just a memory allocator, so don't
validate the GLX_RENDER_TYPE there. Fixes regressions in several
GLX_ARB_create_context piglit tests.
Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h
index 5b99e09..81ae792 100644
--- a/src/glx/glxclient.h
+++ b/src/glx/glxclient.h
@@ -803,6 +803,9 @@
applegl_create_display(struct glx_display *display);
#endif
+extern Bool validate_renderType_against_config(const struct glx_config *config,
+ int renderType);
+
extern struct glx_drawable *GetGLXDrawable(Display *dpy, GLXDrawable drawable);
extern int InitGLXDrawable(Display *dpy, struct glx_drawable *glxDraw,