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

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

Issue 1921963003: Fix vulkan build on linux and android (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/GrVkPipelineState.cpp ('k') | src/gpu/vk/GrVkTexture.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 #include "GrVkResourceProvider.h" 8 #include "GrVkResourceProvider.h"
9 9
10 #include "GrVkGpu.h" 10 #include "GrVkGpu.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 #ifdef GR_PIPELINE_STATE_CACHE_STATS 97 #ifdef GR_PIPELINE_STATE_CACHE_STATS
98 ++fTotalRequests; 98 ++fTotalRequests;
99 #endif 99 #endif
100 // Get GrVkProgramDesc 100 // Get GrVkProgramDesc
101 GrVkPipelineState::Desc desc; 101 GrVkPipelineState::Desc desc;
102 if (!GrVkProgramDescBuilder::Build(&desc.fProgramDesc, 102 if (!GrVkProgramDescBuilder::Build(&desc.fProgramDesc,
103 primProc, 103 primProc,
104 pipeline, 104 pipeline,
105 *fGpu->vkCaps().glslCaps())) { 105 *fGpu->vkCaps().glslCaps())) {
106 GrCapsDebugf(fGpu->caps(), "Failed to build vk program descriptor!\n"); 106 GrCapsDebugf(fGpu->caps(), "Failed to build vk program descriptor!\n");
107 return false; 107 return nullptr;
108 } 108 }
109 109
110 // Get vulkan specific descriptor key 110 // Get vulkan specific descriptor key
111 GrVkPipelineState::BuildStateKey(pipeline, primitiveType, &desc.fStateKey); 111 GrVkPipelineState::BuildStateKey(pipeline, primitiveType, &desc.fStateKey);
112 // Get checksum of entire PipelineDesc 112 // Get checksum of entire PipelineDesc
113 int keyLength = desc.fStateKey.count(); 113 int keyLength = desc.fStateKey.count();
114 SkASSERT(0 == (keyLength % 4)); 114 SkASSERT(0 == (keyLength % 4));
115 // Seed the checksum with the checksum of the programDesc then add the vulka n key to it. 115 // Seed the checksum with the checksum of the programDesc then add the vulka n key to it.
116 desc.fChecksum = SkChecksum::Murmur3(desc.fStateKey.begin(), keyLength, 116 desc.fChecksum = SkChecksum::Murmur3(desc.fStateKey.begin(), keyLength,
117 desc.fProgramDesc.getChecksum()); 117 desc.fProgramDesc.getChecksum());
(...skipping 30 matching lines...) Expand all
148 entry->fPipelineState = std::move(pipelineState); 148 entry->fPipelineState = std::move(pipelineState);
149 fHashTable.set(entry); 149 fHashTable.set(entry);
150 fLRUList.addToTail(entry); 150 fLRUList.addToTail(entry);
151 return entry->fPipelineState; 151 return entry->fPipelineState;
152 } else { 152 } else {
153 fLRUList.remove(entry); 153 fLRUList.remove(entry);
154 fLRUList.addToTail(entry); 154 fLRUList.addToTail(entry);
155 } 155 }
156 return entry->fPipelineState; 156 return entry->fPipelineState;
157 } 157 }
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkPipelineState.cpp ('k') | src/gpu/vk/GrVkTexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698