News for hackers. Stuff that matters.
Re:PCSX2 PS2 Emulator: Progress report Q3 2019 to Q1 2020 by pjmlp on Friday May 08, 2020 @07:03AM (#23113408)
All major middleware already does Metal, even non gaming stuff like Flutter.
Re:PCSX2 PS2 Emulator: Progress report Q3 2019 to Q1 2020 by ddevault on Friday May 08, 2020 @08:39AM (#23114144)
Most emulators don't use middleware, because it doesn't afford them anywhere near enough flexibility or performance.
Re:PCSX2 PS2 Emulator: Progress report Q3 2019 to Q1 2020 by pjmlp on Friday May 08, 2020 @08:49AM (#23114241)
As anyone from Flipcode and Gamedevnet days knows, middleware can be as thin as couple of function pointers with shared libraries loaded on demand for the desired 3D API.

The approach taken by AAA game engines, although nowadays it looks more like a bunch of abstract classes/interfaces, depending on the language.

When you look into a game engine, typically 3D API abstractions are like 10% of the whole codebase.

Re:PCSX2 PS2 Emulator: Progress report Q3 2019 to Q1 2020 by hexmiles on Friday May 08, 2020 @11:20AM (#23115760)
The way some emulator use the gpu can be quite different from the way pc games use it.

You can look at this article: https://dolphin-emu.org/blog/2017/07/30/ubershaders/ for an example how console graphics programming differ.

Middleware designed for games don't allow nearly enough flexibility to handle all the possible edge case that can arise. Console gpu (and graphics api) and computer gpu don't map one-to-one and they need all the feature and support from the underlying api that they can get for replicating the console way of doing things, supporting a new graphics backend is a lot of work for this reason. middleware try to abstract common pattern and flows, but every console is quite unique (in some way) middleware are not build for that and often are (a form of) a lowest common denominator for graphics api. Which is fine... for games.

edit: some clarification

Re:PCSX2 PS2 Emulator: Progress report Q3 2019 to Q1 2020 by pjmlp on Friday May 08, 2020 @12:11PM (#23116372)
That doesn't forbade loading shared libraries as function pointers though.

Even if you stay, lets say OpenGL only, there are multiple execution paths with driver and graphics card specific code paths.

3D libraries like OpenGL/Vulkan are only portable up to a certain extent.

When you are coding at the ultimate performance level, you are also going into that rabbit hole of graphic card specific code paths and driver specific extensions.

So, it is hardly different than having your own plugable abstraction layer.

Re:PCSX2 PS2 Emulator: Progress report Q3 2019 to Q1 2020 by throwaway2048 on Friday May 08, 2020 @11:06AM (#23115588)
If its so trivial, I'm guessing the developers would welcome patches.
Re:PCSX2 PS2 Emulator: Progress report Q3 2019 to Q1 2020 by pjmlp on Friday May 08, 2020 @01:39PM (#23117373)
Nowhere did I used the word trivial.

I wouldn't mind to contribute if paid accordingly.

Re:PCSX2 PS2 Emulator: Progress report Q3 2019 to Q1 2020 by shrewduser on Friday May 08, 2020 @07:28AM (#23113561)
Flutter only just did that the other day and it's because iOS is a huge part of their pitch as a cross platform framework.
Re:PCSX2 PS2 Emulator: Progress report Q3 2019 to Q1 2020 by pjmlp on Friday May 08, 2020 @08:43AM (#23114183)
Which doesn't invalidate the point that anyone that cares has already done the work.