Permalink
Browse files

gsdx: hidden option disable_hw_gl_draw

OMG, Zone of Ender got a speed boost from 11 fps to 45 fps

Seriously, the goal is to allow benchmarking GSdx without too much overhead of the main renderer draw call

Note: unlike the null renderer, texture/vertex uploading, 2D draw, texture conversions are still done.
  • Loading branch information...
1 parent 6dabc68 commit ced2dd9200ce18e65199f1dbd97eafdb188b2b74 @gregory38 gregory38 committed Jan 11, 2017
Showing with 9 additions and 2 deletions.
  1. +6 −2 plugins/GSdx/GSDeviceOGL.cpp
  2. +2 −0 plugins/GSdx/GSDeviceOGL.h
  3. +1 −0 plugins/GSdx/GSdx.cpp
@@ -88,6 +88,8 @@ GSDeviceOGL::GSDeviceOGL()
#endif
m_debug_gl_call = theApp.GetConfigB("debug_opengl");
+
+ m_disable_hw_gl_draw = theApp.GetConfigB("disable_hw_gl_draw");
}
GSDeviceOGL::~GSDeviceOGL()
@@ -653,7 +655,8 @@ void GSDeviceOGL::DrawPrimitive(int offset, int count)
void GSDeviceOGL::DrawIndexedPrimitive()
{
BeforeDraw();
- m_va->DrawIndexedPrimitive();
+ if (!m_disable_hw_gl_draw)
+ m_va->DrawIndexedPrimitive();
AfterDraw();
}
@@ -662,7 +665,8 @@ void GSDeviceOGL::DrawIndexedPrimitive(int offset, int count)
//ASSERT(offset + count <= (int)m_index.count);
BeforeDraw();
- m_va->DrawIndexedPrimitive(offset, count);
+ if (!m_disable_hw_gl_draw)
+ m_va->DrawIndexedPrimitive(offset, count);
AfterDraw();
}
@@ -416,6 +416,8 @@ class GSDeviceOGL final : public GSDevice
static bool m_debug_gl_call;
static FILE* m_debug_gl_file;
+ bool m_disable_hw_gl_draw;
+
GSWnd* m_window;
GLuint m_fbo; // frame buffer container
@@ -296,6 +296,7 @@ void GSdxApp::Init()
m_default_configuration["CrcHacksExclusions"] = "";
m_default_configuration["debug_glsl_shader"] = "0";
m_default_configuration["debug_opengl"] = "0";
+ m_default_configuration["disable_hw_gl_draw"] = "0";
m_default_configuration["dump"] = "0";
m_default_configuration["extrathreads"] = "2";
m_default_configuration["extrathreads_height"] = "4";

7 comments on commit ced2dd9

@refractionpcsx2
Member

Shoulda added some CRC hacks :)

@gregory38
Contributor

The trick is that you get a black frame 😛

@refractionpcsx2
Member

So it's not actually faster, it just doesn't render anything? xD

@gregory38
Contributor

Ah no, it does a lots of computing. It just skip the draw call of the HW renderer. It still keep all the cache rendering (aka texture conversion and such). It could be the speed of Vulkan, if Vulkan manage to reduce the cost of draw call to 0. Honestly even 45 fps (50 fps with latest driver) is rather low.

@np511
Contributor
np511 commented on ced2dd9 Jan 11, 2017
@gregory38
Contributor

You don't compare the same thing. This perf is GSdx alone (with pre recorded core emulation). And the 50 fps is without the draw call (so yes the overhead is 0 in this case but the screen remain black). I'm sure that Vulkan overhead is far from 0. I let you manage the conclusion.

I have a good CPU, haswell at 4GHz. 50 fps is awfully low to render a black screen. With normal rendering (Nvidia driver) I'm around 160 fps on SotC

By latest driver, you mean latest Mesa? Free driver is really slow but I need to benchmark it again. It ought to be better. If they merge gl threading, I'm pretty sure we will get a massive speed boost.

@np511
Contributor
np511 commented on ced2dd9 Jan 12, 2017
Please sign in to comment.