Blender
V5.3
source
blender
gpu
vulkan
vk_fence.cc
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2022 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9
#include "
vk_fence.hh
"
10
#include "
vk_backend.hh
"
11
#include "
vk_common.hh
"
12
#include "
vk_context.hh
"
13
14
namespace
blender::gpu
{
15
16
void
VKFence::signal
()
17
{
18
VKContext
&context = *
VKContext::get
();
19
timeline_value_ = context.flush_render_graph(
RenderGraphFlushFlags::SUBMIT
|
20
RenderGraphFlushFlags::RENEW_RENDER_GRAPH
);
21
signalled_
=
true
;
22
}
23
24
void
VKFence::wait
()
25
{
26
if
(!
signalled_
) {
27
return
;
28
}
29
VKDevice
&device =
VKBackend::get
().
device
;
30
device.
wait_for_timeline
(timeline_value_);
31
timeline_value_ = 0;
32
signalled_
=
false
;
33
}
34
35
}
// namespace blender::gpu
blender::gpu::Fence::signalled_
bool signalled_
Definition
gpu_state_private.hh:166
blender::gpu::VKBackend::get
static VKBackend & get()
Definition
vk_backend.hh:103
blender::gpu::VKBackend::device
VKDevice device
Definition
vk_backend.hh:37
blender::gpu::VKContext
Definition
vk_context.hh:42
blender::gpu::VKContext::get
static VKContext * get()
Definition
vk_context.hh:148
blender::gpu::VKDevice
Definition
vk_device.hh:180
blender::gpu::VKDevice::wait_for_timeline
void wait_for_timeline(TimelineValue timeline)
Definition
vk_device_submission.cc:99
blender::gpu::VKFence::signal
void signal() override
Definition
vk_fence.cc:16
blender::gpu::VKFence::wait
void wait() override
Definition
vk_fence.cc:24
blender::gpu
Definition
blf_internal_types.hh:35
blender::gpu::RENEW_RENDER_GRAPH
@ RENEW_RENDER_GRAPH
Definition
vk_context.hh:35
blender::gpu::SUBMIT
@ SUBMIT
Definition
vk_context.hh:36
vk_backend.hh
vk_common.hh
vk_context.hh
vk_fence.hh
Generated on
for Blender by
doxygen
1.18.0