|
Blender V4.3
|
#include <vk_query.hh>
Inherits blender::gpu::QueryPool.
Public Member Functions | |
| void | init (GPUQueryType type) override |
| void | begin_query () override |
| void | end_query () override |
| void | get_occlusion_result (MutableSpan< uint32_t > r_values) override |
Public Member Functions inherited from blender::gpu::QueryPool | |
| virtual | ~QueryPool () |
Protected Member Functions | |
| ~VKQueryPool () | |
Definition at line 19 of file vk_query.hh.
|
protected |
Definition at line 18 of file vk_query.cc.
References blender::gpu::VKBackend::device, blender::gpu::VKBackend::get(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::Vector< T, InlineBufferCapacity, Allocator >::pop_last(), VK_ALLOCATION_CALLBACKS, and blender::gpu::VKDevice::vk_handle().
|
overridevirtual |
Will start and end the query at this index inside the pool. The pool will resize automatically.
Implements blender::gpu::QueryPool.
Definition at line 42 of file vk_query.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), begin_query(), BLI_assert, blender::gpu::VKBackend::device, blender::gpu::render_graph::VKResetQueryPoolData::first_query, blender::gpu::VKBackend::get(), blender::gpu::VKContext::get(), blender::gpu::render_graph::VKResetQueryPoolData::query_count, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), VK_ALLOCATION_CALLBACKS, blender::gpu::VKDevice::vk_handle(), blender::gpu::render_graph::VKBeginQueryData::vk_query_pool, and blender::gpu::render_graph::VKResetQueryPoolData::vk_query_pool.
Referenced by begin_query().
|
overridevirtual |
Implements blender::gpu::QueryPool.
Definition at line 82 of file vk_query.cc.
References end_query(), blender::gpu::VKContext::get(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), and blender::gpu::render_graph::VKEndQueryData::vk_query_pool.
Referenced by end_query().
|
overridevirtual |
Must be fed with a buffer large enough to contain all the queries issued. IMPORTANT: Result for each query can be either binary or represent the number of samples drawn.
Implements blender::gpu::QueryPool.
Definition at line 92 of file vk_query.cc.
References blender::gpu::VKBackend::device, blender::gpu::VKBackend::get(), blender::gpu::VKContext::get(), max_ii(), min_ii(), and blender::gpu::VKDevice::vk_handle().
|
overridevirtual |
Will start and end the query at this index inside the pool. The pool will resize automatically but does not support sparse allocation. So prefer using consecutive indices.
Implements blender::gpu::QueryPool.
Definition at line 35 of file vk_query.cc.
References BLI_assert, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), and blender::gpu::to_vk_query_type().