Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: GroovyArcade GLSL Performance  (Read 4047 times)

0 Members and 1 Guest are viewing this topic.

robbo43

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:April 04, 2021, 09:25:51 pm
GroovyArcade GLSL Performance
« on: November 20, 2015, 03:13:18 pm »
Hi All,

I seem to get really poor performance enabling glsl and using the CRT-Geom shader in groovy arcade. Games drop to 1=around 1/3 speed. I'm running the latest beta of GA with GroovyMAME 0.167, graphics card is a GTX460 outputting to a 1600x1200 lcd. Using the same hardware in windows I have no performance issues.

Anything I should be looking at in the mame.ini file to improve performance?

Cheers

Rob

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7418
  • Last login:May 02, 2024, 04:59:06 am
  • Quote me with care
Re: GroovyArcade GLSL Performance
« Reply #1 on: November 20, 2015, 03:30:02 pm »
I've no experience with GLSL, but I'd try the "-video accel" option.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

robbo43

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:April 04, 2021, 09:25:51 pm
Re: GroovyArcade GLSL Performance
« Reply #2 on: November 20, 2015, 05:06:39 pm »
Thanks for the quick reply! I've tried a couple of things. I changed video in my mame.ini from opengl to accel and it no longer applies the glsl shader. I also tried adding -video accel and -video accel -rd opengl to the emulator "mame" line in advancemenu.rc and again it fails to apply the shader.

Have I done something wrong there?   

Cheers

Rob
« Last Edit: November 20, 2015, 05:20:58 pm by robbo43 »

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7418
  • Last login:May 02, 2024, 04:59:06 am
  • Quote me with care
Re: GroovyArcade GLSL Performance
« Reply #3 on: November 20, 2015, 05:20:25 pm »
Try -video accel -renderdriver opengl
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

robbo43

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:April 04, 2021, 09:25:51 pm
Re: GroovyArcade GLSL Performance
« Reply #4 on: November 20, 2015, 05:24:33 pm »
Thanks again, but still no joy, the shader fails to be rendered.

Cheers

Rob

u-man

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 88
  • Last login:May 12, 2024, 06:40:50 am
  • I want to build my own arcade controls!
Re: GroovyArcade GLSL Performance
« Reply #5 on: November 23, 2015, 08:14:46 am »
with your setup, it should be possible to run the CRT-geom shader twice :) just saying.... something must be very odd in your setup, if it doesnt work.
pls attach the shader you are using.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: GroovyArcade GLSL Performance
« Reply #6 on: November 23, 2015, 10:06:47 am »

I can confirm that since mame version 0.167 the shader mode is not applied properly (black screen) but the emulation is running well and the game sounds are audible. This has been verified under SDL with openGL.

You can test/use a previous version to have the GLSL working as expected.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7418
  • Last login:May 02, 2024, 04:59:06 am
  • Quote me with care
Re: GroovyArcade GLSL Performance
« Reply #7 on: November 23, 2015, 01:56:56 pm »

I can confirm that since mame version 0.167 the shader mode is not applied properly (black screen) but the emulation is running well and the game sounds are audible. This has been verified under SDL with openGL.

You can test/use a previous version to have the GLSL working as expected.

Do you mean this is an issue with baseline MAME or just GroovyMAME?
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

robbo43

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:April 04, 2021, 09:25:51 pm
Re: GroovyArcade GLSL Performance
« Reply #8 on: November 23, 2015, 02:18:52 pm »
Thanks Guys,

Just to clarify I'm running GroovyMAME 0.167 with the last GroovyArcade beta. When trying to apply a CRT-geom shader, performance drops to ~30% of full speed. If I try to use the -video accel command (with or without -renderdriver opengl) the emulation runs full speed, just with no evidence of the shader being applied (e.g. no effects).

This happens with every single shader I've tried (included those 'bundled'), but I've attached my favourite CRT Geom Bloom.

Cheers

Rob

u-man

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 88
  • Last login:May 12, 2024, 06:40:50 am
  • I want to build my own arcade controls!
Re: GroovyArcade GLSL Performance
« Reply #9 on: November 23, 2015, 02:55:28 pm »
All i see is, that your shader is a.) not complete and b.) you are using the multipass shader version of CRT-geom, which means you are missing two blur-shaders that create the bloom, used by the CRT geom bloom shader.

I attached the whole shader package. Put the shaders into your MAME install folder and run this commandline:

Code: [Select]
mame -glsl_shader_mame0 gaussx -glsl_shader_mame1 gaussy -glsl_shader_mame2 CRT-geom-halation
please report back if it works for you.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."

robbo43

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:April 04, 2021, 09:25:51 pm
Re: GroovyArcade GLSL Performance
« Reply #10 on: November 23, 2015, 03:59:18 pm »
u-man,

Thanks, haven't got time tonight, but will try tomorrow and report back.

Cheers

Rob

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: GroovyArcade GLSL Performance
« Reply #11 on: November 24, 2015, 05:54:31 am »

Do you mean this is an issue with baseline MAME or just GroovyMAME?

I haven't tested stock mame on that subject. I will setup something to confirm this.

u-man

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 88
  • Last login:May 12, 2024, 06:40:50 am
  • I want to build my own arcade controls!
Re: GroovyArcade GLSL Performance
« Reply #12 on: November 24, 2015, 07:29:50 am »

I can confirm that since mame version 0.167 the shader mode is not applied properly (black screen) but the emulation is running well and the game sounds are audible. This has been verified under SDL with openGL.

You can test/use a previous version to have the GLSL working as expected.

If you have that black screen with the CRT-geom shader, than it is because of this line in the "CRT Geom Bloom.vsh" file

Code: [Select]
// tilt angle in radians
  // (behavior might be a bit wrong if both components are nonzero)
  const vec2 angle = vec2(0.0,0.01);

There are some graphic cards that have your described issue with a black screen as a result, if the values are "(0.0,0.0)". We corrected this by using a slightly higher value i.e. "0.01 or 0.001". Just try out my attachment and look if you still have a black screen.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: GroovyArcade GLSL Performance
« Reply #13 on: November 24, 2015, 07:56:23 am »

Hi U-man,

I am using the same GLSL shader files which were working fine with previous version. The CRT shader model is from 'Copyright (C) 2010-2012 cgwg, Themaister and DOLLS'

In this version, the angle is already set to something different from zero.

Code: [Select]
  // tilt angle in radians
  // (behavior might be a bit wrong if both components are nonzero)
  const vec2 angle = vec2(0.0,-0.15);

I will give a try to your provided files.

robbo43

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:April 04, 2021, 09:25:51 pm
Re: GroovyArcade GLSL Performance
« Reply #14 on: November 24, 2015, 03:19:28 pm »
u-man,

Have tested the files and here is the outcome (I think there's several things going on here that I don't understand!)

Test 1 - RType 1 (55Hz game)

 If I apply the shader as per instructions, and set lcd_range to 50-75, the shader applies correctly, the screen scrolls smoothly, but runs at 37% speed. If I change lcd_range to auto or 60-60, the shader applies correctly, the game claims to be running @ 100% but the game randomly jumps and skips. I've used this terminology as it is not the same kind of artefacts you get from a 55Hz gaming running on a 60Hz monitor (i.e. regular tearing).

Test 2 - Shinobi (60Hz game)

Applying the shader results in the game running at 37%, but scrolling is smooth. No difference in behaviour if lcd_range is set to 50-75 or auto.

Not sure what to do next.

Cheers

Rob

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7418
  • Last login:May 02, 2024, 04:59:06 am
  • Quote me with care
Re: GroovyArcade GLSL Performance
« Reply #15 on: November 24, 2015, 04:11:40 pm »
the game running at 37%, but scrolling is smooth.

That sounds surreal. But can you confirm whether the game is actually running at the *right* speed, despite the reported speed I mean.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

robbo43

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:April 04, 2021, 09:25:51 pm
Re: GroovyArcade GLSL Performance
« Reply #16 on: November 24, 2015, 04:45:44 pm »
Calamity,

Sorry, should've been clear, you can tell the game is running at approximately 1/3 speed when 37% is reported. When R-Type is set to run with lcd_range at 60-60 or auto, the game does run at full speed (GM reports 100%), but with lots of random dropped or missing frames. And I thought that the speed should be reported at 110% as I have refreshspeed set to 1 so the game should be throttled to match the 60Hz refresh rate of the screen.

Cheers

Rob

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7418
  • Last login:May 02, 2024, 04:59:06 am
  • Quote me with care
Re: GroovyArcade GLSL Performance
« Reply #17 on: November 24, 2015, 05:11:21 pm »
The option that needs to be enabled is syncrefresh, not refreshspeed.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

robbo43

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:April 04, 2021, 09:25:51 pm
Re: GroovyArcade GLSL Performance
« Reply #18 on: November 24, 2015, 06:08:30 pm »
Thanks for clarifying that. Just to confirm the R-Type behaviour is exactly the same with syncrefresh set to 1 and GLSL shaders applied.

lcd_range 50-75: game runs at 37%, smooth scrolling observed but game definitely runs at 1/3 speed
lcd_range auto or 60-60: game reports running at 100% (not 110%). Game appears to be running at full speed but with random dropped and missed frames, this does not look like the normal tearing you get when running a 55hz game at 60Hz. Should've said frameskip is set to 0 (not auto).

Cheers

Rob
« Last Edit: November 24, 2015, 06:17:36 pm by robbo43 »

u-man

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 88
  • Last login:May 12, 2024, 06:40:50 am
  • I want to build my own arcade controls!
Re: GroovyArcade GLSL Performance
« Reply #19 on: November 25, 2015, 08:16:27 am »
Well, i sadly cant test the shader on another OS, i am windows only :( .... but even on windows, SDL/GLSL works. So i can only assume, that either your OS is missing important drivers for your graphics card or GroovyArcade itself is causing the trouble. If GLSL would have problems on Linux/Mac OS X, there would be more reports about it and GLSL is the only option for shaders in Linux/Mac OS X.

Of all shaders i use, the CRT-geom shader is the one with the lowest demand on resources, so 37% with your setup sounds like a big error and i am pretty sure, it doesnt have to do with the shader itself.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."

robbo43

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:April 04, 2021, 09:25:51 pm
Re: GroovyArcade GLSL Performance
« Reply #20 on: November 25, 2015, 12:38:20 pm »
u-man,

I was coming to that conclusion myself, and I'm thinking it may well be an NVidia specific issue. I've been testing a win7 setup with GroovyMAME and have no problems with GLSL, although have decided to go down the d3d9ex and HLSL route as I love the apparent zero input lag using usb joysticks and spinners. I love GroovyArcade because the usb input lag 'feels' a hell of a lot less than xp or 7. However, calamity's latest GM release on win7 eliminates this even though my gfx card isn't quite fast enough to completely remove the static tearing.

My ideal would be to have a GroovyAarcade setup, with GLSL running at 100% and a HP LP2065 LCD so all games ran at the native refresh rates.

One last question - does anybody know if it is possible to update the NVidia drivers in the GroovyArcade distro, and if so, point me towards a tutorial / guide? Would like to see if this fixes it.

Cheers

Rob

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: GroovyArcade GLSL Performance
« Reply #21 on: November 26, 2015, 07:20:00 am »
Code: [Select]
// tilt angle in radians
  // (behavior might be a bit wrong if both components are nonzero)
  const vec2 angle = vec2(0.0,0.01);

There are some graphic cards that have your described issue with a black screen as a result, if the values are "(0.0,0.0)". We corrected this by using a slightly higher value i.e. "0.01 or 0.001". Just try out my attachment and look if you still have a black screen.

Hi U-Man,

I confirm that changing the tilt angle cures the black screen effect. By the way, GA stock version is currently affected by this odd behaviour.

Thank you for pointing me into that direction. You saved my time from a long regression tracking from Xorg to SDL ;-)

Cheers