diff options
Diffstat (limited to 'source/blender/gpu/GPU_platform.h')
-rw-r--r-- | source/blender/gpu/GPU_platform.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/gpu/GPU_platform.h b/source/blender/gpu/GPU_platform.h index d5a0fcfa921..bd20d0c7db1 100644 --- a/source/blender/gpu/GPU_platform.h +++ b/source/blender/gpu/GPU_platform.h @@ -12,6 +12,13 @@ /* GPU platform support */ +typedef enum eGPUBackendType { + GPU_BACKEND_NONE = 0, + GPU_BACKEND_OPENGL = 1 << 0, + GPU_BACKEND_METAL = 1 << 1, + GPU_BACKEND_ANY = 0xFFFFFFFFu +} eGPUBackendType; + /* GPU Types */ typedef enum eGPUDeviceType { GPU_DEVICE_NVIDIA = (1 << 0), @@ -51,8 +58,10 @@ extern "C" { #endif /* GPU Types */ - +/* TODO: Verify all use-cases of GPU_type_matches to determine which graphics API it should apply to, and replace + * with `GPU_type_matches_ex` where appropriate. */ bool GPU_type_matches(eGPUDeviceType device, eGPUOSType os, eGPUDriverType driver); +bool GPU_type_matches_ex(eGPUDeviceType device, eGPUOSType os, eGPUDriverType driver, eGPUBackendType backend); eGPUSupportLevel GPU_platform_support_level(void); const char *GPU_platform_vendor(void); |