diff options
| author | 2019-03-04 13:51:59 -0500 | |
|---|---|---|
| committer | 2019-03-04 13:51:59 -0500 | |
| commit | 07e13d6728868e5cb91615bec3aa6dfe9ec62b7b (patch) | |
| tree | a3a8cd6d9b85a120b5356d8abea79c5c0d754d25 | |
| parent | Merge pull request #2188 from lioncash/log-static (diff) | |
| parent | gl_rasterizer: Remove texture unbinding after dispatching a draw call (diff) | |
| download | yuzu-07e13d6728868e5cb91615bec3aa6dfe9ec62b7b.tar.gz yuzu-07e13d6728868e5cb91615bec3aa6dfe9ec62b7b.tar.xz yuzu-07e13d6728868e5cb91615bec3aa6dfe9ec62b7b.zip | |
Merge pull request #2165 from ReinUsesLisp/unbind-tex
gl_rasterizer: Unbind textures but don't apply the gl_state
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 12 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 4 |
2 files changed, 2 insertions, 14 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index c8c1d6911..321d9dd3d 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -739,22 +739,10 @@ void RasterizerOpenGL::DrawArrays() { | |||
| 739 | state.Apply(); | 739 | state.Apply(); |
| 740 | 740 | ||
| 741 | res_cache.SignalPreDrawCall(); | 741 | res_cache.SignalPreDrawCall(); |
| 742 | |||
| 743 | // Execute draw call | ||
| 744 | params.DispatchDraw(); | 742 | params.DispatchDraw(); |
| 745 | |||
| 746 | res_cache.SignalPostDrawCall(); | 743 | res_cache.SignalPostDrawCall(); |
| 747 | 744 | ||
| 748 | // Disable scissor test | ||
| 749 | state.viewports[0].scissor.enabled = false; | ||
| 750 | |||
| 751 | accelerate_draw = AccelDraw::Disabled; | 745 | accelerate_draw = AccelDraw::Disabled; |
| 752 | |||
| 753 | // Unbind textures for potential future use as framebuffer attachments | ||
| 754 | for (auto& texture_unit : state.texture_units) { | ||
| 755 | texture_unit.Unbind(); | ||
| 756 | } | ||
| 757 | state.Apply(); | ||
| 758 | } | 746 | } |
| 759 | 747 | ||
| 760 | void RasterizerOpenGL::FlushAll() {} | 748 | void RasterizerOpenGL::FlushAll() {} |
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index 219f08053..9419326a3 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp | |||
| @@ -461,7 +461,7 @@ void OpenGLState::ApplyTextures() const { | |||
| 461 | 461 | ||
| 462 | if (has_delta) { | 462 | if (has_delta) { |
| 463 | glBindTextures(static_cast<GLuint>(first), static_cast<GLsizei>(last - first + 1), | 463 | glBindTextures(static_cast<GLuint>(first), static_cast<GLsizei>(last - first + 1), |
| 464 | textures.data()); | 464 | textures.data() + first); |
| 465 | } | 465 | } |
| 466 | } | 466 | } |
| 467 | 467 | ||
| @@ -482,7 +482,7 @@ void OpenGLState::ApplySamplers() const { | |||
| 482 | } | 482 | } |
| 483 | if (has_delta) { | 483 | if (has_delta) { |
| 484 | glBindSamplers(static_cast<GLuint>(first), static_cast<GLsizei>(last - first + 1), | 484 | glBindSamplers(static_cast<GLuint>(first), static_cast<GLsizei>(last - first + 1), |
| 485 | samplers.data()); | 485 | samplers.data() + first); |
| 486 | } | 486 | } |
| 487 | } | 487 | } |
| 488 | 488 | ||