|
Blender V4.3
|
#include <vk_device.hh>
Inherits blender::NonCopyable, and blender::NonMovable.
Public Member Functions | |
| VKResourcePool & | resource_pool_get () |
| void | resource_pool_next () |
VKThreadData | |
| VKThreadData (VKDevice &device, pthread_t thread_id) | |
| void | deinit (VKDevice &device) |
Public Member Functions inherited from blender::NonCopyable | |
| NonCopyable (const NonCopyable &other)=delete | |
| NonCopyable & | operator= (const NonCopyable &other)=delete |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable &&other)=default | |
| NonCopyable & | operator= (NonCopyable &&other)=default |
Public Attributes | |
| pthread_t | thread_id |
| uint32_t | resource_pool_index = UINT32_MAX |
| std::array< VKResourcePool, resource_pools_count > | resource_pools |
| int32_t | rendering_depth = 0 |
Shared resources between contexts that run in the same thread.
Definition at line 74 of file vk_device.hh.
| blender::gpu::VKThreadData::VKThreadData | ( | VKDevice & | device, |
| pthread_t | thread_id ) |
Definition at line 363 of file vk_device.cc.
References resource_pools.
| void blender::gpu::VKThreadData::deinit | ( | VKDevice & | device | ) |
Definition at line 370 of file vk_device.cc.
References resource_pools.
Referenced by blender::gpu::VKDevice::deinit().
|
inline |
Get the active resource pool.
Definition at line 105 of file vk_device.hh.
References resource_pool_index, and resource_pools.
Referenced by blender::gpu::VKContext::activate(), blender::gpu::VKBackend::render_end(), and blender::gpu::VKContext::sync_backbuffer().
|
inline |
Activate the next resource pool.
Definition at line 114 of file vk_device.hh.
References resource_pool_index, and UINT32_MAX.
| int32_t blender::gpu::VKThreadData::rendering_depth = 0 |
The current rendering depth.
GPU_rendering_begin can be called multiple times forming a hierarchy. The same resource pool should be used for the whole hierarchy. rendering_depth is increased for every GPU_rendering_begin and decreased when GPU_rendering_end is called. Resources pools are cycled when the rendering_depth set to 0.
Definition at line 97 of file vk_device.hh.
Referenced by blender::gpu::VKBackend::render_begin(), and blender::gpu::VKBackend::render_end().
| uint32_t blender::gpu::VKThreadData::resource_pool_index = UINT32_MAX |
Index of the active resource pool. Is in sync with the active swap chain image or cycled when rendering.
NOTE: Initialized to UINT32_MAX to detect first change.
Definition at line 86 of file vk_device.hh.
Referenced by resource_pool_get(), resource_pool_next(), and blender::gpu::VKContext::sync_backbuffer().
| std::array<VKResourcePool, resource_pools_count> blender::gpu::VKThreadData::resource_pools |
Definition at line 87 of file vk_device.hh.
Referenced by deinit(), resource_pool_get(), and VKThreadData().
| pthread_t blender::gpu::VKThreadData::thread_id |
Thread ID this instance belongs to.
Definition at line 79 of file vk_device.hh.