Debian Codegraph @

Source/Core/VideoBackends/Vulkan/VKVertexFormat.h

raw symbols SCIP
1 // Copyright 2016 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <array>
7
8 #include "VideoBackends/Vulkan/Constants.h"
9 #include "VideoCommon/NativeVertexFormat.h"
10
11 enum class ShaderAttrib : u32;
12
13 namespace Vulkan
14 {
15 class VertexFormat : public ::NativeVertexFormat
16 {
17 public:
18 VertexFormat(const PortableVertexDeclaration& vtx_decl);
19
20 // Passed to pipeline state creation
21 const VkPipelineVertexInputStateCreateInfo& GetVertexInputStateInfo() const;
22
23 // Converting PortableVertexDeclaration -> Vulkan types
24 void MapAttributes();
25 void SetupInputState();
26
27 private:
28 void AddAttribute(ShaderAttrib location, uint32_t binding, VkFormat format, uint32_t offset);
29
30 VkVertexInputBindingDescription m_binding_description = {};
31
32 std::array<VkVertexInputAttributeDescription, MAX_VERTEX_ATTRIBUTES> m_attribute_descriptions =
33 {};
34
35 VkPipelineVertexInputStateCreateInfo m_input_state_info = {};
36
37 uint32_t m_num_attributes = 0;
38 };
39 } // namespace Vulkan