Program Listing for File indirect-buffer-info.h

Return to documentation for file (include\playback\resource-info\resource-info-ex\indirect-buffer-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 BufferInfo;

class IndirectBufferInfo final
    : public ResourceInfo::Ex
{
public:
    enum class Type {
        kUnknown,
        kDraw,
        kDispatch,
        kDispatchRays,
        kDispatchMesh
    };

    TypeId GetTypeId() const override final;

    Type type{Type::kUnknown};
    BufferInfo const* pArgumentBuffer{nullptr};
    uint64_t argumentBufferOffset{0};
    BufferInfo const* pCountBuffer{nullptr};
    uint64_t countBufferOffset{0};
    uint32_t count{0};
    uint32_t stride{0};
};

bool operator==(IndirectBufferInfo const& lhs, IndirectBufferInfo const& rhs);

bool operator!=(IndirectBufferInfo const& lhs, IndirectBufferInfo const& rhs);

bool operator<(IndirectBufferInfo const& lhs, IndirectBufferInfo const& rhs);

namespace detail {

template<>
inline auto MakeTuple<IndirectBufferInfo>(const IndirectBufferInfo& indirectBufferInfo)
{
    return std::make_tuple(
        indirectBufferInfo.type,
        indirectBufferInfo.pArgumentBuffer,
        indirectBufferInfo.argumentBufferOffset,
        indirectBufferInfo.pCountBuffer,
        indirectBufferInfo.countBufferOffset,
        indirectBufferInfo.count,
        indirectBufferInfo.stride);
}

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