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

Side by Side Diff: include/gpu/vk/GrVkTypes.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
« no previous file with comments | « no previous file | src/gpu/vk/GrVkBuffer.h » ('j') | src/gpu/vk/GrVkBuffer.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2016 Google Inc. 3 * Copyright 2016 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef GrVkTypes_DEFINED 9 #ifndef GrVkTypes_DEFINED
10 #define GrVkTypes_DEFINED 10 #define GrVkTypes_DEFINED
(...skipping 18 matching lines...) Expand all
29 * Types for interacting with Vulkan resources created externally to Skia. GrBac kendObjects for 29 * Types for interacting with Vulkan resources created externally to Skia. GrBac kendObjects for
30 * Vulkan textures are really const GrVkImageInfo* 30 * Vulkan textures are really const GrVkImageInfo*
31 */ 31 */
32 struct GrVkImageInfo { 32 struct GrVkImageInfo {
33 /** 33 /**
34 * If the image's format is sRGB (GrVkFormatIsSRGB returns true), then the i mage must have 34 * If the image's format is sRGB (GrVkFormatIsSRGB returns true), then the i mage must have
35 * been created with VkImageCreateFlags containing VK_IMAGE_CREATE_MUTABLE_F ORMAT_BIT. 35 * been created with VkImageCreateFlags containing VK_IMAGE_CREATE_MUTABLE_F ORMAT_BIT.
36 */ 36 */
37 VkImage fImage; 37 VkImage fImage;
38 VkDeviceMemory fAlloc; // can be VK_NULL_HANDLE iff Tex is an RT and uses borrow semantics 38 VkDeviceMemory fAlloc; // can be VK_NULL_HANDLE iff Tex is an RT and uses borrow semantics
39 VkDeviceSize fOffset;
39 VkImageTiling fImageTiling; 40 VkImageTiling fImageTiling;
40 VkImageLayout fImageLayout; 41 VkImageLayout fImageLayout;
41 VkFormat fFormat; 42 VkFormat fFormat;
42 uint32_t fLevelCount; 43 uint32_t fLevelCount;
43 44
44 // This gives a way for a client to update the layout of the Image if they c hange the layout 45 // This gives a way for a client to update the layout of the Image if they c hange the layout
45 // while we're still holding onto the wrapped texture. They will first need to get a handle 46 // while we're still holding onto the wrapped texture. They will first need to get a handle
46 // to our internal GrVkImageInfo by calling getTextureHandle on a GrVkTextur e. 47 // to our internal GrVkImageInfo by calling getTextureHandle on a GrVkTextur e.
47 void updateImageLayout(VkImageLayout layout) { fImageLayout = layout; } 48 void updateImageLayout(VkImageLayout layout) { fImageLayout = layout; }
48 }; 49 };
49 50
50 GR_STATIC_ASSERT(sizeof(GrBackendObject) >= sizeof(const GrVkImageInfo*)); 51 GR_STATIC_ASSERT(sizeof(GrBackendObject) >= sizeof(const GrVkImageInfo*));
51 52
52 #endif 53 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/vk/GrVkBuffer.h » ('j') | src/gpu/vk/GrVkBuffer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698