2016-01-08 03:40:35 +00:00
|
|
|
// Copyright 2015 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <array>
|
|
|
|
#include <d3d12.h>
|
|
|
|
|
|
|
|
#include "VideoCommon/NativeVertexFormat.h"
|
|
|
|
|
|
|
|
namespace DX12
|
|
|
|
{
|
|
|
|
class D3DVertexFormat final : public NativeVertexFormat
|
|
|
|
{
|
|
|
|
public:
|
2016-06-24 08:43:46 +00:00
|
|
|
D3DVertexFormat(const PortableVertexDeclaration& vtx_decl);
|
|
|
|
~D3DVertexFormat();
|
2016-01-08 03:40:35 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
void SetupVertexPointers() override;
|
2016-01-08 03:40:35 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
D3D12_INPUT_LAYOUT_DESC GetActiveInputLayout12() const;
|
2016-01-08 03:40:35 +00:00
|
|
|
|
|
|
|
private:
|
2016-06-24 08:43:46 +00:00
|
|
|
void AddInputElementDescFromAttributeFormatIfValid(const AttributeFormat* format,
|
|
|
|
const char* semantic_name,
|
|
|
|
unsigned int semantic_index);
|
2016-02-16 04:11:43 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
std::array<D3D12_INPUT_ELEMENT_DESC, 15> m_elems{};
|
|
|
|
UINT m_num_elems = 0;
|
2016-02-16 04:11:43 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
D3D12_INPUT_LAYOUT_DESC m_layout12{};
|
2016-01-08 03:40:35 +00:00
|
|
|
};
|
|
|
|
}
|