blob: dd37e814a4a49a54850335db7e61420f3c2b2a89 [file] [log] [blame]
Chia-I Wuc6fb9af2014-08-04 11:28:43 +08001/*
2 * XGL
3 *
4 * Copyright (C) 2014 LunarG, Inc.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25#ifndef INTEL_H
26#define INTEL_H
27
Chia-I Wu214dac62014-08-05 11:07:40 +080028#include <stdlib.h>
Chia-I Wuc6fb9af2014-08-04 11:28:43 +080029#include <stdbool.h>
Chia-I Wu214dac62014-08-05 11:07:40 +080030#include <string.h>
Chia-I Wuc6fb9af2014-08-04 11:28:43 +080031#include <assert.h>
32
33#include <xgl.h>
34#include <xglDbg.h>
35
36#include "icd.h"
37
Chia-I Wu214dac62014-08-05 11:07:40 +080038#define INTEL_API_VERSION XGL_MAKE_VERSION(0, 22, 0)
39#define INTEL_DRIVER_VERSION 0
40
41#define INTEL_GEN(gen) ((int) ((gen) * 100))
42
Chia-I Wue54854a2014-08-05 10:23:50 +080043#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
44
Chia-I Wua02cd522014-08-07 13:36:04 +080045static inline unsigned int align(unsigned int val, unsigned alignment)
46{
47 assert(alignment && (alignment & (alignment - 1)) == 0);
48 return (val + alignment - 1) & ~(alignment - 1);
49}
50
Chia-I Wuc6fb9af2014-08-04 11:28:43 +080051#endif /* INTEL_H */