Debian Codegraph @

Source/Core/VideoBackends/D3D12/DX12VertexFormat.h

raw symbols SCIP
1 // Copyright 2019 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <array>
7 #include <d3d12.h>
8
9 #include "Common/CommonTypes.h"
10 #include "VideoCommon/NativeVertexFormat.h"
11
12 enum class ShaderAttrib : u32;
13
14 namespace DX12
15 {
16 class DXVertexFormat : public NativeVertexFormat
17 {
18 public:
19 static const u32 MAX_VERTEX_ATTRIBUTES = 16;
20
21 DXVertexFormat(const PortableVertexDeclaration& vtx_decl);
22
23 // Passed to pipeline state creation
24 void GetInputLayoutDesc(D3D12_INPUT_LAYOUT_DESC* desc) const;
25
26 private:
27 void AddAttribute(const char* semantic_name, ShaderAttrib semantic_index, u32 slot,
28 DXGI_FORMAT format, u32 offset);
29 void MapAttributes();
30
31 std::array<D3D12_INPUT_ELEMENT_DESC, MAX_VERTEX_ATTRIBUTES> m_attribute_descriptions = {};
32 u32 m_num_attributes = 0;
33 };
34 } // namespace DX12