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

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

Issue 2018933004: Add offset to memory allocations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Take care of some additional FreeMemorys Created 4 years, 6 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
11 #include "vk/GrVkDefines.h" 11 #include "vk/GrVkDefines.h"
12 12
13 class GrVkGpu; 13 class GrVkGpu;
14 14
15 namespace GrVkMemory { 15 namespace GrVkMemory {
16 /** 16 /**
17 * Allocates vulkan device memory and binds it to the gpu's device for the gi ven object. 17 * Allocates vulkan device memory and binds it to the gpu's device for the gi ven object.
18 * Returns true of allocation succeeded. 18 * Returns true of allocation succeeded.
19 */ 19 */
20 bool AllocAndBindBufferMemory(const GrVkGpu* gpu, 20 bool AllocAndBindBufferMemory(const GrVkGpu* gpu,
21 VkBuffer buffer, 21 VkBuffer buffer,
22 const VkMemoryPropertyFlags flags, 22 const VkMemoryPropertyFlags flags,
23 VkDeviceMemory* memory); 23 VkDeviceMemory* memory,
24 VkDeviceSize* offset);
25 void FreeBufferMemory(const GrVkGpu* gpu, VkDeviceMemory memory, VkDeviceSiz e offset);
24 26
25 bool AllocAndBindImageMemory(const GrVkGpu* gpu, 27 bool AllocAndBindImageMemory(const GrVkGpu* gpu,
26 VkImage image, 28 VkImage image,
27 const VkMemoryPropertyFlags flags, 29 const VkMemoryPropertyFlags flags,
28 VkDeviceMemory* memory); 30 VkDeviceMemory* memory,
31 VkDeviceSize* offset);
32 void FreeImageMemory(const GrVkGpu* gpu, VkDeviceMemory memory, VkDeviceSize offset);
29 33
30 VkPipelineStageFlags LayoutToPipelineStageFlags(const VkImageLayout layout); 34 VkPipelineStageFlags LayoutToPipelineStageFlags(const VkImageLayout layout);
31 35
32 VkAccessFlags LayoutToSrcAccessMask(const VkImageLayout layout); 36 VkAccessFlags LayoutToSrcAccessMask(const VkImageLayout layout);
33 } 37 }
34 38
35 #endif 39 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698