Program Listing for File shader-table-info.h
↰ Return to documentation for file (include\playback\resource-info\resource-info-ex\shader-table-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/resource-info-ex.h"
#include <tuple>
namespace gpa {
namespace playback {
class ShaderTableInfo
: public ResourceInfo::Ex
{
public:
BufferInfo const* pBufferInfo{nullptr};
ViewInfo const* pViewInfo{nullptr};
uint64_t offset{0};
uint64_t size{0};
uint64_t stride{0};
};
class RaygenShaderTableInfo
: public ShaderTableInfo
{
public:
TypeId GetTypeId() const override final;
};
class MissShaderTableInfo
: public ShaderTableInfo
{
public:
TypeId GetTypeId() const override final;
};
class HitShaderTableInfo
: public ShaderTableInfo
{
public:
TypeId GetTypeId() const override final;
};
class CallableShaderTableInfo
: public ShaderTableInfo
{
public:
TypeId GetTypeId() const override final;
};
inline auto MakeShaderTableInfoTuple(const ShaderTableInfo& shaderTableInfo)
{
return std::make_tuple(shaderTableInfo.pBufferInfo, shaderTableInfo.pViewInfo, shaderTableInfo.offset, shaderTableInfo.size, shaderTableInfo.stride);
}
namespace detail {
template<>
inline auto MakeTuple<RaygenShaderTableInfo>(const RaygenShaderTableInfo& shaderTableInfo)
{
return MakeShaderTableInfoTuple(shaderTableInfo);
}
template<>
inline auto MakeTuple<MissShaderTableInfo>(const MissShaderTableInfo& shaderTableInfo)
{
return MakeShaderTableInfoTuple(shaderTableInfo);
}
template<>
inline auto MakeTuple<CallableShaderTableInfo>(const CallableShaderTableInfo& shaderTableInfo)
{
return MakeShaderTableInfoTuple(shaderTableInfo);
}
template<>
inline auto MakeTuple<HitShaderTableInfo>(const HitShaderTableInfo& shaderTableInfo)
{
return MakeShaderTableInfoTuple(shaderTableInfo);
}
} // namespace detail
} // namespace playback
} // namespace gpa