revert 213 commits (to 56092) from the last month. 10 still need work to resolve...
[AROS.git] / workbench / libs / mesa / src / gallium / auxiliary / util / u_caps.h
blob7bd2380041426f3c35372b289a3c3710d14fe920
1 /**************************************************************************
3 * Copyright 2010 Vmware, Inc.
4 * All Rights Reserved.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
16 * of the Software.
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 **************************************************************************/
28 #ifndef U_CAPS_H
29 #define U_CAPS_H
31 #include "pipe/p_compiler.h"
33 struct pipe_screen;
35 enum u_caps_check_enum {
36 UTIL_CAPS_CHECK_TERMINATE = 0,
37 UTIL_CAPS_CHECK_CAP,
38 UTIL_CAPS_CHECK_INT,
39 UTIL_CAPS_CHECK_FLOAT,
40 UTIL_CAPS_CHECK_FORMAT,
41 UTIL_CAPS_CHECK_SHADER,
42 UTIL_CAPS_CHECK_UNIMPLEMENTED,
45 #define UTIL_CHECK_CAP(cap) \
46 UTIL_CAPS_CHECK_CAP, PIPE_CAP_##cap
48 #define UTIL_CHECK_INT(cap, higher) \
49 UTIL_CAPS_CHECK_INT, PIPE_CAP_##cap, (unsigned)(higher)
51 /* Floats currently lose precision */
52 #define UTIL_CHECK_FLOAT(cap, higher) \
53 UTIL_CAPS_CHECK_FLOAT, PIPE_CAP_##cap, (unsigned)(int)(higher)
55 #define UTIL_CHECK_FORMAT(format) \
56 UTIL_CAPS_CHECK_FORMAT, PIPE_FORMAT_##format
58 #define UTIL_CHECK_SHADER(shader, cap, higher) \
59 UTIL_CAPS_CHECK_SHADER, (PIPE_SHADER_##shader << 24) | PIPE_SHADER_CAP_##cap, (unsigned)(higher)
61 #define UTIL_CHECK_UNIMPLEMENTED \
62 UTIL_CAPS_CHECK_UNIMPLEMENTED
64 #define UTIL_CHECK_TERMINATE \
65 UTIL_CAPS_CHECK_TERMINATE
67 boolean util_check_caps(struct pipe_screen *screen, const unsigned *list);
68 boolean util_check_caps_out(struct pipe_screen *screen, const unsigned *list, int *out);
69 void util_caps_demo_print(struct pipe_screen *screen);
71 #endif