Fixed Push constant setup errros
This commit is contained in:
@@ -623,7 +623,7 @@ namespace PB::Renderer
|
||||
}
|
||||
|
||||
bool VulkanManager::CreateGraphicsPipeline()
|
||||
{
|
||||
{
|
||||
VkShaderModule vertShaderModule = CreateShaderModule("../shaders/vert.spv");
|
||||
VkShaderModule fragShaderModule = CreateShaderModule("../shaders/frag.spv");
|
||||
|
||||
@@ -719,8 +719,19 @@ namespace PB::Renderer
|
||||
colorBlending.attachmentCount = 1;
|
||||
colorBlending.pAttachments = &colorBlendAttachment;
|
||||
|
||||
VkPushConstantRange range{};
|
||||
range.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT;
|
||||
range.offset = 0;
|
||||
range.size = sizeof(Color); // TEMPORARY
|
||||
|
||||
VkPipelineLayoutCreateInfo pipelineLayoutInfo{};
|
||||
pipelineLayoutInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
|
||||
pipelineLayoutInfo.setLayoutCount = 0;
|
||||
pipelineLayoutInfo.pNext = nullptr;
|
||||
|
||||
pipelineLayoutInfo.pushConstantRangeCount = 1;
|
||||
pipelineLayoutInfo.pPushConstantRanges = ⦥
|
||||
|
||||
|
||||
if (vkCreatePipelineLayout(s_Device, &pipelineLayoutInfo, nullptr, &s_PipelineLayout) != VK_SUCCESS)
|
||||
{
|
||||
@@ -754,7 +765,7 @@ namespace PB::Renderer
|
||||
vkDestroyShaderModule(s_Device, fragShaderModule, nullptr);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
VkShaderModule VulkanManager::CreateShaderModule(const std::string& filename)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user