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
void
VK_Semaphore::create
()
16
{
17
addRef
();
18
if
(
m_semaphore
)
19
{
20
m_ctx
->device().destroySemaphore(
m_semaphore
);
21
m_semaphore
=
nullptr
;
22
}
23
vk::SemaphoreCreateInfo semaphoreInfo;
24
m_semaphore
=
m_ctx
->device().createSemaphore(semaphoreInfo);
25
}
26
27
void
VK_Semaphore::destroy
()
28
{
29
if
(
m_semaphore
)
30
{
31
m_ctx
->device().destroySemaphore(
m_semaphore
);
32
m_semaphore
=
nullptr
;
33
}
34
}
35
}
36
}
ThirdParty.h
VK_Context.h
VK_Semaphore.h
FCT::RHI::VK_Semaphore::create
void create() override
创建 信号量
定义
VK_Semaphore.cpp:15
FCT::RHI::VK_Semaphore::m_ctx
VK_Context * m_ctx
定义
VK_Semaphore.h:26
FCT::RHI::VK_Semaphore::m_semaphore
vk::Semaphore m_semaphore
定义
VK_Semaphore.h:27
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:27
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