Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_extensions.c
| Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | static struct GPUGlobal { | ||||
| * still be broken. */ | * still be broken. */ | ||||
| bool depth_blitting_workaround; | bool depth_blitting_workaround; | ||||
| /* Crappy driver don't know how to map framebuffer slot to output vars... | /* Crappy driver don't know how to map framebuffer slot to output vars... | ||||
| * We need to have no "holes" in the output buffer slots. */ | * We need to have no "holes" in the output buffer slots. */ | ||||
| bool unused_fb_slot_workaround; | bool unused_fb_slot_workaround; | ||||
| bool broken_amd_driver; | bool broken_amd_driver; | ||||
| /* Some crappy Intel drivers don't work well with shaders created in different | /* Some crappy Intel drivers don't work well with shaders created in different | ||||
| * rendering contexts. */ | * rendering contexts. */ | ||||
| bool context_local_shaders_workaround; | bool use_main_context_workaround; | ||||
| /* Intel drivers exhibit artifacts when using #glCopyImageSubData & workbench anti-aliasing. | /* Intel drivers exhibit artifacts when using #glCopyImageSubData & workbench anti-aliasing. | ||||
| * (see T76273) */ | * (see T76273) */ | ||||
| bool texture_copy_workaround; | bool texture_copy_workaround; | ||||
| } GG = {1, 0}; | } GG = {1, 0}; | ||||
| static void gpu_detect_mip_render_workaround(void) | static void gpu_detect_mip_render_workaround(void) | ||||
| { | { | ||||
| int cube_size = 2; | int cube_size = 2; | ||||
| ▲ Show 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | bool GPU_depth_blitting_workaround(void) | ||||
| return GG.depth_blitting_workaround; | return GG.depth_blitting_workaround; | ||||
| } | } | ||||
| bool GPU_unused_fb_slot_workaround(void) | bool GPU_unused_fb_slot_workaround(void) | ||||
| { | { | ||||
| return GG.unused_fb_slot_workaround; | return GG.unused_fb_slot_workaround; | ||||
| } | } | ||||
| bool GPU_context_local_shaders_workaround(void) | bool GPU_use_main_context_workaround(void) | ||||
| { | { | ||||
| return GG.context_local_shaders_workaround; | return GG.use_main_context_workaround; | ||||
| } | } | ||||
| bool GPU_texture_copy_workaround(void) | bool GPU_texture_copy_workaround(void) | ||||
| { | { | ||||
| return GG.texture_copy_workaround; | return GG.texture_copy_workaround; | ||||
| } | } | ||||
| bool GPU_crappy_amd_driver(void) | bool GPU_crappy_amd_driver(void) | ||||
| ▲ Show 20 Lines • Show All 140 Lines • ▼ Show 20 Lines | else if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_WIN, GPU_DRIVER_ANY)) { | ||||
| } | } | ||||
| if (strstr(version, "Build 10.18.10.3") || strstr(version, "Build 10.18.10.4") || | if (strstr(version, "Build 10.18.10.3") || strstr(version, "Build 10.18.10.4") || | ||||
| strstr(version, "Build 10.18.10.5") || strstr(version, "Build 10.18.14.4") || | strstr(version, "Build 10.18.10.5") || strstr(version, "Build 10.18.14.4") || | ||||
| strstr(version, "Build 10.18.14.5")) { | strstr(version, "Build 10.18.14.5")) { | ||||
| /* Maybe not all of these drivers have problems with `GLEW_ARB_base_instance`. | /* Maybe not all of these drivers have problems with `GLEW_ARB_base_instance`. | ||||
| * But it's hard to test each case. */ | * But it's hard to test each case. */ | ||||
| GG.glew_arb_base_instance_is_supported = false; | GG.glew_arb_base_instance_is_supported = false; | ||||
| GG.context_local_shaders_workaround = true; | GG.use_main_context_workaround = true; | ||||
| } | } | ||||
| if (strstr(version, "Build 20.19.15.4285")) { | if (strstr(version, "Build 20.19.15.4285")) { | ||||
| /* Somehow fixes armature display issues (see T69743). */ | /* Somehow fixes armature display issues (see T69743). */ | ||||
| GG.context_local_shaders_workaround = true; | GG.use_main_context_workaround = true; | ||||
| } | } | ||||
| } | } | ||||
| else if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE) && | else if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE) && | ||||
| (strstr(version, "Mesa 18.") || strstr(version, "Mesa 19.0") || | (strstr(version, "Mesa 18.") || strstr(version, "Mesa 19.0") || | ||||
| strstr(version, "Mesa 19.1") || strstr(version, "Mesa 19.2"))) { | strstr(version, "Mesa 19.1") || strstr(version, "Mesa 19.2"))) { | ||||
| /* See T70187: merging vertices fail. This has been tested from 18.2.2 till 19.3.0~dev of the | /* See T70187: merging vertices fail. This has been tested from 18.2.2 till 19.3.0~dev of the | ||||
| * Mesa driver */ | * Mesa driver */ | ||||
| GG.unused_fb_slot_workaround = true; | GG.unused_fb_slot_workaround = true; | ||||
| } | } | ||||
| GPU_invalid_tex_init(); | GPU_invalid_tex_init(); | ||||
| GPU_samplers_init(); | GPU_samplers_init(); | ||||
jbakker: remove these two lines. | |||||
| } | } | ||||
| void gpu_extensions_exit(void) | void gpu_extensions_exit(void) | ||||
| { | { | ||||
| GPU_invalid_tex_free(); | GPU_invalid_tex_free(); | ||||
| GPU_samplers_free(); | GPU_samplers_free(); | ||||
| } | } | ||||
| Show All 39 Lines | |||||
remove these two lines.