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

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

Issue 2318143002: Merge building of program desc in Vulkan into one step (Closed)
Patch Set: more cleanup Created 4 years, 3 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/GrVkPipelineStateCache.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 "vk/GrVkPipelineStateBuilder.h" 8 #include "vk/GrVkPipelineStateBuilder.h"
9 9
10 #include "vk/GrVkDescriptorSetManager.h" 10 #include "vk/GrVkDescriptorSetManager.h"
11 #include "vk/GrVkGpu.h" 11 #include "vk/GrVkGpu.h"
12 #include "vk/GrVkRenderPass.h" 12 #include "vk/GrVkRenderPass.h"
13 #if USE_SKSL 13 #if USE_SKSL
14 #include "SkSLCompiler.h" 14 #include "SkSLCompiler.h"
15 #endif 15 #endif
16 16
17 GrVkPipelineState* GrVkPipelineStateBuilder::CreatePipelineState( 17 GrVkPipelineState* GrVkPipelineStateBuilder::CreatePipelineState(
18 GrVkGpu* gpu, 18 GrVkGpu* gpu,
19 const GrPipeline& pipeline, 19 const GrPipeline& pipeline,
20 const GrPrimitive Processor& primProc, 20 const GrPrimitive Processor& primProc,
21 GrPrimitiveType p rimitiveType, 21 GrPrimitiveType p rimitiveType,
22 const GrVkPipelin eState::Desc& desc, 22 const GrVkPipelin eState::Desc& desc,
23 const GrVkRenderP ass& renderPass) { 23 const GrVkRenderP ass& renderPass) {
24 // create a builder. This will be handed off to effects so they can use it to add 24 // create a builder. This will be handed off to effects so they can use it to add
25 // uniforms, varyings, textures, etc 25 // uniforms, varyings, textures, etc
26 GrVkPipelineStateBuilder builder(gpu, pipeline, primProc, desc.fProgramDesc) ; 26 GrVkPipelineStateBuilder builder(gpu, pipeline, primProc, desc);
27 27
28 GrGLSLExpr4 inputColor; 28 GrGLSLExpr4 inputColor;
29 GrGLSLExpr4 inputCoverage; 29 GrGLSLExpr4 inputCoverage;
30 30
31 if (!builder.emitAndInstallProcs(&inputColor, &inputCoverage)) { 31 if (!builder.emitAndInstallProcs(&inputColor, &inputCoverage)) {
32 builder.cleanupFragmentProcessors(); 32 builder.cleanupFragmentProcessors();
33 return nullptr; 33 return nullptr;
34 } 34 }
35 35
36 return builder.finalize(primitiveType, renderPass, desc); 36 return builder.finalize(primitiveType, renderPass, desc);
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 fUniformHandles, 259 fUniformHandles,
260 fUniformHandler.fUniforms, 260 fUniformHandler.fUniforms,
261 fUniformHandler.fCurrentVertexUBOOffset, 261 fUniformHandler.fCurrentVertexUBOOffset,
262 fUniformHandler.fCurrentFragmentUBOOffset, 262 fUniformHandler.fCurrentFragmentUBOOffset,
263 (uint32_t)fUniformHandler.numSamplers(), 263 (uint32_t)fUniformHandler.numSamplers(),
264 fGeometryProcessor, 264 fGeometryProcessor,
265 fXferProcessor, 265 fXferProcessor,
266 fFragmentProcessors); 266 fFragmentProcessors);
267 } 267 }
268 268
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkPipelineState.cpp ('k') | src/gpu/vk/GrVkPipelineStateCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698