GraphicsPipelineVk.h#

The PVRVk GraphicsPipeline. This is an interface for a Vulkan VkPipeline that was built for the VK_BINDING_POINT_GRAPHICS, separating it from the corresponding Compute pipeline.

Includes#

  • PVRVk/DeviceVk.h

  • PVRVk/PipelineConfigVk.h

  • PVRVk/PipelineVk.h

Included By#

Namespaces#

Classes#

Source Code#

#pragma once
#include "PVRVk/PipelineVk.h"
#include "PVRVk/PipelineConfigVk.h"
#include "PVRVk/DeviceVk.h"
namespace pvrvk {
struct GraphicsPipelineCreateInfo : public PipelineCreateInfo<GraphicsPipeline>
{
public:
    PipelineDepthStencilStateCreateInfo depthStencil;
    PipelineColorBlendStateCreateInfo colorBlend;
    PipelineViewportStateCreateInfo viewport;
    PipelineRasterizationStateCreateInfo rasterizer;
    PipelineVertexInputStateCreateInfo vertexInput;
    PipelineInputAssemblerStateCreateInfo inputAssembler;
    PipelineShaderStageCreateInfo vertexShader;
    PipelineShaderStageCreateInfo fragmentShader;
    PipelineShaderStageCreateInfo geometryShader;
    TesselationStageCreateInfo tesselationStates;
    PipelineMultisampleStateCreateInfo multiSample;
    DynamicStatesCreateInfo dynamicStates;
    FragmentShadingRateStateCreateInfo fragmentShadingRate;
    RenderPass renderPass;
    uint32_t subpass;
    void* pNext;
    bool isSafetyCritical;

    GraphicsPipelineCreateInfo() : PipelineCreateInfo(), subpass(0), pNext(nullptr), isSafetyCritical(false) {}
};
namespace impl {

class GraphicsPipeline_ : public Pipeline<GraphicsPipeline, GraphicsPipelineCreateInfo>
{
private:
    friend class Device_;

    class make_shared_enabler
    {
    protected:
        make_shared_enabler() {}
        friend class GraphicsPipeline_;
    };

    static GraphicsPipeline constructShared(const DeviceWeakPtr& device, VkPipeline vkPipeline, const GraphicsPipelineCreateInfo& desc)
    {
        return std::make_shared<GraphicsPipeline_>(make_shared_enabler{}, device, vkPipeline, desc);
    }

public:
    DECLARE_NO_COPY_SEMANTICS(GraphicsPipeline_)
    GraphicsPipeline_(make_shared_enabler, const DeviceWeakPtr& device, VkPipeline vkPipeline, const GraphicsPipelineCreateInfo& desc) : Pipeline(device, vkPipeline, desc) {}
};
} // namespace impl
} // namespace pvrvk