|
Blender V4.3
|
#include <mtl_query.hh>
Inherits blender::gpu::QueryPool.
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 |
Public Member Functions inherited from blender::gpu::QueryPool | |
| virtual | ~QueryPool () |
Definition at line 18 of file mtl_query.hh.
| blender::gpu::MTLQueryPool::MTLQueryPool | ( | ) |
Definition at line 19 of file mtl_query.mm.
| blender::gpu::MTLQueryPool::~MTLQueryPool | ( | ) |
Definition at line 23 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 64 of file mtl_query.mm.
References BLI_assert, blender::gpu::MTLContext::ensure_begin_render_pass(), blender::gpu::MTLContext::get(), blender::gpu::MTLCommandBufferManager::get_active_render_command_encoder(), blender::gpu::MTLContext::main_command_buffer, 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 91 of file mtl_query.mm.
References blender::gpu::MTLContext::get(), blender::gpu::MTLCommandBufferManager::get_active_render_command_encoder(), and blender::gpu::MTLContext::main_command_buffer.
|
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 99 of file mtl_query.mm.
References BLI_assert, blender::gpu::MTLContext::device, blender::gpu::MTLCommandBufferManager::ensure_begin_blit_encoder(), blender::gpu::MTLContext::get(), blender::gpu::MTLContext::get_inside_frame(), 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 55 of file mtl_query.mm.
References BLI_assert, and blender::gpu::to_mtl_type().