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);
|
||||
ri.pipeline = this;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ class KRPointLight;
|
||||
class KRSpotLight;
|
||||
class KRDirectionalLight;
|
||||
class KRRenderPass;
|
||||
class KRPipeline;
|
||||
namespace tinyxml2 {
|
||||
class XMLNode;
|
||||
class XMLAttribute;
|
||||
@@ -92,6 +93,7 @@ public:
|
||||
std::vector<KRSpotLight*> spot_lights;
|
||||
KRViewport* viewport;
|
||||
KRRenderPass* renderPass;
|
||||
KRPipeline* pipeline;
|
||||
};
|
||||
|
||||
static void InitNodeInfo(KrNodeInfo* nodeInfo);
|
||||
|
||||
Reference in New Issue
Block a user