Blender  V2.93
GPU_platform.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2005 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 #include "BLI_sys_types.h"
27 #include "BLI_utildefines.h"
28 
29 /* GPU platform support */
30 
31 /* GPU Types */
32 typedef enum eGPUDeviceType {
33  GPU_DEVICE_NVIDIA = (1 << 0),
34  GPU_DEVICE_ATI = (1 << 1),
35  GPU_DEVICE_INTEL = (1 << 2),
37  GPU_DEVICE_APPLE = (1 << 3),
38  GPU_DEVICE_SOFTWARE = (1 << 4),
39  GPU_DEVICE_UNKNOWN = (1 << 5),
40  GPU_DEVICE_ANY = (0xff),
42 
44 
45 typedef enum eGPUOSType {
46  GPU_OS_WIN = (1 << 8),
47  GPU_OS_MAC = (1 << 9),
48  GPU_OS_UNIX = (1 << 10),
49  GPU_OS_ANY = (0xff00),
51 
52 typedef enum eGPUDriverType {
53  GPU_DRIVER_OFFICIAL = (1 << 16),
54  GPU_DRIVER_OPENSOURCE = (1 << 17),
55  GPU_DRIVER_SOFTWARE = (1 << 18),
56  GPU_DRIVER_ANY = (0xff0000),
58 
59 typedef enum eGPUSupportLevel {
64 
65 #ifdef __cplusplus
66 extern "C" {
67 #endif
68 
71 const char *GPU_platform_support_level_key(void);
72 const char *GPU_platform_gpu_name(void);
73 
74 #ifdef __cplusplus
75 }
76 #endif
#define ENUM_OPERATORS(_type, _max)
const char * GPU_platform_gpu_name(void)
eGPUDriverType
Definition: GPU_platform.h:52
@ GPU_DRIVER_ANY
Definition: GPU_platform.h:56
@ GPU_DRIVER_OFFICIAL
Definition: GPU_platform.h:53
@ GPU_DRIVER_OPENSOURCE
Definition: GPU_platform.h:54
@ GPU_DRIVER_SOFTWARE
Definition: GPU_platform.h:55
const char * GPU_platform_support_level_key(void)
eGPUSupportLevel
Definition: GPU_platform.h:59
@ GPU_SUPPORT_LEVEL_LIMITED
Definition: GPU_platform.h:61
@ GPU_SUPPORT_LEVEL_SUPPORTED
Definition: GPU_platform.h:60
@ GPU_SUPPORT_LEVEL_UNSUPPORTED
Definition: GPU_platform.h:62
eGPUOSType
Definition: GPU_platform.h:45
@ GPU_OS_WIN
Definition: GPU_platform.h:46
@ GPU_OS_UNIX
Definition: GPU_platform.h:48
@ GPU_OS_ANY
Definition: GPU_platform.h:49
@ GPU_OS_MAC
Definition: GPU_platform.h:47
eGPUDeviceType
Definition: GPU_platform.h:32
@ GPU_DEVICE_UNKNOWN
Definition: GPU_platform.h:39
@ GPU_DEVICE_ATI
Definition: GPU_platform.h:34
@ GPU_DEVICE_INTEL_UHD
Definition: GPU_platform.h:36
@ GPU_DEVICE_SOFTWARE
Definition: GPU_platform.h:38
@ GPU_DEVICE_NVIDIA
Definition: GPU_platform.h:33
@ GPU_DEVICE_ANY
Definition: GPU_platform.h:40
@ GPU_DEVICE_APPLE
Definition: GPU_platform.h:37
@ GPU_DEVICE_INTEL
Definition: GPU_platform.h:35
bool GPU_type_matches(eGPUDeviceType device, eGPUOSType os, eGPUDriverType driver)
eGPUSupportLevel GPU_platform_support_level(void)
Definition: gpu_platform.cc:97