maxwell_3d: Use correct const buffer size and check bounds.

- Fixes mem corruption with Super Mario Odyssey and Pokkén Tournament DX.
This commit is contained in:
bunnei
2018-08-08 02:07:44 -04:00
parent 4fa3511a63
commit 57982df105
4 changed files with 12 additions and 3 deletions

View File

@ -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();