summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-09-20 21:44:28 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2019-09-20 21:44:28 +0200
commit433e764bb0e8e7478f0cca675960c994fadae3ea (patch)
tree08acc04d3937942ee4de01d0e6dcc3e255acd5bb /src/video_core
parentRasterizer: Refactor and simplify DrawBatch Interface. (diff)
downloadyuzu-433e764bb0e8e7478f0cca675960c994fadae3ea.tar
yuzu-433e764bb0e8e7478f0cca675960c994fadae3ea.tar.gz
yuzu-433e764bb0e8e7478f0cca675960c994fadae3ea.tar.bz2
yuzu-433e764bb0e8e7478f0cca675960c994fadae3ea.tar.lz
yuzu-433e764bb0e8e7478f0cca675960c994fadae3ea.tar.xz
yuzu-433e764bb0e8e7478f0cca675960c994fadae3ea.tar.zst
yuzu-433e764bb0e8e7478f0cca675960c994fadae3ea.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp26
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() {
}
void RasterizerOpenGL::DrawPrelude() {
- if (accelerate_draw == AccelDraw::Disabled)
- return;
-
- MICROPROFILE_SCOPE(OpenGL_Drawing);
auto& gpu = system.GPU().Maxwell3D();
- if (!gpu.ShouldExecute()) {
- return;
- }
-
SyncColorMask();
SyncFragmentColorClampState();
SyncMultiSampleState();
@@ -754,9 +746,16 @@ struct DrawParams {
bool RasterizerOpenGL::DrawBatch(bool is_indexed) {
accelerate_draw = is_indexed ? AccelDraw::Indexed : AccelDraw::Arrays;
- DrawPrelude();
+
+ MICROPROFILE_SCOPE(OpenGL_Drawing);
auto& maxwell3d = system.GPU().Maxwell3D();
+ if (!maxwell3d.ShouldExecute()) {
+ return false;
+ }
+
+ DrawPrelude();
+
const auto& regs = maxwell3d.regs;
const auto current_instance = maxwell3d.state.current_instance;
DrawParams draw_call{};
@@ -783,9 +782,16 @@ bool RasterizerOpenGL::DrawBatch(bool is_indexed) {
bool RasterizerOpenGL::DrawMultiBatch(bool is_indexed) {
accelerate_draw = is_indexed ? AccelDraw::Indexed : AccelDraw::Arrays;
- DrawPrelude();
+
+ MICROPROFILE_SCOPE(OpenGL_Drawing);
auto& maxwell3d = system.GPU().Maxwell3D();
+ if (!maxwell3d.ShouldExecute()) {
+ return false;
+ }
+
+ DrawPrelude();
+
const auto& regs = maxwell3d.regs;
const auto& draw_setup = maxwell3d.mme_draw;
DrawParams draw_call{};