#include <GrVkCommandPool.h>
Definition at line 21 of file GrVkCommandPool.h.
◆ close()
void GrVkCommandPool::close |
( |
| ) |
|
◆ Create()
Definition at line 15 of file GrVkCommandPool.cpp.
15 {
19 }
20
23 nullptr,
24 cmdPoolCreateFlags,
26 };
31 return nullptr;
32 }
33
35 if (!primaryCmdBuffer) {
37 return nullptr;
38 }
39
41}
#define GR_VK_CALL(IFACE, X)
#define GR_VK_CALL_RESULT(GPU, RESULT, X)
uint32_t queueIndex() const
const skgpu::VulkanInterface * vkInterface() const
bool protectedContext() const
static GrVkPrimaryCommandBuffer * Create(GrVkGpu *gpu, VkCommandPool cmdPool)
VkFlags VkCommandPoolCreateFlags
@ VK_COMMAND_POOL_CREATE_TRANSIENT_BIT
@ VK_COMMAND_POOL_CREATE_PROTECTED_BIT
@ VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
◆ findOrCreateSecondaryCommandBuffer()
Definition at line 52 of file GrVkCommandPool.cpp.
53 {
54 std::unique_ptr<GrVkSecondaryCommandBuffer>
result;
55 if (!fAvailableSecondaryBuffers.
empty()) {
56 result = std::move(fAvailableSecondaryBuffers.
back());
57 fAvailableSecondaryBuffers.
pop_back();
58 } else{
60 }
62}
static GrVkSecondaryCommandBuffer * Create(GrVkGpu *gpu, GrVkCommandPool *cmdPool)
◆ freeGPUData()
void GrVkCommandPool::freeGPUData |
( |
| ) |
const |
|
overrideprivatevirtual |
Must be implemented by any subclasses. Deletes any GPU data associated with this resource
Implements GrManagedResource.
Definition at line 108 of file GrVkCommandPool.cpp.
108 {
109
110
111
113 nonConstThis->
close();
114 nonConstThis->releaseResources();
115 fPrimaryCommandBuffer->freeGPUData(
fGpu, fCommandPool);
116 for (
const auto&
buffer : fAvailableSecondaryBuffers) {
118 }
121 DestroyCommandPool(
fGpu->
device(), fCommandPool,
nullptr));
122 }
123}
static const uint8_t buffer[]
◆ getPrimaryCommandBuffer()
◆ isOpen()
bool GrVkCommandPool::isOpen |
( |
| ) |
const |
|
inline |
◆ recycleSecondaryCommandBuffer()
Definition at line 64 of file GrVkCommandPool.cpp.
64 {
65 std::unique_ptr<GrVkSecondaryCommandBuffer> scb(
buffer);
66 if (fAvailableSecondaryBuffers.
size() < fMaxCachedSecondaryCommandBuffers) {
67 fAvailableSecondaryBuffers.
push_back(std::move(scb));
68 } else {
69 VkCommandBuffer vkBuffer =
buffer->vkCommandBuffer();
71 FreeCommandBuffers(
fGpu->
device(), fCommandPool, 1, &vkBuffer));
72 }
73}
◆ reset()
void GrVkCommandPool::reset |
( |
GrVkGpu * |
gpu | ) |
|
Definition at line 79 of file GrVkCommandPool.cpp.
79 {
82
83
84
86 ResetCommandPool(gpu->
device(), fCommandPool, 0));
88
89
90
91
92
93
94
95
96 this->releaseResources();
97
98 fOpen = true;
99}
#define TRACE_EVENT0(category_group, name)
◆ vkCommandPool()
VkCommandPool GrVkCommandPool::vkCommandPool |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: