Add copy operator for VkGraphicsPipelineCreateInfo helper

This commit is contained in:
baldurk
2020-05-08 14:23:06 +01:00
parent 36bae2b792
commit 3effd6b7fe
2 changed files with 45 additions and 0 deletions
+43
View File
@@ -199,6 +199,49 @@ GraphicsPipelineCreateInfo::GraphicsPipelineCreateInfo()
});
}
const GraphicsPipelineCreateInfo &GraphicsPipelineCreateInfo::operator=(
const GraphicsPipelineCreateInfo &other)
{
sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;
pNext = other.pNext;
flags = other.flags;
layout = other.layout;
renderPass = other.renderPass;
subpass = other.subpass;
basePipelineHandle = other.basePipelineHandle;
basePipelineIndex = other.basePipelineIndex;
stages = other.stages;
inputAssemblyState = other.inputAssemblyState;
tessellationState = other.tessellationState;
rasterizationState = other.rasterizationState;
multisampleState = other.multisampleState;
depthStencilState = other.depthStencilState;
vertexInputState = other.vertexInputState;
inputAssemblyState = other.inputAssemblyState;
tessellationState = other.tessellationState;
viewportState = other.viewportState;
rasterizationState = other.rasterizationState;
multisampleState = other.multisampleState;
depthStencilState = other.depthStencilState;
colorBlendState = other.colorBlendState;
dynamicState = other.dynamicState;
pVertexInputState = &vertexInputState;
pInputAssemblyState = &inputAssemblyState;
pTessellationState = &tessellationState;
pViewportState = &viewportState;
pRasterizationState = &rasterizationState;
pMultisampleState = &multisampleState;
pDepthStencilState = &depthStencilState;
pColorBlendState = &colorBlendState;
pDynamicState = &dynamicState;
return *this;
}
void GraphicsPipelineCreateInfo::bake()
{
stageCount = (uint32_t)stages.size();
+2
View File
@@ -1145,6 +1145,8 @@ struct ComputePipelineCreateInfo : public VkComputePipelineCreateInfo
struct GraphicsPipelineCreateInfo : private VkGraphicsPipelineCreateInfo
{
GraphicsPipelineCreateInfo();
const GraphicsPipelineCreateInfo(const GraphicsPipelineCreateInfo &other) { *this = other; }
const GraphicsPipelineCreateInfo &operator=(const GraphicsPipelineCreateInfo &other);
using VkGraphicsPipelineCreateInfo::pNext;
using VkGraphicsPipelineCreateInfo::flags;