27 July 2016

MAME 0.176 is out - and BGFX/CRT-GEOM shaders are in!

MAME 0.176 seems to be another great release when it comes to shaders. In the BGFX section the CRT-GEOM and the CRT-GEOM Deluxe shader (for Glow) made it into the default distribution, which really rocks.  Also some BGFX bug fixing. 

First performance tests with CRT-GEOM Deluxe are very promising - I see significant performance increases on my machine (performance numbers in brackets are from these tests here) with old games. Interestingly newer games seem to loose performance, but still perform in a very healthy area:

1942 (Revision B)
BGFX/Metal-CRT-GEOM-Glow, Window - 650,30% (vs 212,08%)

Defender (Red Label)
BGFX/Metal-CRT-GEOM-Deluxe, Window - 501,07% (vs 742,88%)

Elevator Action
BGFX/Metal-CRT-GEOM-Glow, Window - 449,59% (vs 200,70%)

Gyruss
BGFX/Metal-CRT-GEOM-Glow, Window - 336,37% (vs 191,21%)

Out Run (sitdown/upright, Rev A)
BGFX/Metal-CRT-GEOM-Glow, Window - 398,24% (vs 627,28%)

R-Type (World)
BGFX/Metal-CRT-GEOM-Glow, Window - 472,44% (vs 633,44%)

Configuration: MAME 0.176, QMC2 0.66, Throttle Off, run 60 seconds, for details, please see this post.
In the BGFX section of QMC2, you can now directly insert crt-geom deluxe for the chain, and you are ready to go.
I applied changes to the .json file as described here for GLSL in the same way. More details will follow.

Conclusion: BGFX in MAME gets better and better, and it also seems that the shader is gaining performance. So for everybody that had performance problems before, MAME 0.176 is definitely worth another try.

8 comments:

  1. For some reason my posts keep disappearing.

    I'm curious if your BGFX increases are the same using the OpenGL backend for BGFX.

    I was reading in the sdlmame forum and changing the scale variable in hlsl.json can have a dramatic change in framerate. (At the cost of some minor visuals)
    I saw a 4x improvement in Elevator Action, but the change in Marble Madness made zero difference. I'm sure there's a lot to do with the games native resolution too.

    Two things I'm waiting for with BGFX:
    1) Changes made in game using sliders is stored.
    2) We get some vector games effects like the D3D and HLSL renderers in Windows.

    ReplyDelete
    Replies
    1. Headrush69, just back from summer holidays, many thanks for your feedback as always. I saw the same performance increase under the OpenGL backend for BGFX. With MAME 0177 being out in the wild, I will move forward to this version, but will keep your comments in memory. Cheers.

      Delete
  2. Ditched my iMac and got a 2012 Mac Pro with a GTX 780 in it. (not mobile GPU)

    Initially I couldn't understand why BGFX seemed so slow still on such an improved hardware. After testing I found using artwork can greatly affect the fps with BGFX.
    In the test case I was using, it was just a bezel with Elevator Action. Using OpenGL doesn't see to cause the same issues.

    estefan, can you see if you get the same drop in fps when using artwork/bezels.

    Results from testing:

    mame -video bgfx -str 30 -noafs -bgfx_screen_chains crt-geom -bgfx_backend opengl -artcrop -noreadconfig -nosleep -nothrottle elevator
    Average speed: 85.58% (29 seconds)

    mame -video bgfx -str 30 -noafs -bgfx_screen_chains crt-geom -bgfx_backend opengl -artcrop -noreadconfig -nosleep -nothrottle -nobezel elevator
    Average speed: 977.05% (29 seconds)

    mame -video opengl -nofilter -gl_glsl -glsl_shader_mame0 /Volumes/Emulation\ HD/MAME/Favourites/shaders/CRT-geom -str 30 -noafs -artcrop -noreadconfig -nosleep -nothrottle elevator
    Average speed: 794.21% (29 seconds)

    mame -video opengl -nofilter -gl_glsl -glsl_shader_mame0 /Volumes/Emulation\ HD/MAME/Favourites/shaders/CRT-geom -str 30 -noafs -artcrop -noreadconfig -nosleep -nothrottle -nobezel elevator
    Average speed: 791.79% (29 seconds)

    ReplyDelete
    Replies
    1. Wow, your MacPro certainly smokes. These are very nice testing routines, and I encounter the exact identical pattern in Elevator Action:
      BGFX
      ./mame64 -video bgfx -str 30 -noafs -bgfx_screen_chains crt-geom -bgfx_backend opengl -artcrop -noreadconfig -nosleep -nothrottle elevator
      Average speed: 153.96% (29 seconds)
      ./mame64 -video bgfx -str 30 -noafs -bgfx_screen_chains crt-geom -bgfx_backend opengl -artcrop -noreadconfig -nosleep -nothrottle -nobezel elevator
      Average speed: 631.67% (29 seconds)
      OpenGL
      ./mame64 -video opengl -nofilter -gl_glsl -glsl_shader_mame0 /Users/stefan/Games/mame/CGWG-CRT-geom-halation-20151123/CRT-geom-halation -str 30 -noafs -artcrop -noreadconfig -nosleep -nothrottle elevator
      Average speed: 717.32% (29 seconds)
      ./mame64 -video opengl -nofilter -gl_glsl -glsl_shader_mame0 /Users/stefan/Games/mame/CGWG-CRT-geom-halation-20151123/CRT-geom-halation -str 30 -noafs -artcrop -noreadconfig -nosleep -nothrottle -nobezel elevator
      Average speed: 809.30% (29 seconds)
      I will do a post on easy performance testing courtsey of you, this is perfect, many thanks!

      Delete
    2. PS as per my previous post: This is MAME 0.177 self-compiled and apparently the CRT-GEOM Halation OpenGL shader. It's fascinating to see that small nuances in configuration can do a huge difference in some games.

      Delete
    3. PPS: Same dramatic frame increase without bezel in Gyruss!!!

      Delete
    4. Just doing some testing to see if it's just bezels or whether it's any artwork. For example, overlays that are absolutely required for games like armora.

      Delete
    5. Further testing shows doesn't matter what type of artwork, bezels, overlays, backdrops all cause slow downs.

      Delete

Any comments are welcome!