diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index b5c55482f..a6fe7dd71 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -626,16 +626,8 @@ void RasterizerOpenGL::Clear() { | |||
| 626 | } | 626 | } |
| 627 | 627 | ||
| 628 | void RasterizerOpenGL::DrawPrelude() { | 628 | void RasterizerOpenGL::DrawPrelude() { |
| 629 | if (accelerate_draw == AccelDraw::Disabled) | ||
| 630 | return; | ||
| 631 | |||
| 632 | MICROPROFILE_SCOPE(OpenGL_Drawing); | ||
| 633 | auto& gpu = system.GPU().Maxwell3D(); | 629 | auto& gpu = system.GPU().Maxwell3D(); |
| 634 | 630 | ||
| 635 | if (!gpu.ShouldExecute()) { | ||
| 636 | return; | ||
| 637 | } | ||
| 638 | |||
| 639 | SyncColorMask(); | 631 | SyncColorMask(); |
| 640 | SyncFragmentColorClampState(); | 632 | SyncFragmentColorClampState(); |
| 641 | SyncMultiSampleState(); | 633 | SyncMultiSampleState(); |
| @@ -754,9 +746,16 @@ struct DrawParams { | |||
| 754 | 746 | ||
| 755 | bool RasterizerOpenGL::DrawBatch(bool is_indexed) { | 747 | bool RasterizerOpenGL::DrawBatch(bool is_indexed) { |
| 756 | accelerate_draw = is_indexed ? AccelDraw::Indexed : AccelDraw::Arrays; | 748 | accelerate_draw = is_indexed ? AccelDraw::Indexed : AccelDraw::Arrays; |
| 757 | DrawPrelude(); | 749 | |
| 750 | MICROPROFILE_SCOPE(OpenGL_Drawing); | ||
| 758 | 751 | ||
| 759 | auto& maxwell3d = system.GPU().Maxwell3D(); | 752 | auto& maxwell3d = system.GPU().Maxwell3D(); |
| 753 | if (!maxwell3d.ShouldExecute()) { | ||
| 754 | return false; | ||
| 755 | } | ||
| 756 | |||
| 757 | DrawPrelude(); | ||
| 758 | |||
| 760 | const auto& regs = maxwell3d.regs; | 759 | const auto& regs = maxwell3d.regs; |
| 761 | const auto current_instance = maxwell3d.state.current_instance; | 760 | const auto current_instance = maxwell3d.state.current_instance; |
| 762 | DrawParams draw_call{}; | 761 | DrawParams draw_call{}; |
| @@ -783,9 +782,16 @@ bool RasterizerOpenGL::DrawBatch(bool is_indexed) { | |||
| 783 | 782 | ||
| 784 | bool RasterizerOpenGL::DrawMultiBatch(bool is_indexed) { | 783 | bool RasterizerOpenGL::DrawMultiBatch(bool is_indexed) { |
| 785 | accelerate_draw = is_indexed ? AccelDraw::Indexed : AccelDraw::Arrays; | 784 | accelerate_draw = is_indexed ? AccelDraw::Indexed : AccelDraw::Arrays; |
| 786 | DrawPrelude(); | 785 | |
| 786 | MICROPROFILE_SCOPE(OpenGL_Drawing); | ||
| 787 | 787 | ||
| 788 | auto& maxwell3d = system.GPU().Maxwell3D(); | 788 | auto& maxwell3d = system.GPU().Maxwell3D(); |
| 789 | if (!maxwell3d.ShouldExecute()) { | ||
| 790 | return false; | ||
| 791 | } | ||
| 792 | |||
| 793 | DrawPrelude(); | ||
| 794 | |||
| 789 | const auto& regs = maxwell3d.regs; | 795 | const auto& regs = maxwell3d.regs; |
| 790 | const auto& draw_setup = maxwell3d.mme_draw; | 796 | const auto& draw_setup = maxwell3d.mme_draw; |
| 791 | DrawParams draw_call{}; | 797 | DrawParams draw_call{}; |