In this later post, I show you how to tweak BGFX so that your individual settings are there every time.
And in this new post, you find instructions on how to tweak BGFX in mame.ini - which is actually the preferred choice (you stay independent of frontend - and even platforms).
Here is a step-by step configuration of BGFX under QMC2 - which actually should work on all platforms offering QMC2.
1. Read the official MAME documentation for BGFX on BGFX:
http://docs.mamedev.org/advanced/bgfx.html
my task is to translate this into the QMC2 environment
2. QMC2: Tools/Options/Emulator/Global Configuration/Video/video bgfx
3. QMC2: BGFX Post-Processing Options - see this screenshot:
These options are identical with what MAME officially recommends - some comments:
4. Start a MAME Game from QMC2 - and you will be surprised that there are no effects whatsoever
- bgfx_backend: I activated the Metal backend, which requires MacOSX El Capitan. Here it works, and I just could not resist.
- bgfx_path: If you have SDL MAME without changes, the MAME executable directory should contain a bgfx subdirectory with all the files. No changes then needed here.
- bgfx_screen_chains: must be changed manually to hlsl - this is the second key to the shaders
- bgfx_shadow_mask: Can be left as is, but here was my stupid mistake - be absolutely sure that all artwork files, which are now delivered with SDLMame, are in the artwork directory defined in QMC2. If MAME cannot find this new new BGFX artwork, then you do not get the new options within MAME
What the .... - click to enlarge |
The MAME Dev Team states appropriately: Warning: Currently BGFX HLSL settings are not saved or loaded from any configuration files. This is expected to change in the future.
Then go into the in-game options by pressing the TAB key - then move to Slider Controls and press RETURN:
It's the Slider Controls!!!! - click to enlarge |
The most important option - turn it to On (cursor left-right) - click to enlarge |
Click to Enlarge |
A reminder once again: In this post, I explain how to tweak BGFX with your individual settings.
On my 2011 iMac, using BGFX absolutely kills the framerate using HLSL. Even a "simple" game like pacman needs massive frameskipping to be playable.
ReplyDeleteGetting what to my untrained eye, looks like the same or similar effects just using GLSL shaders runs great.
I don't know if this is do to BGFX being new an unoptimized or something I'm doing wrong.
Thanks for the feedback, much appreciated. Specs of my iMac are in the very first post. Are you really experiencing frameskipping? I also thought about performance hits, but in the end, it was just the settings.
DeleteIn my case, it was just far too extreme shader settings that caused the playing experience to be bad. Later on I will upload my hlsl configuration file so that you can try without tweaking around.
I tried changing some of the settings and I didn't see much of an appreciable difference. It could be my 2011 iMac (with downgraded GPU) just isn't up to snuff at this point with BGFX.
ReplyDeleteI read in the other thread that you used the Metal backend, do you see a difference if you you the OpenGL backend? Unfortunately I can test Metal on this model.
Sorry to hear that. You are right that GLSL produces very similar results. In my configuration, there is no difference between the Metal and the OpenGL backend under BGFX. So it is probably easier for you to stay with GLSL.
DeleteAnd my modified hlsl.json file is now ready for download in the second posing.
Deleteestefan, if you enable bgfx_debug can you tell me the version of OpenGL and GLSL it is using on your machine (should display that info on screen).
DeleteHeadrush69 - your issues inspire me; will do further testing on different Mac machines, will also post my debug data, will keep you posted!
DeleteI did some testing of the various video drivers and options.
ReplyDeleteI used Elevator Action for the test and ran unthrottled to see differences in average speed. (My iMac has a downgraded 6770M so results are just for evaluating differences between options)
Video Driver - Avg Speed
BGFX (using CRT-geom) - 46%
software - 95%
GLSL (glsl bilinear filtering + CRT-geom shader) - 231%
GLSL (no filtering + CRT-geom shader) - 256%
accel - 415%
OpenGL (bilinear filter) - 648%
OpenGL (no filter) - 948%
I did some preliminary testing on a Mac mini (Mid 2011) running an AMD Radeon HD 630M under Yosemite. Even CRT-Geom-Halation under GLSL is too much for this machine to handle. So it seems that the new shaders are really for new Mac machines. I will try to collect more conclusive benchmark results in a dedicated post.
DeleteI think you meant a Radeon HD 6630M.
DeleteI know these mobile GPU options in Apple computers aren't the greatest, but I find it still remarkable how poor the BGFX performance is. I can play a 2560x1600 3D first person game no problem but a simple filter with BGFX grinds performance to alarming levels. I wonder if there's a specific API method or OpenGL extension being used by BGFX that these mobile GPUs don't handle in hardware.
I have a MacPro coming that will have a desktop level GPU soon, It'll be interesting to see the performance with it.
Headrush69, last question for today: How do you configure QMC2 in order to run the performance tests? I deactivated Throttle in the individual config of Elevator Action, but it still runs at 100% only. Is there anything else to change so that the game runs at full speed? Thanks indeed!
DeleteIn the performance section, throttle off, seconds to run set to something, and make sure you have no video sync options set in the video section.
DeleteThat should be enough, unless you have some other defaults set that are affecting it.
Many thanks, now working. On top of your recommendations, since I run QMC2 and MAME internal MEWUI in parallel, I had to change settings in MEWUI as well. First results are very interesting, will hopefully post them soon. Another learning: Running QMC2 and MEWUI in parallel is no good idea.
DeleteThis comment has been removed by the author.
ReplyDelete