Vulkan: Keep state on Clear cmds when used later.

This also removes duplicate state - for example our UI has some duplicate
Scissor commands.
This commit is contained in:
Unknown W. Brackets
2018-05-03 07:18:40 -07:00
parent 73d6446d72
commit 954f93046f
3 changed files with 82 additions and 1 deletions
+7
View File
@@ -611,6 +611,10 @@ void VulkanQueueRunner::LogRenderPass(const VKRStep &pass) {
ILOG("RenderPass Begin(%x)", fb);
for (auto &cmd : pass.commands) {
switch (cmd.cmd) {
case VKRRenderCommand::REMOVED:
ILOG(" REMOVED");
break;
case VKRRenderCommand::BIND_PIPELINE:
ILOG(" BindPipeline(%x)", (int)(intptr_t)cmd.pipeline.pipeline);
break;
@@ -733,6 +737,9 @@ void VulkanQueueRunner::PerformRenderPass(const VKRStep &step, VkCommandBuffer c
for (const auto &c : commands) {
switch (c.cmd) {
case VKRRenderCommand::REMOVED:
break;
case VKRRenderCommand::BIND_PIPELINE:
if (c.pipeline.pipeline != lastPipeline) {
vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, c.pipeline.pipeline);