Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_init_exit.c
| Show All 20 Lines | |||||
| * \ingroup gpu | * \ingroup gpu | ||||
| */ | */ | ||||
| #include "GPU_init_exit.h" /* interface */ | #include "GPU_init_exit.h" /* interface */ | ||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| #include "BLI_sys_types.h" | #include "BLI_sys_types.h" | ||||
| #include "GPU_batch.h" | #include "GPU_batch.h" | ||||
| #include "GPU_buffers.h" | #include "GPU_buffers.h" | ||||
| #include "GPU_extensions.h" | |||||
| #include "GPU_immediate.h" | #include "GPU_immediate.h" | ||||
| #include "intern/gpu_codegen.h" | #include "intern/gpu_codegen.h" | ||||
| #include "intern/gpu_material_library.h" | #include "intern/gpu_material_library.h" | ||||
| #include "intern/gpu_private.h" | #include "intern/gpu_private.h" | ||||
| #include <stdio.h> | |||||
| /** | /** | ||||
| * although the order of initialization and shutdown should not matter | * although the order of initialization and shutdown should not matter | ||||
| * (except for the extensions), I chose alphabetical and reverse alphabetical order | * (except for the extensions), I chose alphabetical and reverse alphabetical order | ||||
| */ | */ | ||||
| static bool initialized = false; | static bool initialized = false; | ||||
| void GPU_init(void) | void GPU_init(void) | ||||
| { | { | ||||
| /* can't avoid calling this multiple times, see wm_window_ghostwindow_add */ | /* can't avoid calling this multiple times, see wm_window_ghostwindow_add */ | ||||
| if (initialized) { | if (initialized) { | ||||
| return; | return; | ||||
| } | } | ||||
| initialized = true; | initialized = true; | ||||
| gpu_platform_init(); | gpu_platform_init(); | ||||
| gpu_extensions_init(); /* must come first */ | gpu_extensions_init(); /* must come first */ | ||||
| if (GPU_main_thread_workaround()) { | |||||
| printf( | |||||
| "Warning: GPU main thread workaround enabled. Rendering of preview/icons in EEVEE " | |||||
| "disabled.\n"); | |||||
| } | |||||
| gpu_codegen_init(); | gpu_codegen_init(); | ||||
| gpu_material_library_init(); | gpu_material_library_init(); | ||||
| gpu_framebuffer_module_init(); | gpu_framebuffer_module_init(); | ||||
| if (G.debug & G_DEBUG_GPU) { | if (G.debug & G_DEBUG_GPU) { | ||||
| gpu_debug_init(); | gpu_debug_init(); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines | |||||