Blender
V2.93
source
blender
gpu
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),
36
GPU_DEVICE_INTEL_UHD
= (1 << 3),
37
GPU_DEVICE_APPLE
= (1 << 3),
38
GPU_DEVICE_SOFTWARE
= (1 << 4),
39
GPU_DEVICE_UNKNOWN
= (1 << 5),
40
GPU_DEVICE_ANY
= (0xff),
41
}
eGPUDeviceType
;
42
43
ENUM_OPERATORS
(
eGPUDeviceType
,
GPU_DEVICE_ANY
)
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),
50
}
eGPUOSType
;
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),
57
}
eGPUDriverType
;
58
59
typedef
enum
eGPUSupportLevel
{
60
GPU_SUPPORT_LEVEL_SUPPORTED
,
61
GPU_SUPPORT_LEVEL_LIMITED
,
62
GPU_SUPPORT_LEVEL_UNSUPPORTED
,
63
}
eGPUSupportLevel
;
64
65
#ifdef __cplusplus
66
extern
"C"
{
67
#endif
68
69
bool
GPU_type_matches
(
eGPUDeviceType
device,
eGPUOSType
os,
eGPUDriverType
driver);
70
eGPUSupportLevel
GPU_platform_support_level
(
void
);
71
const
char
*
GPU_platform_support_level_key
(
void
);
72
const
char
*
GPU_platform_gpu_name
(
void
);
73
74
#ifdef __cplusplus
75
}
76
#endif
BLI_sys_types.h
BLI_utildefines.h
ENUM_OPERATORS
#define ENUM_OPERATORS(_type, _max)
Definition:
BLI_utildefines.h:811
GPU_platform_gpu_name
const char * GPU_platform_gpu_name(void)
Definition:
gpu_platform.cc:107
eGPUDriverType
eGPUDriverType
Definition:
GPU_platform.h:52
GPU_DRIVER_ANY
@ GPU_DRIVER_ANY
Definition:
GPU_platform.h:56
GPU_DRIVER_OFFICIAL
@ GPU_DRIVER_OFFICIAL
Definition:
GPU_platform.h:53
GPU_DRIVER_OPENSOURCE
@ GPU_DRIVER_OPENSOURCE
Definition:
GPU_platform.h:54
GPU_DRIVER_SOFTWARE
@ GPU_DRIVER_SOFTWARE
Definition:
GPU_platform.h:55
GPU_platform_support_level_key
const char * GPU_platform_support_level_key(void)
Definition:
gpu_platform.cc:102
eGPUSupportLevel
eGPUSupportLevel
Definition:
GPU_platform.h:59
GPU_SUPPORT_LEVEL_LIMITED
@ GPU_SUPPORT_LEVEL_LIMITED
Definition:
GPU_platform.h:61
GPU_SUPPORT_LEVEL_SUPPORTED
@ GPU_SUPPORT_LEVEL_SUPPORTED
Definition:
GPU_platform.h:60
GPU_SUPPORT_LEVEL_UNSUPPORTED
@ GPU_SUPPORT_LEVEL_UNSUPPORTED
Definition:
GPU_platform.h:62
eGPUOSType
eGPUOSType
Definition:
GPU_platform.h:45
GPU_OS_WIN
@ GPU_OS_WIN
Definition:
GPU_platform.h:46
GPU_OS_UNIX
@ GPU_OS_UNIX
Definition:
GPU_platform.h:48
GPU_OS_ANY
@ GPU_OS_ANY
Definition:
GPU_platform.h:49
GPU_OS_MAC
@ GPU_OS_MAC
Definition:
GPU_platform.h:47
eGPUDeviceType
eGPUDeviceType
Definition:
GPU_platform.h:32
GPU_DEVICE_UNKNOWN
@ GPU_DEVICE_UNKNOWN
Definition:
GPU_platform.h:39
GPU_DEVICE_ATI
@ GPU_DEVICE_ATI
Definition:
GPU_platform.h:34
GPU_DEVICE_INTEL_UHD
@ GPU_DEVICE_INTEL_UHD
Definition:
GPU_platform.h:36
GPU_DEVICE_SOFTWARE
@ GPU_DEVICE_SOFTWARE
Definition:
GPU_platform.h:38
GPU_DEVICE_NVIDIA
@ GPU_DEVICE_NVIDIA
Definition:
GPU_platform.h:33
GPU_DEVICE_ANY
@ GPU_DEVICE_ANY
Definition:
GPU_platform.h:40
GPU_DEVICE_APPLE
@ GPU_DEVICE_APPLE
Definition:
GPU_platform.h:37
GPU_DEVICE_INTEL
@ GPU_DEVICE_INTEL
Definition:
GPU_platform.h:35
GPU_type_matches
bool GPU_type_matches(eGPUDeviceType device, eGPUOSType os, eGPUDriverType driver)
Definition:
gpu_platform.cc:113
GPU_platform_support_level
eGPUSupportLevel GPU_platform_support_level(void)
Definition:
gpu_platform.cc:97
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1