Eliminate redundant vkCmdBindPipeline calls
This commit is contained in:
@@ -842,7 +842,10 @@ bool KRPipeline::bind(KRNode::RenderInfo& ri, const Matrix4& matModel)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ri.pipeline != this) {
|
||||||
vkCmdBindPipeline(ri.commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, m_graphicsPipeline);
|
vkCmdBindPipeline(ri.commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, m_graphicsPipeline);
|
||||||
|
ri.pipeline = this;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ class KRPointLight;
|
|||||||
class KRSpotLight;
|
class KRSpotLight;
|
||||||
class KRDirectionalLight;
|
class KRDirectionalLight;
|
||||||
class KRRenderPass;
|
class KRRenderPass;
|
||||||
|
class KRPipeline;
|
||||||
namespace tinyxml2 {
|
namespace tinyxml2 {
|
||||||
class XMLNode;
|
class XMLNode;
|
||||||
class XMLAttribute;
|
class XMLAttribute;
|
||||||
@@ -92,6 +93,7 @@ public:
|
|||||||
std::vector<KRSpotLight*> spot_lights;
|
std::vector<KRSpotLight*> spot_lights;
|
||||||
KRViewport* viewport;
|
KRViewport* viewport;
|
||||||
KRRenderPass* renderPass;
|
KRRenderPass* renderPass;
|
||||||
|
KRPipeline* pipeline;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void InitNodeInfo(KrNodeInfo* nodeInfo);
|
static void InitNodeInfo(KrNodeInfo* nodeInfo);
|
||||||
|
|||||||
Reference in New Issue
Block a user