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

Side by Side Diff: include/gpu/vk/GrVkTypes.h

Issue 2029763002: Create free list heap for suballocation (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments; clean up debug code 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') | 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 /* 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 15 matching lines...) Expand all
26 26
27 27
28 /////////////////////////////////////////////////////////////////////////////// 28 ///////////////////////////////////////////////////////////////////////////////
29 /** 29 /**
30 * Types for interacting with Vulkan resources created externally to Skia. GrBac kendObjects for 30 * Types for interacting with Vulkan resources created externally to Skia. GrBac kendObjects for
31 * Vulkan textures are really const GrVkImageInfo* 31 * Vulkan textures are really const GrVkImageInfo*
32 */ 32 */
33 struct GrVkAlloc { 33 struct GrVkAlloc {
34 VkDeviceMemory fMemory; // can be VK_NULL_HANDLE iff Tex is an RT and uses borrow semantics 34 VkDeviceMemory fMemory; // can be VK_NULL_HANDLE iff Tex is an RT and uses borrow semantics
35 VkDeviceSize fOffset; 35 VkDeviceSize fOffset;
36 VkDeviceSize fSize; // this can be indeterminate iff Tex uses borrow se mantics
36 }; 37 };
37 38
38 struct GrVkImageInfo { 39 struct GrVkImageInfo {
39 /** 40 /**
40 * If the image's format is sRGB (GrVkFormatIsSRGB returns true), then the i mage must have 41 * If the image's format is sRGB (GrVkFormatIsSRGB returns true), then the i mage must have
41 * been created with VkImageCreateFlags containing VK_IMAGE_CREATE_MUTABLE_F ORMAT_BIT. 42 * been created with VkImageCreateFlags containing VK_IMAGE_CREATE_MUTABLE_F ORMAT_BIT.
42 */ 43 */
43 VkImage fImage; 44 VkImage fImage;
44 GrVkAlloc fAlloc; 45 GrVkAlloc fAlloc;
45 VkImageTiling fImageTiling; 46 VkImageTiling fImageTiling;
46 VkImageLayout fImageLayout; 47 VkImageLayout fImageLayout;
47 VkFormat fFormat; 48 VkFormat fFormat;
48 uint32_t fLevelCount; 49 uint32_t fLevelCount;
49 50
50 // This gives a way for a client to update the layout of the Image if they c hange the layout 51 // This gives a way for a client to update the layout of the Image if they c hange the layout
51 // while we're still holding onto the wrapped texture. They will first need to get a handle 52 // while we're still holding onto the wrapped texture. They will first need to get a handle
52 // to our internal GrVkImageInfo by calling getTextureHandle on a GrVkTextur e. 53 // to our internal GrVkImageInfo by calling getTextureHandle on a GrVkTextur e.
53 void updateImageLayout(VkImageLayout layout) { fImageLayout = layout; } 54 void updateImageLayout(VkImageLayout layout) { fImageLayout = layout; }
54 }; 55 };
55 56
56 GR_STATIC_ASSERT(sizeof(GrBackendObject) >= sizeof(const GrVkImageInfo*)); 57 GR_STATIC_ASSERT(sizeof(GrBackendObject) >= sizeof(const GrVkImageInfo*));
57 58
58 #endif 59 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/vk/GrVkBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698