glsl: test loop unroll with uint overflow
[piglit.git] / tests / spec / glx_ext_import_context / common.h
blobec906a2504ef3456c926d7c31ac1bac7a42b57cb
1 /* Copyright © 2011 Intel Corporation
3 * Permission is hereby granted, free of charge, to any person obtaining a
4 * copy of this software and associated documentation files (the "Software"),
5 * to deal in the Software without restriction, including without limitation
6 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 * and/or sell copies of the Software, and to permit persons to whom the
8 * Software is furnished to do so, subject to the following conditions:
10 * The above copyright notice and this permission notice (including the next
11 * paragraph) shall be included in all copies or substantial portions of the
12 * Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 * IN THE SOFTWARE.
23 extern PFNGLXGETCURRENTDISPLAYEXTPROC __piglit_glXGetCurrentDisplayEXT;
24 #define glXGetCurrentDisplayEXT() (*__piglit_glXGetCurrentDisplayEXT)()
26 extern PFNGLXQUERYCONTEXTINFOEXTPROC __piglit_glXQueryContextInfoEXT;
27 #define glXQueryContextInfoEXT(dpy, ctx, attrib, value) \
28 (*__piglit_glXQueryContextInfoEXT)(dpy, ctx, attrib, value)
30 extern PFNGLXGETCONTEXTIDEXTPROC __piglit_glXGetContextIDEXT;
31 #define glXGetContextIDEXT(ctx) (*__piglit_glXGetContextIDEXT)(ctx)
33 extern PFNGLXIMPORTCONTEXTEXTPROC __piglit_glXImportContextEXT;
34 #define glXImportContextEXT(dpy, ctx) (*__piglit_glXImportContextEXT)(dpy, ctx)
36 extern PFNGLXFREECONTEXTEXTPROC __piglit_glXFreeContextEXT;
37 #define glXFreeContextEXT(dpy, ctx) (*__piglit_glXFreeContextEXT)(dpy, ctx)
39 extern Display *dpy;
40 extern XVisualInfo *visinfo;
41 extern GLXContext directCtx;
42 extern GLXContextID directID;
43 extern GLXContext indirectCtx;
44 extern GLXContextID indirectID;
45 extern int glx_error_code;
46 extern int x_error_code;
48 extern void GLX_EXT_import_context_setup(void);
50 extern void GLX_EXT_import_context_teardown(void);
52 extern void GLX_EXT_import_context_setup_for_child(void);
54 extern void get_context_IDs(void);
56 enum context_mode {
57 direct_rendering = 0,
58 indirect_rendering,
59 invalid
62 extern bool validate_glx_error_code(int expected_x_error, int expected_glx_error);
64 extern const char *context_mode_name(enum context_mode mode);
66 extern bool try_import_context(GLXContextID id, enum context_mode mode);