diff options
| author | bunnei <bunneidev@gmail.com> | 2018-08-08 02:07:44 -0400 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2018-08-08 02:10:25 -0400 |
| commit | 57982df105a6d149cc82292541184e6ceabc288c (patch) | |
| tree | cafcaec08c7f7f7308f0856a03f1c8310a0a6740 /src/video_core/renderer_opengl/gl_state.h | |
| parent | 4fa3511a63519b338ab6d49e5a2ef751b2e1d09a (diff) | |
maxwell_3d: Use correct const buffer size and check bounds.
- Fixes mem corruption with Super Mario Odyssey and Pokkén Tournament DX.
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.h')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index 24b1d956b..5c7b636e4 100644 --- a/src/video_core/renderer_opengl/gl_state.h +++ b/src/video_core/renderer_opengl/gl_state.h @@ -7,6 +7,10 @@ #include <array> #include <glad/glad.h> +#include "video_core/engines/maxwell_3d.h" + +using Regs = Tegra::Engines::Maxwell3D::Regs; + namespace TextureUnits { struct TextureUnit { @@ -120,7 +124,7 @@ public: GLuint bindpoint; GLuint ssbo; }; - std::array<std::array<ConstBufferConfig, 16>, 5> const_buffers{}; + std::array<std::array<ConstBufferConfig, Regs::MaxConstBuffers>, 5> const_buffers; } draw; struct { |
