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

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

Issue 1916563002: Add automatic generation of mipmaps to Vulkan (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 4 years, 7 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/GrVkRenderTarget.cpp ('k') | src/gpu/vk/GrVkResourceProvider.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 2016 Google Inc. 2 * Copyright 2016 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 GrVkResourceProvider_DEFINED 8 #ifndef GrVkResourceProvider_DEFINED
9 #define GrVkResourceProvider_DEFINED 9 #define GrVkResourceProvider_DEFINED
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // Finds or creates a compatible GrVkDescriptorPool for the requested type a nd count. 56 // Finds or creates a compatible GrVkDescriptorPool for the requested type a nd count.
57 // The refcount is incremented and a pointer returned. 57 // The refcount is incremented and a pointer returned.
58 // TODO: Currently this will just create a descriptor pool without holding o nto a ref itself 58 // TODO: Currently this will just create a descriptor pool without holding o nto a ref itself
59 // so we currently do not reuse them. Rquires knowing if another draw is currently using 59 // so we currently do not reuse them. Rquires knowing if another draw is currently using
60 // the GrVkDescriptorPool, the ability to reset pools, and the ability to purge pools out 60 // the GrVkDescriptorPool, the ability to reset pools, and the ability to purge pools out
61 // of our cache of GrVkDescriptorPools. 61 // of our cache of GrVkDescriptorPools.
62 GrVkDescriptorPool* findOrCreateCompatibleDescriptorPool(VkDescriptorType ty pe, uint32_t count); 62 GrVkDescriptorPool* findOrCreateCompatibleDescriptorPool(VkDescriptorType ty pe, uint32_t count);
63 63
64 // Finds or creates a compatible GrVkSampler based on the GrTextureParams. 64 // Finds or creates a compatible GrVkSampler based on the GrTextureParams.
65 // The refcount is incremented and a pointer returned. 65 // The refcount is incremented and a pointer returned.
66 GrVkSampler* findOrCreateCompatibleSampler(const GrTextureParams&); 66 GrVkSampler* findOrCreateCompatibleSampler(const GrTextureParams&, uint32_t mipLevels);
67 67
68 sk_sp<GrVkPipelineState> findOrCreateCompatiblePipelineState(const GrPipelin e&, 68 sk_sp<GrVkPipelineState> findOrCreateCompatiblePipelineState(const GrPipelin e&,
69 const GrPrimiti veProcessor&, 69 const GrPrimiti veProcessor&,
70 GrPrimitiveType , 70 GrPrimitiveType ,
71 const GrVkRende rPass& renderPass); 71 const GrVkRende rPass& renderPass);
72 72
73 // Destroy any cached resources. To be called before destroying the VkDevice . 73 // Destroy any cached resources. To be called before destroying the VkDevice .
74 // The assumption is that all queues are idle and all command buffers are fi nished. 74 // The assumption is that all queues are idle and all command buffers are fi nished.
75 // For resource tracing to work properly, this should be called after unrefi ng all other 75 // For resource tracing to work properly, this should be called after unrefi ng all other
76 // resource usages. 76 // resource usages.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 // Array of RenderPasses that only have a single color attachment, optional stencil attachment, 130 // Array of RenderPasses that only have a single color attachment, optional stencil attachment,
131 // optional resolve attachment, and only one subpass 131 // optional resolve attachment, and only one subpass
132 SkSTArray<4, GrVkRenderPass*> fSimpleRenderPasses; 132 SkSTArray<4, GrVkRenderPass*> fSimpleRenderPasses;
133 133
134 // Array of CommandBuffers that are currently in flight 134 // Array of CommandBuffers that are currently in flight
135 SkSTArray<4, GrVkCommandBuffer*> fActiveCommandBuffers; 135 SkSTArray<4, GrVkCommandBuffer*> fActiveCommandBuffers;
136 136
137 // Stores GrVkSampler objects that we've already created so we can reuse the m across multiple 137 // Stores GrVkSampler objects that we've already created so we can reuse the m across multiple
138 // GrVkPipelineStates 138 // GrVkPipelineStates
139 SkTDynamicHash<GrVkSampler, uint8_t> fSamplers; 139 SkTDynamicHash<GrVkSampler, uint16_t> fSamplers;
140 140
141 // Cache of GrVkPipelineStates 141 // Cache of GrVkPipelineStates
142 PipelineStateCache* fPipelineStateCache; 142 PipelineStateCache* fPipelineStateCache;
143 }; 143 };
144 144
145 #endif 145 #endif
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkRenderTarget.cpp ('k') | src/gpu/vk/GrVkResourceProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698