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

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

Issue 2348523002: Support use of non-coherent memory allocations in Vulkan. (Closed)
Patch Set: Some more clean up Created 4 years, 3 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
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
(...skipping 19 matching lines...) Expand all
30 30
31 bool AllocAndBindImageMemory(const GrVkGpu* gpu, 31 bool AllocAndBindImageMemory(const GrVkGpu* gpu,
32 VkImage image, 32 VkImage image,
33 bool linearTiling, 33 bool linearTiling,
34 GrVkAlloc* alloc); 34 GrVkAlloc* alloc);
35 void FreeImageMemory(const GrVkGpu* gpu, bool linearTiling, const GrVkAlloc& alloc); 35 void FreeImageMemory(const GrVkGpu* gpu, bool linearTiling, const GrVkAlloc& alloc);
36 36
37 VkPipelineStageFlags LayoutToPipelineStageFlags(const VkImageLayout layout); 37 VkPipelineStageFlags LayoutToPipelineStageFlags(const VkImageLayout layout);
38 38
39 VkAccessFlags LayoutToSrcAccessMask(const VkImageLayout layout); 39 VkAccessFlags LayoutToSrcAccessMask(const VkImageLayout layout);
40
41 void FlushMappedAlloc(const GrVkGpu* gpu, const GrVkAlloc& alloc);
42 void InvalidateMappedAlloc(const GrVkGpu* gpu, const GrVkAlloc& alloc);
40 } 43 }
41 44
42 class GrVkFreeListAlloc { 45 class GrVkFreeListAlloc {
43 public: 46 public:
44 GrVkFreeListAlloc(VkDeviceSize size, VkDeviceSize alignment) 47 GrVkFreeListAlloc(VkDeviceSize size, VkDeviceSize alignment)
45 : fSize(size) 48 : fSize(size)
46 , fAlignment(alignment) 49 , fAlignment(alignment)
47 , fFreeSize(size) 50 , fFreeSize(size)
48 , fLargestBlockSize(size) 51 , fLargestBlockSize(size)
49 , fLargestBlockOffset(0) { 52 , fLargestBlockOffset(0) {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 uint32_t memoryTypeIndex, GrVkAlloc* alloc); 152 uint32_t memoryTypeIndex, GrVkAlloc* alloc);
150 153
151 const GrVkGpu* fGpu; 154 const GrVkGpu* fGpu;
152 VkDeviceSize fSubHeapSize; 155 VkDeviceSize fSubHeapSize;
153 VkDeviceSize fAllocSize; 156 VkDeviceSize fAllocSize;
154 VkDeviceSize fUsedSize; 157 VkDeviceSize fUsedSize;
155 AllocFunc fAllocFunc; 158 AllocFunc fAllocFunc;
156 SkTArray<SkAutoTDelete<GrVkSubHeap>> fSubHeaps; 159 SkTArray<SkAutoTDelete<GrVkSubHeap>> fSubHeaps;
157 }; 160 };
158 #endif 161 #endif
OLDNEW
« src/gpu/vk/GrVkGpu.cpp ('K') | « 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