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

Side by Side Diff: src/gpu/vk/GrVkRenderPass.cpp

Issue 1816153002: Set up cache in vulkan to reuse GrVkPrograms (aka VkPipelines) (Closed) Base URL: https://skia.googlesource.com/skia.git@progSamplers
Patch Set: rebase Created 4 years, 9 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/GrVkRenderPass.h ('k') | src/gpu/vk/GrVkResourceProvider.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 * 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 #include "GrVkRenderPass.h" 8 #include "GrVkRenderPass.h"
9 9
10 #include "GrProcessor.h"
10 #include "GrVkFramebuffer.h" 11 #include "GrVkFramebuffer.h"
11 #include "GrVkGpu.h" 12 #include "GrVkGpu.h"
12 #include "GrVkRenderTarget.h" 13 #include "GrVkRenderTarget.h"
13 #include "GrVkUtil.h" 14 #include "GrVkUtil.h"
14 15
15 void setup_simple_vk_attachment_description(VkAttachmentDescription* attachment, 16 void setup_simple_vk_attachment_description(VkAttachmentDescription* attachment,
16 VkFormat format, 17 VkFormat format,
17 uint32_t samples, 18 uint32_t samples,
18 VkImageLayout layout) { 19 VkImageLayout layout) {
19 attachment->flags = 0; 20 attachment->flags = 0;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 } 212 }
212 } 213 }
213 if (fAttachmentFlags & kStencil_AttachmentFlag) { 214 if (fAttachmentFlags & kStencil_AttachmentFlag) {
214 if (fAttachmentsDescriptor.fStencil != desc.fStencil) { 215 if (fAttachmentsDescriptor.fStencil != desc.fStencil) {
215 return false; 216 return false;
216 } 217 }
217 } 218 }
218 219
219 return true; 220 return true;
220 } 221 }
222
223 void GrVkRenderPass::genKey(GrProcessorKeyBuilder* b) const {
224 b->add32(fAttachmentFlags);
225 if (fAttachmentFlags & kColor_AttachmentFlag) {
226 b->add32(fAttachmentsDescriptor.fColor.fFormat);
227 b->add32(fAttachmentsDescriptor.fColor.fSamples);
228 }
229 if (fAttachmentFlags & kResolve_AttachmentFlag) {
230 b->add32(fAttachmentsDescriptor.fResolve.fFormat);
231 b->add32(fAttachmentsDescriptor.fResolve.fSamples);
232 }
233 if (fAttachmentFlags & kStencil_AttachmentFlag) {
234 b->add32(fAttachmentsDescriptor.fStencil.fFormat);
235 b->add32(fAttachmentsDescriptor.fStencil.fSamples);
236 }
237 }
238
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkRenderPass.h ('k') | src/gpu/vk/GrVkResourceProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698