Flutter Engine
The Flutter Engine
VulkanDescriptorSet.cpp
Go to the documentation of this file.
1/*
2* Copyright 2023 Google LLC
3*
4* Use of this source code is governed by a BSD-style license that can be
5* found in the LICENSE file.
6*/
7
9
12
13namespace skgpu::graphite {
14
17 VkDescriptorSet descSet;
18 VkDescriptorSetAllocateInfo dsAllocateInfo;
19 memset(&dsAllocateInfo, 0, sizeof(VkDescriptorSetAllocateInfo));
21 dsAllocateInfo.pNext = nullptr;
22 dsAllocateInfo.descriptorPool = pool->descPool();
23 dsAllocateInfo.descriptorSetCount = 1;
24 dsAllocateInfo.pSetLayouts = pool->descSetLayout();
25
28 ctxt, result, AllocateDescriptorSets(ctxt->device(), &dsAllocateInfo, &descSet));
29 if (result != VK_SUCCESS) {
30 return nullptr;
31 }
32 return sk_sp<VulkanDescriptorSet>(new VulkanDescriptorSet(ctxt, descSet, pool));
33}
34
36 VkDescriptorSet set,
38 : Resource(ctxt,
41 /*gpuMemorySize=*/0)
42 , fDescSet(set)
43 , fPool(pool) {
44 fPool->ref();
45}
46
47void VulkanDescriptorSet::freeGpuData() {
48 fPool->unref();
49}
50
51} // namespace skgpu::graphite
AutoreleasePool pool
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
#define VULKAN_CALL_RESULT(SHARED_CONTEXT, RESULT, X)
VulkanDescriptorSet(const VulkanSharedContext *, VkDescriptorSet, sk_sp< VulkanDescriptorPool >)
static sk_sp< VulkanDescriptorSet > Make(const VulkanSharedContext *, const sk_sp< VulkanDescriptorPool > &)
GAsyncResult * result
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not set
Definition: switches.h:76
Definition: GpuTools.h:21
Budgeted
Definition: GpuTypes.h:35
VkDescriptorPool descriptorPool
Definition: vulkan_core.h:3766
const VkDescriptorSetLayout * pSetLayouts
Definition: vulkan_core.h:3768
VkResult
Definition: vulkan_core.h:140
@ VK_SUCCESS
Definition: vulkan_core.h:141
@ VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
Definition: vulkan_core.h:236