aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/engines/maxwell_3d.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-08-08 19:16:34 -0400
committerGitHub <noreply@github.com>2018-08-08 19:16:34 -0400
commit9ceceb212f1381cdae4f1df769e44216cd70dedb (patch)
tree2f9a3c36756c4b15f099870f350bd961cd8ae639 /src/video_core/engines/maxwell_3d.cpp
parent9f48454ea972bd5df8ea44e9a87b9e5e7b33fad3 (diff)
parent57982df105a6d149cc82292541184e6ceabc288c (diff)
Merge pull request #981 from bunnei/cbuf-corrupt
maxwell_3d: Use correct const buffer size and check bounds.
Diffstat (limited to 'src/video_core/engines/maxwell_3d.cpp')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 5c0ae8009..ed22a2090 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -238,6 +238,8 @@ void Maxwell3D::ProcessCBBind(Regs::ShaderStage stage) {
auto& buffer = shader.const_buffers[bind_data.index];
+ ASSERT(bind_data.index < Regs::MaxConstBuffers);
+
buffer.enabled = bind_data.valid.Value() != 0;
buffer.index = bind_data.index;
buffer.address = regs.const_buffer.BufferAddress();