FCT
载入中...
搜索中...
未找到
VK_Semaphore.cpp
浏览该文件的文档.
1
//
2
// Created by Administrator on 2025/4/2.
3
//
4
#include "
../ThirdParty.h
"
5
#include "
../Context/VK_Context.h
"
6
#include "
./VK_Semaphore.h
"
7
8
namespace
FCT
{
9
namespace
RHI
10
{
11
VK_Semaphore::VK_Semaphore
(
VK_Context
* ctx) :
m_ctx
(ctx)
12
{
13
}
14
15
VK_Semaphore::~VK_Semaphore
()
16
{
17
VK_Semaphore::destroy
();
18
}
19
20
void
VK_Semaphore::create
()
21
{
22
addRef
();
23
if
(
m_semaphore
)
24
{
25
m_ctx
->device().destroySemaphore(
m_semaphore
);
26
m_semaphore
=
nullptr
;
27
}
28
vk::SemaphoreCreateInfo semaphoreInfo;
29
m_semaphore
=
m_ctx
->device().createSemaphore(semaphoreInfo);
30
}
31
32
void
VK_Semaphore::destroy
()
33
{
34
if
(
m_semaphore
)
35
{
36
m_ctx
->device().destroySemaphore(
m_semaphore
);
37
m_semaphore
=
nullptr
;
38
}
39
}
40
}
41
}
ThirdParty.h
VK_Context.h
VK_Semaphore.h
FCT::RHI::VK_Semaphore::create
void create() override
创建 信号量
定义
VK_Semaphore.cpp:20
FCT::RHI::VK_Semaphore::m_ctx
VK_Context * m_ctx
定义
VK_Semaphore.h:27
FCT::RHI::VK_Semaphore::~VK_Semaphore
~VK_Semaphore() override
定义
VK_Semaphore.cpp:15
FCT::RHI::VK_Semaphore::m_semaphore
vk::Semaphore m_semaphore
定义
VK_Semaphore.h:28
FCT::RHI::VK_Semaphore::VK_Semaphore
VK_Semaphore(VK_Context *ctx)
定义
VK_Semaphore.cpp:11
FCT::RHI::VK_Semaphore::destroy
void destroy() override
销毁一个 信号量
定义
VK_Semaphore.cpp:32
FCT::RefCount::addRef
void addRef()
定义
RefCount.h:10
FCT::VK_Context
定义
VK_Context.h:11
FCT::RHI
定义
CommandBufferGraph.h:14
FCT
定义
Enums.h:8
src
RHI
VK_Semaphore.cpp
制作者
1.14.0