Blender
V3.3
|
#include <mtl_query.hh>
Public Member Functions | |
MTLQueryPool () | |
~MTLQueryPool () | |
void | init (GPUQueryType type) override |
void | begin_query () override |
void | end_query () override |
void | get_occlusion_result (MutableSpan< uint32_t > r_values) override |
![]() | |
virtual | ~QueryPool () |
Definition at line 16 of file mtl_query.hh.
blender::gpu::MTLQueryPool::MTLQueryPool | ( | ) |
Definition at line 17 of file mtl_query.mm.
blender::gpu::MTLQueryPool::~MTLQueryPool | ( | ) |
Definition at line 21 of file mtl_query.mm.
References BLI_assert.
|
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 57 of file mtl_query.mm.
References BLI_assert, buffer, blender::gpu::MTLContext::ensure_begin_render_pass(), blender::gpu::MTLCommandBufferManager::get_active_render_command_encoder(), GPU_context_active_get(), blender::gpu::MTLContext::main_command_buffer, offset, blender::gpu::MTLContext::set_visibility_buffer(), blender::gpu::VISIBILITY_COUNT_PER_BUFFER, and blender::gpu::VISIBILITY_RESULT_SIZE_IN_BYTES.
|
overridevirtual |
Implements blender::gpu::QueryPool.
Definition at line 84 of file mtl_query.mm.
References blender::gpu::MTLCommandBufferManager::get_active_render_command_encoder(), GPU_context_active_get(), blender::gpu::MTLContext::main_command_buffer, and offset.
|
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 mtl_query.mm.
References BLI_assert, blender::gpu::MTLContext::device, blender::gpu::MTLCommandBufferManager::ensure_begin_blit_encoder(), blender::gpu::MTLContext::get_inside_frame(), GPU_context_active_get(), GPU_finish(), blender::gpu::MTLContext::main_command_buffer, blender::gpu::MTLContext::set_visibility_buffer(), and blender::gpu::VISIBILITY_COUNT_PER_BUFFER.
|
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 48 of file mtl_query.mm.
References BLI_assert, blender::gpu::to_mtl_type(), and type.