Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Side by Side Diff: src/gpu/vk/GrVkMemory.h

Issue 2112653002: Add static buffer support (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/vk/GrVkGpu.cpp ('k') | src/gpu/vk/GrVkMemory.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrVkMemory_DEFINED 8 #ifndef GrVkMemory_DEFINED
9 #define GrVkMemory_DEFINED 9 #define GrVkMemory_DEFINED
10 10
11 #include "GrVkBuffer.h" 11 #include "GrVkBuffer.h"
12 #include "SkTArray.h" 12 #include "SkTArray.h"
13 #include "SkTLList.h" 13 #include "SkTLList.h"
14 #include "vk/GrVkDefines.h" 14 #include "vk/GrVkDefines.h"
15 #include "vk/GrVkTypes.h" 15 #include "vk/GrVkTypes.h"
16 16
17 class GrVkGpu; 17 class GrVkGpu;
18 18
19 namespace GrVkMemory { 19 namespace GrVkMemory {
20 /** 20 /**
21 * Allocates vulkan device memory and binds it to the gpu's device for the gi ven object. 21 * Allocates vulkan device memory and binds it to the gpu's device for the gi ven object.
22 * Returns true if allocation succeeded. 22 * Returns true if allocation succeeded.
23 */ 23 */
24 bool AllocAndBindBufferMemory(const GrVkGpu* gpu, 24 bool AllocAndBindBufferMemory(const GrVkGpu* gpu,
25 VkBuffer buffer, 25 VkBuffer buffer,
26 GrVkBuffer::Type type, 26 GrVkBuffer::Type type,
27 bool dynamic,
27 GrVkAlloc* alloc); 28 GrVkAlloc* alloc);
28 void FreeBufferMemory(const GrVkGpu* gpu, GrVkBuffer::Type type, const GrVkA lloc& alloc); 29 void FreeBufferMemory(const GrVkGpu* gpu, GrVkBuffer::Type type, const GrVkA lloc& alloc);
29 30
30 bool AllocAndBindImageMemory(const GrVkGpu* gpu, 31 bool AllocAndBindImageMemory(const GrVkGpu* gpu,
31 VkImage image, 32 VkImage image,
32 bool linearTiling, 33 bool linearTiling,
33 GrVkAlloc* alloc); 34 GrVkAlloc* alloc);
34 void FreeImageMemory(const GrVkGpu* gpu, bool linearTiling, const GrVkAlloc& alloc); 35 void FreeImageMemory(const GrVkGpu* gpu, bool linearTiling, const GrVkAlloc& alloc);
35 36
36 VkPipelineStageFlags LayoutToPipelineStageFlags(const VkImageLayout layout); 37 VkPipelineStageFlags LayoutToPipelineStageFlags(const VkImageLayout layout);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 uint32_t memoryTypeIndex, GrVkAlloc* alloc); 116 uint32_t memoryTypeIndex, GrVkAlloc* alloc);
116 117
117 const GrVkGpu* fGpu; 118 const GrVkGpu* fGpu;
118 VkDeviceSize fSubHeapSize; 119 VkDeviceSize fSubHeapSize;
119 VkDeviceSize fAllocSize; 120 VkDeviceSize fAllocSize;
120 VkDeviceSize fUsedSize; 121 VkDeviceSize fUsedSize;
121 AllocFunc fAllocFunc; 122 AllocFunc fAllocFunc;
122 SkTArray<SkAutoTDelete<GrVkSubHeap>> fSubHeaps; 123 SkTArray<SkAutoTDelete<GrVkSubHeap>> fSubHeaps;
123 }; 124 };
124 #endif 125 #endif
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkGpu.cpp ('k') | src/gpu/vk/GrVkMemory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698