Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/GPU_platform.h
- This file was copied from source/blender/gpu/GPU_extensions.h.
| Show All 15 Lines | |||||
| * The Original Code is Copyright (C) 2005 Blender Foundation. | * The Original Code is Copyright (C) 2005 Blender Foundation. | ||||
| * All rights reserved. | * All rights reserved. | ||||
| */ | */ | ||||
| /** \file | /** \file | ||||
| * \ingroup gpu | * \ingroup gpu | ||||
| */ | */ | ||||
| #ifndef __GPU_EXTENSIONS_H__ | #ifndef __GPU_PLATFORM_H__ | ||||
| #define __GPU_EXTENSIONS_H__ | #define __GPU_PLATFORM_H__ | ||||
| #include "BLI_sys_types.h" | |||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| extern "C" { | extern "C" { | ||||
| #endif | #endif | ||||
| /* GPU extensions support */ | /* GPU platform support */ | ||||
| int GPU_max_texture_size(void); | |||||
| int GPU_max_texture_layers(void); | |||||
| int GPU_max_textures(void); | |||||
| int GPU_max_textures_vert(void); | |||||
| int GPU_max_textures_geom(void); | |||||
| int GPU_max_textures_frag(void); | |||||
| float GPU_max_texture_anisotropy(void); | |||||
| int GPU_max_color_texture_samples(void); | |||||
| int GPU_max_cube_map_size(void); | |||||
| int GPU_max_ubo_binds(void); | |||||
| int GPU_max_ubo_size(void); | |||||
| float GPU_max_line_width(void); | |||||
| void GPU_get_dfdy_factors(float fac[2]); | |||||
| bool GPU_arb_base_instance_is_supported(void); | |||||
| bool GPU_mip_render_workaround(void); | |||||
| bool GPU_depth_blitting_workaround(void); | |||||
| bool GPU_unused_fb_slot_workaround(void); | |||||
| bool GPU_context_local_shaders_workaround(void); | |||||
| bool GPU_crappy_amd_driver(void); | |||||
| bool GPU_mem_stats_supported(void); | |||||
| void GPU_mem_stats_get(int *totalmem, int *freemem); | |||||
| void GPU_code_generate_glsl_lib(void); | |||||
| /* GPU Types */ | /* GPU Types */ | ||||
| typedef enum eGPUDeviceType { | typedef enum eGPUDeviceType { | ||||
| GPU_DEVICE_NVIDIA = (1 << 0), | GPU_DEVICE_NVIDIA = (1 << 0), | ||||
| GPU_DEVICE_ATI = (1 << 1), | GPU_DEVICE_ATI = (1 << 1), | ||||
| GPU_DEVICE_INTEL = (1 << 2), | GPU_DEVICE_INTEL = (1 << 2), | ||||
| GPU_DEVICE_INTEL_UHD = (1 << 3), | GPU_DEVICE_INTEL_UHD = (1 << 3), | ||||
| GPU_DEVICE_SOFTWARE = (1 << 4), | GPU_DEVICE_SOFTWARE = (1 << 4), | ||||
| GPU_DEVICE_UNKNOWN = (1 << 5), | GPU_DEVICE_UNKNOWN = (1 << 5), | ||||
| GPU_DEVICE_ANY = (0xff), | GPU_DEVICE_ANY = (0xff), | ||||
| } eGPUDeviceType; | } eGPUDeviceType; | ||||
| typedef enum eGPUOSType { | typedef enum eGPUOSType { | ||||
| GPU_OS_WIN = (1 << 8), | GPU_OS_WIN = (1 << 8), | ||||
| GPU_OS_MAC = (1 << 9), | GPU_OS_MAC = (1 << 9), | ||||
| GPU_OS_UNIX = (1 << 10), | GPU_OS_UNIX = (1 << 10), | ||||
| GPU_OS_ANY = (0xff00), | GPU_OS_ANY = (0xff00), | ||||
| } eGPUOSType; | } eGPUOSType; | ||||
| typedef enum eGPUDriverType { | typedef enum eGPUDriverType { | ||||
| GPU_DRIVER_OFFICIAL = (1 << 16), | GPU_DRIVER_OFFICIAL = (1 << 16), | ||||
| GPU_DRIVER_OPENSOURCE = (1 << 17), | GPU_DRIVER_OPENSOURCE = (1 << 17), | ||||
| GPU_DRIVER_SOFTWARE = (1 << 18), | GPU_DRIVER_SOFTWARE = (1 << 18), | ||||
| GPU_DRIVER_ANY = (0xff0000), | GPU_DRIVER_ANY = (0xff0000), | ||||
| } eGPUDriverType; | } eGPUDriverType; | ||||
| typedef enum eGPUSupportLevel { | |||||
| GPU_SUPPORT_LEVEL_SUPPORTED, | |||||
| GPU_SUPPORT_LEVEL_LIMITED, | |||||
| GPU_SUPPORT_LEVEL_UNSUPPORTED, | |||||
| } eGPUSupportLevel; | |||||
| bool GPU_type_matches(eGPUDeviceType device, eGPUOSType os, eGPUDriverType driver); | bool GPU_type_matches(eGPUDeviceType device, eGPUOSType os, eGPUDriverType driver); | ||||
| eGPUSupportLevel GPU_platform_support_level(void); | |||||
| const char *GPU_platform_support_level_key(void); | |||||
| const char *GPU_platform_gpu_name(void); | |||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||
| #endif /* __GPU_EXTENSIONS_H__ */ | #endif /* __GPU_PLATFORM_H__ */ | ||||