Program Listing for File render-target-info.h

Return to documentation for file (include\playback\resource-info\resource-info-ex\render-target-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"

namespace gpa {
namespace playback {

class TextureInfo;

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

    ResourceInfo const* pResourceInfo{nullptr};
    ViewInfo const* pViewInfo{nullptr};
    api_types::Format format{api_types::GPA_FORMAT_UNKNOWN};

    struct BufferInfo
    {
        uint64_t offset{0};
        uint32_t count{0};
    } buffer;

    struct TextureInfo
    {
        api_types::TextureType type{api_types::GPA_TEXTURE_TYPE_UNKNOWN};
        api_types::TextureSubresource subresource{};
    } texture;

    // [deprecated]
    TextureInfo const* pTextureInfo{nullptr};
    api_types::TextureType type{api_types::GPA_TEXTURE_TYPE_UNKNOWN};
    api_types::TextureSubresource subresource{};
};

namespace detail {

template<>
inline auto MakeTuple<RenderTargetInfo>(const RenderTargetInfo& renderTargetInfo)
{
    return std::make_tuple(
        renderTargetInfo.pResourceInfo,
        renderTargetInfo.pViewInfo,
        renderTargetInfo.format,
        renderTargetInfo.buffer.offset,
        renderTargetInfo.buffer.count,
        renderTargetInfo.texture.type,
        renderTargetInfo.texture.subresource,
        // [deprecated]
        renderTargetInfo.pTextureInfo,
        renderTargetInfo.type,
        renderTargetInfo.subresource
    );
}

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