more pipeline init
This commit is contained in:
parent
f4bbfcdf6c
commit
195acae78c
@ -309,6 +309,21 @@ CreateGraphicsPipeline(Vulkan* vk, GfxPipelineInfo* build_info)
|
|||||||
scissorCount: 1,
|
scissorCount: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
VkPipelineShaderStageCreateInfo[] shader_info = [
|
||||||
|
{
|
||||||
|
sType: VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
|
||||||
|
stage: VK_SHADER_STAGE_VERTEX_BIT,
|
||||||
|
module: cast(VkShaderModule)build_info.vertex_shader,
|
||||||
|
pName: "main",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sType: VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
|
||||||
|
stage: VK_SHADER_STAGE_FRAGMENT_BIT,
|
||||||
|
module: cast(VkShaderModule)build_info.frag_shader,
|
||||||
|
pName: "main",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
VkGraphicsPipelineCreateInfo create_info = {
|
VkGraphicsPipelineCreateInfo create_info = {
|
||||||
sType: VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO,
|
sType: VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO,
|
||||||
pNext: &rendering_info,
|
pNext: &rendering_info,
|
||||||
@ -320,6 +335,9 @@ CreateGraphicsPipeline(Vulkan* vk, GfxPipelineInfo* build_info)
|
|||||||
pColorBlendState: &blend_info,
|
pColorBlendState: &blend_info,
|
||||||
pDepthStencilState: &depth_info,
|
pDepthStencilState: &depth_info,
|
||||||
pDynamicState: &dyn_info,
|
pDynamicState: &dyn_info,
|
||||||
|
stageCount: cast(u32)shader_info.length,
|
||||||
|
pStages: shader_info.ptr,
|
||||||
|
layout: vk.pipeline_layout,
|
||||||
};
|
};
|
||||||
|
|
||||||
VkPipeline pipeline;
|
VkPipeline pipeline;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user