summaryrefslogtreecommitdiff
path: root/src/video_core/vertex_loader.h
diff options
context:
space:
mode:
authorGravatar bunnei2016-05-23 21:13:34 -0400
committerGravatar bunnei2016-05-23 21:13:34 -0400
commita316fbb15aedbc23b58474aaca95569788933774 (patch)
tree19ead61153a7aaaed3e03a0a7244a6b1cc9bcbd7 /src/video_core/vertex_loader.h
parentMerge pull request #1837 from wwylele/sync-trap (diff)
parentvertex_loader: Correct forward declaration of InputVertex (diff)
downloadyuzu-a316fbb15aedbc23b58474aaca95569788933774.tar.gz
yuzu-a316fbb15aedbc23b58474aaca95569788933774.tar.xz
yuzu-a316fbb15aedbc23b58474aaca95569788933774.zip
Merge pull request #1733 from lioncash/vert_loader
VertexLoader: Minor changes
Diffstat (limited to 'src/video_core/vertex_loader.h')
-rw-r--r--src/video_core/vertex_loader.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/video_core/vertex_loader.h b/src/video_core/vertex_loader.h
index becf5a403..ac162c254 100644
--- a/src/video_core/vertex_loader.h
+++ b/src/video_core/vertex_loader.h
@@ -1,7 +1,8 @@
1#pragma once 1#pragma once
2 2
3#include "common/common_types.h" 3#include <array>
4 4
5#include "common/common_types.h"
5#include "video_core/pica.h" 6#include "video_core/pica.h"
6 7
7namespace Pica { 8namespace Pica {
@@ -11,23 +12,29 @@ class MemoryAccessTracker;
11} 12}
12 13
13namespace Shader { 14namespace Shader {
14class InputVertex; 15struct InputVertex;
15} 16}
16 17
17class VertexLoader { 18class VertexLoader {
18public: 19public:
20 VertexLoader() = default;
21 explicit VertexLoader(const Pica::Regs& regs) {
22 Setup(regs);
23 }
24
19 void Setup(const Pica::Regs& regs); 25 void Setup(const Pica::Regs& regs);
20 void LoadVertex(u32 base_address, int index, int vertex, Shader::InputVertex& input, DebugUtils::MemoryAccessTracker& memory_accesses); 26 void LoadVertex(u32 base_address, int index, int vertex, Shader::InputVertex& input, DebugUtils::MemoryAccessTracker& memory_accesses);
21 27
22 int GetNumTotalAttributes() const { return num_total_attributes; } 28 int GetNumTotalAttributes() const { return num_total_attributes; }
23 29
24private: 30private:
25 u32 vertex_attribute_sources[16]; 31 std::array<u32, 16> vertex_attribute_sources;
26 u32 vertex_attribute_strides[16] = {}; 32 std::array<u32, 16> vertex_attribute_strides{};
27 Regs::VertexAttributeFormat vertex_attribute_formats[16] = {}; 33 std::array<Regs::VertexAttributeFormat, 16> vertex_attribute_formats;
28 u32 vertex_attribute_elements[16] = {}; 34 std::array<u32, 16> vertex_attribute_elements{};
29 bool vertex_attribute_is_default[16]; 35 std::array<bool, 16> vertex_attribute_is_default;
30 int num_total_attributes; 36 int num_total_attributes = 0;
37 bool is_setup = false;
31}; 38};
32 39
33} // namespace Pica 40} // namespace Pica