Merge pull request #981 from bunnei/cbuf-corrupt
maxwell_3d: Use correct const buffer size and check bounds.
This commit is contained in:
commit
9ceceb212f
4 changed files with 12 additions and 3 deletions
|
@ -659,7 +659,10 @@ u32 RasterizerOpenGL::SetupConstBuffers(Maxwell::ShaderStage stage, GLuint progr
|
|||
auto& buffer_draw_state =
|
||||
state.draw.const_buffers[static_cast<size_t>(stage)][used_buffer.GetIndex()];
|
||||
|
||||
ASSERT_MSG(buffer.enabled, "Attempted to upload disabled constbuffer");
|
||||
if (!buffer.enabled) {
|
||||
continue;
|
||||
}
|
||||
|
||||
buffer_draw_state.enabled = true;
|
||||
buffer_draw_state.bindpoint = current_bindpoint + bindpoint;
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue