diff options
| author | bunnei <bunneidev@gmail.com> | 2018-11-11 08:17:57 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-11 08:17:57 -0800 |
| commit | 8ea62615475f97ce76e047d2e48e817635071bad (patch) | |
| tree | 92a561e431acb2e1f6d1d4434ddb55acde4e5181 /src/video_core/engines/maxwell_3d.cpp | |
| parent | 93fca5d9cfa39a84d3a1f8608693abb95c2144d5 (diff) | |
| parent | 359db6a673b1fa13c80e6b8bf54d5c29bc3b25db (diff) | |
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/maxwell_3d.cpp')
| -rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 8 |
1 files changed, 8 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) { debug_context->OnEvent(Tegra::DebugContext::Event::MaxwellCommandLoaded, nullptr); } + u32 old = regs.reg_array[method]; regs.reg_array[method] = value; + if (value != old) { + if (method >= MAXWELL3D_REG_INDEX(vertex_attrib_format) && + method < MAXWELL3D_REG_INDEX(vertex_attrib_format) + regs.vertex_attrib_format.size()) { + dirty_flags.vertex_attrib_format = true; + } + } + switch (method) { case MAXWELL3D_REG_INDEX(macros.data): { ProcessMacroUpload(value); |
