diff --git a/util/test/demos/vk/vk_helpers.cpp b/util/test/demos/vk/vk_helpers.cpp index 286ed78d8..c372a5e6c 100644 --- a/util/test/demos/vk/vk_helpers.cpp +++ b/util/test/demos/vk/vk_helpers.cpp @@ -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(); diff --git a/util/test/demos/vk/vk_helpers.h b/util/test/demos/vk/vk_helpers.h index db2075216..9ee036eed 100644 --- a/util/test/demos/vk/vk_helpers.h +++ b/util/test/demos/vk/vk_helpers.h @@ -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;