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

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

Issue 1813913002: Use dynamic state from vulkan pipelines (Closed) Base URL: https://skia.googlesource.com/skia.git@drawInterface
Patch Set: cache dynamic state updates 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/GrVkCommandBuffer.cpp ('k') | src/gpu/vk/GrVkPipeline.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkGpu.cpp
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index 180ba3be66b85686d0a3c2e59b32b4f1c9af3e5f..5e25ede9be38e97cac5a9c46f63367449912aa66 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -1340,6 +1340,9 @@ bool GrVkGpu::prepareDrawState(const GrPipeline& pipeline,
(*program)->setData(this, primProc, pipeline);
(*program)->bind(this, fCurrentCmdBuffer);
+
+ GrVkPipeline::SetDynamicState(this, fCurrentCmdBuffer, pipeline);
+
return true;
}
@@ -1355,6 +1358,8 @@ void GrVkGpu::onDraw(const GrPipeline& pipeline,
const GrVkRenderPass* renderPass = vkRT->simpleRenderPass();
SkASSERT(renderPass);
+ fCurrentCmdBuffer->beginRenderPass(this, renderPass, *vkRT);
+
GrVkProgram* program = nullptr;
GrPrimitiveType primitiveType = meshes[0].primitiveType();
if (!this->prepareDrawState(pipeline, primProc, primitiveType, *renderPass, &program)) {
@@ -1397,7 +1402,6 @@ void GrVkGpu::onDraw(const GrPipeline& pipeline,
false);
}
- fCurrentCmdBuffer->beginRenderPass(this, renderPass, *vkRT);
for (int i = 0; i < meshCount; ++i) {
if (GrXferBarrierType barrierType = pipeline.xferBarrierType(*this->caps())) {
« no previous file with comments | « src/gpu/vk/GrVkCommandBuffer.cpp ('k') | src/gpu/vk/GrVkPipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698