|
Blender V4.5
|
#include <GPU_context.hh>
Public Member Functions | |
GPUSecondaryContext | |
| GPUSecondaryContext () | |
| ~GPUSecondaryContext () | |
| void | activate () |
Abstracts secondary GHOST and GPU context creation, activation and deletion. Must be created from the main thread and destructed from the thread they where activated in. (See GPUWorker for an usage example)
Definition at line 102 of file GPU_context.hh.
| GPUSecondaryContext::GPUSecondaryContext | ( | ) |
Definition at line 554 of file gpu_context.cc.
References BLI_assert, BLI_thread_is_main(), GHOST_GPUSettings::context_type, GHOST_GPUDevice::device_id, GHOST_GPUSettings::flags, G, G_DEBUG_GPU, GHOST_ActivateGPUContext(), ghost_context_type(), GHOST_CreateGPUContext(), GHOST_GetActiveGPUContext(), GHOST_gpuDebugContext, GHOST_ReleaseGPUContext(), ghost_system, GPU_backend_ghost_system_get(), GPU_context_active_get(), GPU_context_active_set(), GPU_context_create(), GHOST_GPUDevice::index, GHOST_GPUSettings::preferred_device, U, UNUSED_VARS_NDEBUG, and GHOST_GPUDevice::vendor_id.
| GPUSecondaryContext::~GPUSecondaryContext | ( | ) |
Definition at line 597 of file gpu_context.cc.
References BLI_assert, BLI_thread_is_main(), GHOST_DisposeGPUContext(), GHOST_ReleaseGPUContext(), ghost_system, GPU_backend_ghost_system_get(), and GPU_context_discard().
| void GPUSecondaryContext::activate | ( | ) |
Must be called from a secondary thread.
Definition at line 612 of file gpu_context.cc.
References BLI_assert, BLI_thread_is_main(), GHOST_ActivateGPUContext(), and GPU_context_active_set().