summaryrefslogtreecommitdiff
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorGravatar bunnei2018-11-11 08:17:57 -0800
committerGravatar GitHub2018-11-11 08:17:57 -0800
commit8ea62615475f97ce76e047d2e48e817635071bad (patch)
tree92a561e431acb2e1f6d1d4434ddb55acde4e5181 /src/video_core/engines
parentMerge pull request #1656 from ogniK5377/message-queue (diff)
parentgl_rasterizer: Skip VAO binding if the state is clean. (diff)
downloadyuzu-8ea62615475f97ce76e047d2e48e817635071bad.tar.gz
yuzu-8ea62615475f97ce76e047d2e48e817635071bad.tar.xz
yuzu-8ea62615475f97ce76e047d2e48e817635071bad.zip
Merge pull request #1654 from degasus/dirty_flags
gl_rasterizer: Skip VAO binding if the state is clean.
Diffstat (limited to 'src/video_core/engines')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp8
-rw-r--r--src/video_core/engines/maxwell_3d.h6
2 files changed, 14 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 2cd595f26..5ae836aca 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -108,8 +108,16 @@ void Maxwell3D::WriteReg(u32 method, u32 value, u32 remaining_params) {
108 debug_context->OnEvent(Tegra::DebugContext::Event::MaxwellCommandLoaded, nullptr); 108 debug_context->OnEvent(Tegra::DebugContext::Event::MaxwellCommandLoaded, nullptr);
109 } 109 }
110 110
111 u32 old = regs.reg_array[method];
111 regs.reg_array[method] = value; 112 regs.reg_array[method] = value;
112 113
114 if (value != old) {
115 if (method >= MAXWELL3D_REG_INDEX(vertex_attrib_format) &&
116 method < MAXWELL3D_REG_INDEX(vertex_attrib_format) + regs.vertex_attrib_format.size()) {
117 dirty_flags.vertex_attrib_format = true;
118 }
119 }
120
113 switch (method) { 121 switch (method) {
114 case MAXWELL3D_REG_INDEX(macros.data): { 122 case MAXWELL3D_REG_INDEX(macros.data): {
115 ProcessMacroUpload(value); 123 ProcessMacroUpload(value);
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h
index 0509ba3a2..557795d0f 100644
--- a/src/video_core/engines/maxwell_3d.h
+++ b/src/video_core/engines/maxwell_3d.h
@@ -1004,6 +1004,12 @@ public:
1004 State state{}; 1004 State state{};
1005 MemoryManager& memory_manager; 1005 MemoryManager& memory_manager;
1006 1006
1007 struct DirtyFlags {
1008 bool vertex_attrib_format = true;
1009 };
1010
1011 DirtyFlags dirty_flags;
1012
1007 /// Reads a register value located at the input method address 1013 /// Reads a register value located at the input method address
1008 u32 GetRegisterValue(u32 method) const; 1014 u32 GetRegisterValue(u32 method) const;
1009 1015