Program Listing for File vertex-buffer-info.h
↰ Return to documentation for file (include\playback\resource-info\resource-info-ex\vertex-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/detail/span.h"
#include "playback/resource-info/resource-info-ex.h"
#include <vector>
namespace gpa {
namespace playback {
class BufferInfo;
class VertexBufferInfo final
: public ResourceInfo::Ex
{
public:
TypeId GetTypeId() const override final;
BufferInfo const* pBufferInfo{nullptr};
ViewInfo const* pViewInfo{nullptr};
uint64_t offset{0};
uint64_t size{0};
uint32_t binding{0};
uint32_t stride{0};
api_types::VertexInputRate inputRate{api_types::GPA_VERTEX_INPUT_RATE_UNKNOWN};
size_t inputElementCount{0};
api_types::VertexInputElement const* pInputElements{nullptr};
// [deprecated]
api_types::VertexInputBinding inputBinding{};
size_t inputAttributeCount{0};
api_types::VertexInputAttribute const* pInputAttributes{nullptr};
protected:
void OnRegister() override final;
private:
class Storage final
{
public:
std::vector<api_types::VertexInputElement> inputElements;
} mStorage;
};
namespace detail {
template<>
inline auto MakeTuple<VertexBufferInfo>(const VertexBufferInfo& vertexBufferInfo)
{
return std::make_tuple(
vertexBufferInfo.pBufferInfo,
vertexBufferInfo.pViewInfo,
vertexBufferInfo.offset,
vertexBufferInfo.size,
vertexBufferInfo.binding,
vertexBufferInfo.stride,
vertexBufferInfo.inputRate,
MakeSpan(vertexBufferInfo.pInputElements, vertexBufferInfo.inputElementCount),
// [deprecated]
vertexBufferInfo.inputBinding,
MakeSpan(vertexBufferInfo.pInputAttributes, vertexBufferInfo.inputAttributeCount)
);
}
} // namespace detail
} // namespace playback
} // namespace gpa