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

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

Issue 2038583002: Add GpuCommandBuffer support. (Closed) Base URL: https://skia.googlesource.com/skia.git@secondaryCB
Patch Set: rebase Created 4 years, 6 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
Index: src/gpu/vk/GrVkCommandBuffer.cpp
diff --git a/src/gpu/vk/GrVkCommandBuffer.cpp b/src/gpu/vk/GrVkCommandBuffer.cpp
index 9604355aad2bf5a388897f1afacff0d77280af0a..2b636edf20e6f68fdbe58eb2cf1e727c13ad3bd3 100644
--- a/src/gpu/vk/GrVkCommandBuffer.cpp
+++ b/src/gpu/vk/GrVkCommandBuffer.cpp
@@ -311,6 +311,9 @@ void GrVkPrimaryCommandBuffer::executeCommands(const GrVkGpu* gpu,
GR_VK_CALL(gpu->vkInterface(), CmdExecuteCommands(fCmdBuffer, 1, &buffer->fCmdBuffer));
this->addResource(buffer);
+ // When executing a secondary command buffer all state (besides render pass state) becomes
+ // invalidated and must be reset. This includes bound buffers, pipelines, dynamic state, etc.
+ this->invalidateState();
jvanverth1 2016/06/06 20:47:43 All of it must be reset? That's unfortunate.
egdaniel 2016/06/07 15:22:37 Yes. But in general this shouldn't hurt us because
}
void GrVkPrimaryCommandBuffer::submitToQueue(const GrVkGpu* gpu,

Powered by Google App Engine
This is Rietveld 408576698