From 2eed9ff2fb5b218b7b274d2989b0dbbe5fcfedef Mon Sep 17 00:00:00 2001 From: Tomasz Lis Date: Thu, 18 Jul 2013 14:19:38 -0700 Subject: 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 Signed-off-by: Ian Romanick Reviewed-by: Ian Romanick --- src/mesa/drivers/x11/fakeglx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index 7a2cfbeda7c..def157f52df 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -2325,7 +2325,10 @@ Fake_glXCreateNewContext( Display *dpy, GLXFBConfig config, XMesaVisual xmvis = (XMesaVisual) config; if (!dpy || !config || - (renderType != GLX_RGBA_TYPE && renderType != GLX_COLOR_INDEX_TYPE)) + (renderType != GLX_RGBA_TYPE && + renderType != GLX_COLOR_INDEX_TYPE && + renderType != GLX_RGBA_FLOAT_TYPE_ARB && + renderType != GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT)) return 0; glxCtx = CALLOC_STRUCT(fake_glx_context); -- cgit v1.2.3