Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
update on Mac bgfx and accel questions #116395 11/12/19 02:39 PM
Joined: Sep 2000
Posts: 224
W
will Offline OP
Senior Member
OP Offline
Senior Member
W
Joined: Sep 2000
Posts: 224
In a previous thread I reported that mame 0.215 was crashing immediately with bgfx enabled.

I compiled the latest git to find that issue was resolved... as long as I use metal as the backend. OpenGL only uses ¼ of the monitor with a Retina display.

However I am finding a lot of older games show a mostly red screen. This is dkong, I've seen it with mario, centiped, polepos, phoenix, etc.

[img]https://photos.app.goo.gl/iZ3PSKJ55cnv6mVM8[/img]

I remembered that SDL supports -video accel and that works fine, as does -video soft.

However I cannot seem to select video accel in the mame.ini file as it seems to fall back to bgfx. Is there anyway to default to accel or will I have to type the command every time?
I seem to recall before bgfx came along that you could choose soft, OpenGL, or accel as options for video in the .ini file.

thanks!


=will=
Re: update on Mac bgfx and accel questions [Re: will] #116396 11/12/19 02:46 PM
Joined: Sep 2000
Posts: 224
W
will Offline OP
Senior Member
OP Offline
Senior Member
W
Joined: Sep 2000
Posts: 224
Additionally, when using mame F12 to take a screenshot the image looks normal.

I had to take a Mac screenshot to show the mostly red screen.


=will=
Re: update on Mac bgfx and accel questions [Re: will] #116397 11/12/19 02:54 PM
Joined: Mar 2004
Posts: 648
belegdol Offline
Senior Member
Offline
Senior Member
Joined: Mar 2004
Posts: 648
Which screen chains are you using? Is it with metal or OpenGL or vulkan? Is your bgfx folder up-to-date? Thanks for the info!

Re: update on Mac bgfx and accel questions [Re: will] #116398 11/12/19 03:02 PM
Joined: Sep 2000
Posts: 224
W
will Offline OP
Senior Member
OP Offline
Senior Member
W
Joined: Sep 2000
Posts: 224
Chains are set to none. Issue is with metal or vulkan - I believe vulkan runs on top of metal. OpenGL works fine but has known bug with Retina displays only takes up ¼ of the screen. bgfx folder is always up to date. thanks!


=will=
Re: update on Mac bgfx and accel questions [Re: will] #116399 11/12/19 03:08 PM
Joined: Mar 2004
Posts: 648
belegdol Offline
Senior Member
Offline
Senior Member
Joined: Mar 2004
Posts: 648
Setting shaders to none is wrong. You need to set them to default or unfiltered. Setting to none disables shader pipeline entirely which is required for colorspace conversion now.
If you try a game using rgb32 output natively (e.g. invqix or any cps3 game) colours will be normal with none.

Re: update on Mac bgfx and accel questions [Re: will] #116400 11/12/19 03:21 PM
Joined: Sep 2000
Posts: 224
W
will Offline OP
Senior Member
OP Offline
Senior Member
W
Joined: Sep 2000
Posts: 224
THANK YOU! That fixed it. I created a fresh mame.ini which has chains set to default which is working fine now.


=will=
Re: update on Mac bgfx and accel questions [Re: will] #116401 11/12/19 03:41 PM
Joined: Mar 2004
Posts: 648
belegdol Offline
Senior Member
Offline
Senior Member
Joined: Mar 2004
Posts: 648
Glad I could help. If you don't mind, could you do me a favour and test metal backend and hlsl chain both with stock bgfx folder and with one attached to https://github.com/mamedev/mame/pull/5875? Thanks!
Please use -bgfx_debug to be sure metal is actually being used.

Last edited by belegdol; 11/12/19 03:42 PM.
Re: update on Mac bgfx and accel questions [Re: will] #116402 11/12/19 04:37 PM
Joined: Sep 2000
Posts: 224
W
will Offline OP
Senior Member
OP Offline
Senior Member
W
Joined: Sep 2000
Posts: 224
OK tried with stock bgfx folder it crashes:

2019-11-12 11:21:30.188 mame64[65803:10341117] ../../../../../3rdparty/bgfx/src/renderer_mtl.mm (2465): BGFX 0x00000001: Failed to create Fragment shader.
zsh: abort ./mame64 dkong -bgfx_screen_chains hlsl

Tried with the new bgfx folder and it works! Verified it is using Metal. Colors are normal. Display looks like scan lines, CRT effect. Here's a screenshot:

[img]https://photos.app.goo.gl/vRP1mzc45Ds42At76[/img]


=will=
Re: update on Mac bgfx and accel questions [Re: will] #116404 11/12/19 04:51 PM
Joined: Sep 2000
Posts: 224
W
will Offline OP
Senior Member
OP Offline
Senior Member
W
Joined: Sep 2000
Posts: 224
Update - dual screen games are not working with or without chains.
Only the 1st screen renders normally, the others are red.

Also tried using -bgfx_screen_chains hlsl:hlsl

Darius
[img]https://photos.app.goo.gl/t3Mc8WE3Ux6qmExG8[/img]

Super Punchout with chains
[img]https://photos.app.goo.gl/aNFn1gBh7vpaEoEWA[/img]

without chains
[img]https://photos.app.goo.gl/Wz8iSNTZxKTTxqub7[/img]


=will=
Re: update on Mac bgfx and accel questions [Re: will] #116405 11/12/19 04:52 PM
Joined: Mar 2001
Posts: 16,391
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,391
Thanks Will. I imagine this is probably an easy fix for Moogly.

Page 1 of 2 1 2

Moderated by  R. Belmont 

Who's Online Now
3 registered members (R. Belmont, Justin, crazyc), 214 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,722
Posts114,638
Members4,873
Most Online510
Aug 26th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3