Push constants are now supported for all stages.

This commit is contained in:
2022-09-09 00:38:46 -07:00
parent aeaed68efb
commit 5ed6b8eccd

View File

@@ -205,14 +205,8 @@ KRPipeline::KRPipeline(KRContext& context, KRSurface& surface, const PipelineInf
attribute_locations[KRMesh::KRENGINE_ATTRIB_BONEWEIGHTS] = input_var.location + 1; attribute_locations[KRMesh::KRENGINE_ATTRIB_BONEWEIGHTS] = input_var.location + 1;
} }
} }
initPushConstantStage(ShaderStage::vert, reflection);
} else if (stageInfo.stage == VK_SHADER_STAGE_FRAGMENT_BIT) {
initPushConstantStage(ShaderStage::frag, reflection);
} else {
// failed! TODO - Error handling
} }
initPushConstantStage(shader->getShaderStage(), reflection);
stageInfo.module = shaderModule; stageInfo.module = shaderModule;
stageInfo.pName = "main"; stageInfo.pName = "main";
} }