From f8db3774cbeb70853ac19639324e5709f5a1619f Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sun, 22 Mar 2015 11:41:46 -0700 Subject: [PATCH] Hiding draw batch flush scope. --- src/xenia/gpu/gl4/command_processor.cc | 2 -- src/xenia/gpu/gl4/draw_batcher.cc | 2 ++ src/xenia/gpu/gl4/gl4_gpu-private.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xenia/gpu/gl4/command_processor.cc b/src/xenia/gpu/gl4/command_processor.cc index fd50eee70..1c21e655a 100644 --- a/src/xenia/gpu/gl4/command_processor.cc +++ b/src/xenia/gpu/gl4/command_processor.cc @@ -22,8 +22,6 @@ #include "third_party/xxhash/xxhash.h" -#define FINE_GRAINED_DRAW_SCOPES 0 - namespace xe { namespace gpu { namespace gl4 { diff --git a/src/xenia/gpu/gl4/draw_batcher.cc b/src/xenia/gpu/gl4/draw_batcher.cc index cc78afe2f..bf7de6ee7 100644 --- a/src/xenia/gpu/gl4/draw_batcher.cc +++ b/src/xenia/gpu/gl4/draw_batcher.cc @@ -259,7 +259,9 @@ bool DrawBatcher::CommitDraw() { bool DrawBatcher::Flush(FlushMode mode) { if (batch_state_.draw_count) { +#if FINE_GRAINED_DRAW_SCOPES SCOPE_profile_cpu_f("gpu"); +#endif // FINE_GRAINED_DRAW_SCOPES assert_not_zero(batch_state_.command_stride); assert_not_zero(batch_state_.state_stride); diff --git a/src/xenia/gpu/gl4/gl4_gpu-private.h b/src/xenia/gpu/gl4/gl4_gpu-private.h index a374227a2..e6af6e3f8 100644 --- a/src/xenia/gpu/gl4/gl4_gpu-private.h +++ b/src/xenia/gpu/gl4/gl4_gpu-private.h @@ -25,6 +25,8 @@ DECLARE_bool(vendor_gl_extensions); DECLARE_bool(disable_framebuffer_readback); DECLARE_bool(disable_textures); +#define FINE_GRAINED_DRAW_SCOPES 0 + namespace xe { namespace gpu { namespace gl4 {