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

Unified Diff: src/gpu/vk/GrVkProgramBuilder.cpp

Issue 1806983002: Update how we send draws to gpu backend to reduce state setting. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/vk/GrVkProgramBuilder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkProgramBuilder.cpp
diff --git a/src/gpu/vk/GrVkProgramBuilder.cpp b/src/gpu/vk/GrVkProgramBuilder.cpp
index 06de3a04f6443013692ef4e1b838f4eb6b30343c..1b56054d99ebd84c086c9c8b2d5d73937c241938 100644
--- a/src/gpu/vk/GrVkProgramBuilder.cpp
+++ b/src/gpu/vk/GrVkProgramBuilder.cpp
@@ -12,12 +12,14 @@
#include "vk/GrVkProgram.h"
GrVkProgram* GrVkProgramBuilder::CreateProgram(GrVkGpu* gpu,
- const DrawArgs& args,
+ const GrPipeline& pipeline,
+ const GrPrimitiveProcessor& primProc,
GrPrimitiveType primitiveType,
+ const GrVkProgramDesc& desc,
const GrVkRenderPass& renderPass) {
// create a builder. This will be handed off to effects so they can use it to add
// uniforms, varyings, textures, etc
- GrVkProgramBuilder builder(gpu, args);
+ GrVkProgramBuilder builder(gpu, pipeline, primProc, desc);
GrGLSLExpr4 inputColor;
GrGLSLExpr4 inputCoverage;
@@ -27,11 +29,14 @@ GrVkProgram* GrVkProgramBuilder::CreateProgram(GrVkGpu* gpu,
return nullptr;
}
- return builder.finalize(args, primitiveType, renderPass);
+ return builder.finalize(primitiveType, renderPass);
}
-GrVkProgramBuilder::GrVkProgramBuilder(GrVkGpu* gpu, const DrawArgs& args)
- : INHERITED(args)
+GrVkProgramBuilder::GrVkProgramBuilder(GrVkGpu* gpu,
+ const GrPipeline& pipeline,
+ const GrPrimitiveProcessor& primProc,
+ const GrVkProgramDesc& desc)
+ : INHERITED(pipeline, primProc, desc)
, fGpu(gpu)
, fVaryingHandler(this)
, fUniformHandler(this) {
@@ -135,8 +140,7 @@ bool GrVkProgramBuilder::CreateVkShaderModule(const GrVkGpu* gpu,
return true;
}
-GrVkProgram* GrVkProgramBuilder::finalize(const DrawArgs& args,
- GrPrimitiveType primitiveType,
+GrVkProgram* GrVkProgramBuilder::finalize(GrPrimitiveType primitiveType,
const GrVkRenderPass& renderPass) {
VkDescriptorSetLayout dsLayout[2];
VkPipelineLayout pipelineLayout;
@@ -246,8 +250,8 @@ GrVkProgram* GrVkProgramBuilder::finalize(const DrawArgs& args,
&shaderStageInfo[1]));
GrVkResourceProvider& resourceProvider = fGpu->resourceProvider();
- GrVkPipeline* pipeline = resourceProvider.createPipeline(*args.fPipeline,
- *args.fPrimitiveProcessor,
+ GrVkPipeline* pipeline = resourceProvider.createPipeline(fPipeline,
+ fPrimProc,
shaderStageInfo,
2,
primitiveType,
« no previous file with comments | « src/gpu/vk/GrVkProgramBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698