Blender V4.5
blender::gpu::VKQueryPool Class Reference

#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 ()=default
 

Protected Member Functions

 ~VKQueryPool ()
 

Detailed Description

Definition at line 19 of file vk_query.hh.

Constructor & Destructor Documentation

◆ ~VKQueryPool()

Member Function Documentation

◆ begin_query()

◆ end_query()

void blender::gpu::VKQueryPool::end_query ( )
overridevirtual

◆ get_occlusion_result()

void blender::gpu::VKQueryPool::get_occlusion_result ( MutableSpan< uint32_t > r_values)
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 89 of file vk_query.cc.

References blender::gpu::VKBackend::device, blender::gpu::VKBackend::get(), blender::gpu::VKContext::get(), max_ii(), min_ii(), blender::gpu::RENEW_RENDER_GRAPH, blender::gpu::SUBMIT, blender::gpu::VKDevice::vk_handle(), and blender::gpu::WAIT_FOR_COMPLETION.

◆ init()

void blender::gpu::VKQueryPool::init ( GPUQueryType type)
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 33 of file vk_query.cc.

References BLI_assert, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), and blender::gpu::to_vk_query_type().


The documentation for this class was generated from the following files: