VkGraphicsPipelineCreateInfo
2024-10-24 17:01:53 0 举报
AI智能生成
VkGraphicsPipelineCreateInfo是一个用于描述图形渲染管线创建信息的结构体。它包含了一系列子结构体,用于定义图形管线的状态、输入布局、顶点输入描述、管线的视图port和深度的范围以及搅拌子过程等等。这些子结构体都定义了管线的不同部分,使得在绘制图形时能够进行有效的处理。例如,VkPipelineInputAssemblyStateCreateInfo用于定义顶点的装配方式,VkPipelineViewportStateCreateInfo用于定义管线的视图port,VkPipelineRasterizationStateCreateInfo用于定义光栅化处理,VkPipelineMultisampleStateCreateInfo用于定义多重采样等等。每个子结构体都包含了不同的参数和设置,用于调整管线的性能和效果。通过VkGraphicsPipelineCreateInfo,开发者可以在Vulkan API中创建一个高效的图形管线,从而实现各种复杂的图形渲染任务。
作者其他创作
大纲/内容
VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
sType
pNext
指示创建过程中的一些动作
VkPipelineCreateFlagBits flags
stageCount
VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
flags
VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT
VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT
VK_SHADER_STAGE_GEOMETRY_BIT
VK_SHADER_STAGE_FRAGMENT_BIT
VK_SHADER_STAGE_COMPUTE_BIT
VkShaderStageFlagBits stage
module
VkShaderModule pName
VkSpecializationInfo* pSpecializationInfo
VkPipelineShaderStageCreateInfo* pStages
指定了着色器在管线的哪一阶段被使用
指定阶段使用的着色器模块对象,是vkCreateShaderModule的结果
指定阶段调用的着色器函数,可以通过使用不同的pName在同一份着色器代码中实现所有需要的着色器,比如在同一份代码中实现多个片段着色器,然后通过不同的pName调用它们。
指定着色器用到的常量,可以对同一个着色器模块对象指定不同的着色器常量用于管线创建,这使得编译器可以根据指定的着色器常量来消除一些条件分支
VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
vertexBindingDescriptionCount
binding
stride
VK_VERTEX_INPUT_RATE_VERTEX
VK_VERTEX_INPUT_RATE_INSTANCE
VkVertexInputRate inputRate
VkVertexInputBindingDescription* pVertexBindingDescriptions
vertexAttributeDescriptionCount
location
format
offset
VkVertexInputAttributeDescription* pVertexAttributeDescriptions
VkPipelineVertexInputStateCreateInfo* pVertexInputState
VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
VK_PRIMITIVE_TOPOLOGY_POINT_LIST
VK_PRIMITIVE_TOPOLOGY_LINE_LIST
VK_PRIMITIVE_TOPOLOGY_LINE_STRIP
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN
VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY
VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY
VK_PRIMITIVE_TOPOLOGY_PATCH_LIST
VkPrimitiveTopology topology
bool primitiveRestartEnable
VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState
VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO
patchControlPoints
VkPipelineTessellationStateCreateInfo* pTessellationState
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
VkPipelineViewportStateCreateFlags flags
viewportCount
float x
float y
float width
float height
float minDepth
float maxDepth
VkViewport* pViewports
scissorCount
int32_t x
int32_t y
VkOffset2D offset
uint32_t width
uint32_t height
VkExtent2D extent
VkRect2D* pScissors
VkPipelineViewportStateCreateInfo* pViewportState
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO
bool depthClampEnable
bool rasterizerDiscardEnable
VK_POLYGON_MODE_FILL
VK_POLYGON_MODE_LINE
VK_POLYGON_MODE_POINT
VkPolygonMode polygonMode
VK_CULL_MODE_NONE
VK_CULL_MODE_FRONT_BIT
VK_CULL_MODE_BACK_BIT
VK_CULL_MODE_FRONT_AND_BACK
VkCullModeFlags cullMode
VK_FRONT_FACE_COUNTER_CLOCKWISE
VK_FRONT_FACE_CLOCKWISE
VkFrontFace frontFace
bool depthBiasEnable
float depthBiasConstantFactor
float depthBiasClamp
float depthBiasSlopeFactor
float lineWidth
VkPipelineRasterizationStateCreateInfo* pRasterizationState
VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
VK_SAMPLE_COUNT_1_BIT
VK_SAMPLE_COUNT_2_BIT
VK_SAMPLE_COUNT_4_BIT
VK_SAMPLE_COUNT_8_BIT
VK_SAMPLE_COUNT_16_BIT
VK_SAMPLE_COUNT_32_BIT
VK_SAMPLE_COUNT_64_BIT
VkSampleCountFlagBits rasterizationSamples
bool sampleShadingEnable
float minSampleShading
VkSampleMask* pSampleMask
bool alphaToCoverageEnable
bool alphaToOneEnable
VkPipelineMultisampleStateCreateInfo* pMultisampleState
VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
bool depthTestEnable
bool depthWriteEnable
VK_COMPARE_OP_NEVER
VK_COMPARE_OP_LESS
VK_COMPARE_OP_EQUAL
VK_COMPARE_OP_LESS_OR_EQUAL
VK_COMPARE_OP_GREATER
VK_COMPARE_OP_NOT_EQUAL
VK_COMPARE_OP_GREATER_OR_EQUAL
VK_COMPARE_OP_ALWAYS
VkCompareOp depthCompareOp
bool depthBoundsTestEnable
bool stencilTestEnable
VK_STENCIL_OP_KEEP
VK_STENCIL_OP_ZERO
VK_STENCIL_OP_REPLACE
VK_STENCIL_OP_INCREMENT_AND_CLAMP
VK_STENCIL_OP_DECREMENT_AND_CLAMP
VK_STENCIL_OP_INVERT
VK_STENCIL_OP_INCREMENT_AND_WRAP
VK_STENCIL_OP_DECREMENT_AND_WRAP
VkStencilOp failOp
VkStencilOp passOp
VkStencilOp depthFailOp
VkCompareOp compareOp
compareMask
writeMask
reference
VkStencilOpState front
VkStencilOpState back
float minDepthBounds
float maxDepthBounds
VkPipelineDepthStencilStateCreateInfo* pDepthStencilState
VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
bool logicOpEnable
VK_LOGIC_OP_CLEAR
VK_LOGIC_OP_AND
VK_LOGIC_OP_AND_REVERSE
VK_LOGIC_OP_COPY
VK_LOGIC_OP_AND_INVERTED
VK_LOGIC_OP_NO_OP
VK_LOGIC_OP_XOR
VK_LOGIC_OP_OR
VK_LOGIC_OP_NOR
VK_LOGIC_OP_EQUIVALENT
VK_LOGIC_OP_INVERT
VK_LOGIC_OP_OR_REVERSE
VK_LOGIC_OP_COPY_INVERTED
VK_LOGIC_OP_OR_INVERTED
VK_LOGIC_OP_NAND
VK_LOGIC_OP_SET
VkLogicOp logicOp
attachmentCount
bool blendEnable
VK_BLEND_FACTOR_ZERO
VK_BLEND_FACTOR_ONE
VK_BLEND_FACTOR_SRC_COLOR
VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR
VK_BLEND_FACTOR_DST_COLOR
VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR
VK_BLEND_FACTOR_SRC_ALPHA
VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA
VK_BLEND_FACTOR_DST_ALPHA
VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA
VK_BLEND_FACTOR_CONSTANT_COLOR
VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR
VK_BLEND_FACTOR_CONSTANT_ALPHA
VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA
VK_BLEND_FACTOR_SRC_ALPHA_SATURATE
VK_BLEND_FACTOR_SRC1_COLOR
VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR
VK_BLEND_FACTOR_SRC1_ALPHA
VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA
VkBlendFactor srcColorBlendFactor
VkBlendFactor dstColorBlendFactor
VK_BLEND_OP_ADD
VK_BLEND_OP_SUBTRACT
VK_BLEND_OP_REVERSE_SUBTRACT
VK_BLEND_OP_MIN
VK_BLEND_OP_MAX
.......
VK_BLEND_OP_BLUE_EXT
VkBlendOp colorBlendOp
VkBlendFactor srcAlphaBlendFactor
VkBlendFactor dstAlphaBlendFactor
VkBlendOp alphaBlendOp
VK_COLOR_COMPONENT_R_BIT
VK_COLOR_COMPONENT_G_BIT
VK_COLOR_COMPONENT_B_BIT
VK_COLOR_COMPONENT_A_BIT
VkColorComponentFlags colorWriteMask
VkPipelineColorBlendAttachmentState* pAttachments
float blendConstants[4]
VkPipelineColorBlendStateCreateInfo* pColorBlendState
VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
dynamicStateCount
VK_DYNAMIC_STATE_VIEWPORT
VK_DYNAMIC_STATE_SCISSOR
VK_DYNAMIC_STATE_LINE_WIDTH
......
VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT
pDynamicStates
VkPipelineDynamicStateCreateInfo* pDynamicState
vkCreatePipelineLayout的结果
layout
vkCreateRenderPass2KHR/vkCreateRenderPass 的结果
renderPass
subpass
basePipelineHandle
basePipelineIndex
VkGraphicsPipelineCreateInfo
0 条评论
回复 删除
下一页