Program Listing for File pipeline-info.h

Return to documentation for file (include\playback\resource-info\pipeline-info.h)

/******************************************************************************

© Intel Corporation.

This software and the related documents are Intel copyrighted materials,
and your use of them is governed by the express license under which they
were provided to you ("License"). Unless the License provides otherwise,
you may not use, modify, copy, publish, distribute, disclose or transmit
this software or the related documents without Intel's prior written
permission.

 This software and the related documents are provided as is, with no express
or implied warranties, other than those that are expressly stated in the
License.

******************************************************************************/

#pragma once

#include "playback/resource-info/detail/span.h"
#include "playback/resource-info/detail/utilities.h"
#include "playback/resource-info/resource-info.h"

#include <vector>

namespace gpa {
namespace playback {

class ShaderInfo;
class PipelineSignatureInfo;

class PipelineInfo final
    : public ResourceInfo
{
public:
    TypeId GetTypeId() const override final;

    api_types::BindPoint bindPoint{api_types::GPA_BIND_POINT_UNKNOWN};
    PipelineSignatureInfo const* pPipelineSignatureInfo{nullptr};
    size_t shaderInfoCount{0};
    ShaderInfo const* const* ppShaderInfos{nullptr};
    size_t shaderGroupInfoCount{0};
    RaytracingShaderGroupInfo const* const* ppShaderGroupInfos{nullptr};

private:
    void OnRegister() override final;

    class Storage final
    {
    public:
        std::vector<ShaderInfo const*> shaderInfos;
        std::vector<RaytracingShaderGroupInfo const*> shaderGroupInfos;
    } mStorage;
};

namespace detail {

template<>
inline auto MakeTuple<PipelineInfo>(const PipelineInfo& pipelineInfo)
{
    return std::make_tuple(
        pipelineInfo.bindPoint,
        MakeSpan(pipelineInfo.ppShaderInfos, pipelineInfo.shaderInfoCount),
        pipelineInfo.pPipelineSignatureInfo);
}

}  // namespace detail
}  // namespace playback
}  // namespace gpa