46 VkExtent2D vk_extent_ = {};
47 VkSurfaceFormatKHR swap_chain_format_ = {};
56 std::optional<std::reference_wrapper<VKThreadData>> thread_data_;
57 std::optional<std::reference_wrapper<render_graph::VKRenderGraph>> render_graph_;
60 shader::SpecializationConstants constants_state_;
65 using Clock = std::chrono::steady_clock;
73 Vector<ScopeTimings> scope_timings;
75 void process_frame_timings();
83 return render_graph_.value().get();
87 return render_graph_.value().get();
98 void flush()
override;
102 VkPipelineStageFlags wait_dst_stage_mask = VK_PIPELINE_STAGE_NONE,
103 VkSemaphore wait_semaphore = VK_NULL_HANDLE,
104 VkSemaphore signal_semaphore = VK_NULL_HANDLE,
105 VkFence signal_fence = VK_NULL_HANDLE);
158 bool wait_for_submission);
166 VKBuffer &buffer, VkDeviceSize min_offset_alignment);
169 void swap_buffer_draw_handler(
const GHOST_VulkanSwapChainData &
data,
bool wait_for_submission);
170 void swap_buffer_acquired_handler();
172 void openxr_acquire_framebuffer_image_handler(GHOST_VulkanOpenXRData &
data);
173 void openxr_release_framebuffer_image_handler(GHOST_VulkanOpenXRData &
data);
176 VkPipeline vk_pipeline,
182 return static_cast<const void *
>(&a) ==
static_cast<const void *
>(&
b);
void activate(bool forceActivation=false) const
NonCopyable(const NonCopyable &other)=delete
render_graph::VKRenderGraph & render_graph()
static void swap_buffer_draw_callback(const GHOST_VulkanSwapChainData *data, bool wait_for_submission)
VKContext(GHOST_IWindow *ghost_window, GHOST_IContext *ghost_context)
void debug_unbind_all_ssbo() override
void debug_group_begin(const char *name, int index) override
render_graph::VKResourceAccessInfo & reset_and_get_access_info()
void debug_group_end() override
VKBufferPool push_constants_pool
static void openxr_acquire_framebuffer_image_callback(GHOST_VulkanOpenXRData *data)
void deactivate_framebuffer()
bool debug_capture_scope_begin(void *scope) override
void specialization_constants_set(const shader::SpecializationConstants *constants_state)
void deactivate() override
void memory_statistics_get(int *r_total_mem_kb, int *r_free_mem_kb) override
VKDiscardPool discard_pool
static void swap_buffer_acquired_callback()
void * debug_capture_scope_create(const char *name) override
static void openxr_release_framebuffer_image_callback(GHOST_VulkanOpenXRData *data)
bool debug_capture_begin(const char *title) override
VKFrameBuffer * active_framebuffer_get() const
const render_graph::VKRenderGraph & render_graph() const
bool has_active_framebuffer() const
void debug_unbind_all_ubo() override
void debug_capture_end() override
void activate_framebuffer(VKFrameBuffer &framebuffer)
void debug_capture_scope_end(void *scope) override
VKStateManager & state_manager_get() const
VKDescriptorSetTracker & descriptor_set_get()
std::unique_ptr< VKStreamingBuffer > & get_or_create_streaming_buffer(VKBuffer &buffer, VkDeviceSize min_offset_alignment)
void update_pipeline_data(render_graph::VKPipelineData &r_pipeline_data)
void begin_frame() override
VKDescriptorPools & descriptor_pools_get()
void end_frame() override
TimelineValue flush_render_graph(RenderGraphFlushFlags flags, VkPipelineStageFlags wait_dst_stage_mask=VK_PIPELINE_STAGE_NONE, VkSemaphore wait_semaphore=VK_NULL_HANDLE, VkSemaphore signal_semaphore=VK_NULL_HANDLE, VkFence signal_fence=VK_NULL_HANDLE)
std::chrono::high_resolution_clock Clock
bool operator==(const GPUState &a, const GPUState &b)
ENUM_OPERATORS(ShaderStage)
std::chrono::nanoseconds Nanoseconds
Clock::time_point TimePoint
BMesh const char void * data