diff options
author | bunnei <bunneidev@gmail.com> | 2018-06-27 05:07:34 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-06-27 05:07:34 +0200 |
commit | 10422f3c18322345f5fe0d6154f935ab9416bee9 (patch) | |
tree | 0cb7a0cc54d7042565ccc08386962060ce7f5aca /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | Merge pull request #593 from bunnei/fix-swizzle (diff) | |
download | yuzu-10422f3c18322345f5fe0d6154f935ab9416bee9.tar yuzu-10422f3c18322345f5fe0d6154f935ab9416bee9.tar.gz yuzu-10422f3c18322345f5fe0d6154f935ab9416bee9.tar.bz2 yuzu-10422f3c18322345f5fe0d6154f935ab9416bee9.tar.lz yuzu-10422f3c18322345f5fe0d6154f935ab9416bee9.tar.xz yuzu-10422f3c18322345f5fe0d6154f935ab9416bee9.tar.zst yuzu-10422f3c18322345f5fe0d6154f935ab9416bee9.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index aadf7e233..3fbf8e1f9 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -613,6 +613,12 @@ u32 RasterizerOpenGL::SetupConstBuffers(Maxwell::ShaderStage stage, GLuint progr if (used_buffer.IsIndirect()) { // Buffer is accessed indirectly, so upload the entire thing size = buffer.size * sizeof(float); + + if (size > MaxConstbufferSize) { + NGLOG_ERROR(HW_GPU, "indirect constbuffer size {} exceeds maximum {}", size, + MaxConstbufferSize); + size = MaxConstbufferSize; + } } else { // Buffer is accessed directly, upload just what we use size = used_buffer.GetSize() * sizeof(float); |