Previous Thread
Next Thread
Print Thread
Page 1 of 5 1 2 3 4 5
Joined: May 2011
Posts: 41
S
Member
OP Offline
Member
S
Joined: May 2011
Posts: 41
Back when Moogly first added BGFX shader support I was sort of keeping up with things.

I could write and compile shaders and everything was fine. Sometimes shader compilation would break for one or more backends when BGFX (the third party stuff, not MAME) was brought in, but it usually went away with the next BGFX update.

But I was working a full-time job and another 66%-time teaching job and stopped paying attention for a couple months.

Anyway, I can't compile shaders or bgfx-tools, with the official dev tools now.

Specifically, I get errors compiling shaderc at first. Then, after solving this (or attempting to) by manually running some commands involving flex/bison that I have no idea what they do, I can get a little further. I end up at a command prompt (cmd.exe not bash) that the bash shell opened with nothing going on.

That's also what I get if I just head into the mame/src/osd/modules/render/bgfx/shaders folder and try to compile the shaders from there. Which also used to work but doesn't now.

I don't know if it's just some makefile nonsense, some kind of path/package issue, or something else. But at the end of the day, I can't compile the shaders/bgfx-tools in Win7 or Win10 on a couple different PCs with either freshly downloaded or updated dev tools.

My guess is that something broke awhile back in the 3rd party bgfx section and that nobody noticed because (1)shaders aren't compiled very often (2)people don't use windows (3)you still have old working compiled bgfx tools in your environment so you don't see the breakage.

Any ideas on how to get this working again?

Joined: Feb 2004
Posts: 2,344
Likes: 61
Very Senior Member
Online Content
Very Senior Member
Joined: Feb 2004
Posts: 2,344
Likes: 61
It can still be done on Win7. I needed to grab a D3D compiler DLL from the platform SDK or from an IE11 install, but once I had that it worked.

Joined: May 2011
Posts: 41
S
Member
OP Offline
Member
S
Joined: May 2011
Posts: 41
Originally Posted By Vas Crabb
It can still be done on Win7. I needed to grab a D3D compiler DLL from the platform SDK or from an IE11 install, but once I had that it worked.


I didn't think of anything like that. I'll see if I can find what I need. Thanks for the tip!

Joined: Jul 2015
Posts: 104
Senior Member
Offline
Senior Member
Joined: Jul 2015
Posts: 104
Any chance that we see a automated compile process?
Its really hard and annoying for a beginner/novice/noob like me, to test the shader results. It was a lot easier in the past with OpenGL, but with way less options of course.

This is no criticize, i just want to know, if there are thoughts about it wink .


I live... I die... I live again.
Joined: Feb 2004
Posts: 2,344
Likes: 61
Very Senior Member
Online Content
Very Senior Member
Joined: Feb 2004
Posts: 2,344
Likes: 61
Well it is automated - there are make commands for doing it. But it's more manual steps than with OpenGL which is compiled on-the-fly.

Joined: May 2009
Posts: 2,024
Likes: 60
J
Very Senior Member
Offline
Very Senior Member
J
Joined: May 2009
Posts: 2,024
Likes: 60
Originally Posted By u-man
Any chance that we see a automated compile process?


You mean like the one we have now? You just need d3dcompiler_47.dll in c:\windows\system32. You'll have to track it down yourself, but after that "make shaders" works just fine to rebuild all shaders in MAME, immediately putting them in the right spot for use.

Joined: May 2009
Posts: 2,024
Likes: 60
J
Very Senior Member
Offline
Very Senior Member
J
Joined: May 2009
Posts: 2,024
Likes: 60
Originally Posted By Vas Crabb
Well it is automated - there are make commands for doing it. But it's more manual steps than with OpenGL which is compiled on-the-fly.


Except it's not, even the OpenGL version of BGFX uses post-processed shaders of some kind. It's not like the OpenGL version just magically reads the .sc files that aren't supplied with a stock MAME distribution.

Joined: Jul 2015
Posts: 104
Senior Member
Offline
Senior Member
Joined: Jul 2015
Posts: 104
Well, i know my engrish is bad and i apologize. With OpenGL i really meant the old one, not that one in BGFX. It takes more steps now, until i can test a shader. In the past, i could just open a shader with notepad, change it and i was done with it.

Anyway, thanks for all the infos. I hope i will have the time to use them, as soon as possible smile .


I live... I die... I live again.
Joined: May 2009
Posts: 2,024
Likes: 60
J
Very Senior Member
Offline
Very Senior Member
J
Joined: May 2009
Posts: 2,024
Likes: 60
Then no, you won't be able to do that. The BGFX library needs to have its shaders pre-compiled. I would be really happy if Branimir made the BGFX library able to support runtime shader compilation, but I really don't see that happening anytime soon, and in any case, the BGFX library has nothing to do with MAME other than being what my shader code interfaces with, so it's none of our concern at the end of the day.

Joined: Oct 2006
Posts: 1,015
Likes: 21
S
Very Senior Member
Offline
Very Senior Member
S
Joined: Oct 2006
Posts: 1,015
Likes: 21
Originally Posted By Just Desserts
I would be really happy if Branimir made the BGFX library able to support runtime shader compilation, but I really don't see that happening anytime soon, and in any case, the BGFX library has nothing to do with MAME other than being what my shader code interfaces with, so it's none of our concern at the end of the day.


That's a shame, I think MAME users enjoyed the "plugin" aspect to the OpenGL code.

Page 1 of 5 1 2 3 4 5

Link Copied to Clipboard
Who's Online Now
2 members (Rik, 1 invisible), 23 guests, and 2 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,071
Posts118,945
Members5,014
Most Online890
Jan 17th, 2020
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com