10.7 C
New York
Saturday, January 28, 2023

How to multithread, conceptually – Graphics and GPU Programming – GameDev.net

Please contact us if you have any trouble resetting your password.
frob said:
In games usually there are too few people who have the skills to implement them, those who know how to properly partition the problems and map them to a parallel solution. Typically those people will implement a basic task-based system and throw them to the masses.
Yeah, but it should not be like this. And i do not agree with the general assumption that MT is hard, and only experts could do it without bugs, which would be almost impossible to find.
No. It’s not hard, but is how modern HW works. So everybody should use it. And to get there it should be easy to use. Now i don’t say C++ threading is not enough, but features like std::async are mostly useless because they generate a new thread for every async task. (though, maybe i got some things wrong.) The current features are mostly high level concepts, making the topic appearing more complex than it is because you need to understand the concepts first, and compromising performance as well.
A simple and standard job system would be a much better tool. (Afaik this is announced for future standards, but not there yet or i’ve missed it.)
Basically what i want is to make parallel programming the standard way of programming, instead keeping it a matter of experts and seniors only. HW has changed, programmers and languages need to change too.
On CPU the situation is not that bad at all, but on GPU it could not be any worse. We still have no cross platform / cross vendor standard, although even phones have GPUs. Everybody has the HW, but only a minority of programmers actually uses it.
Now we could argue that parallel programming is rarely applicable, so there is no need to make it more accessible.
But to me it feels more like the opposite: I could use it for almost everything i do, but due to obstacles, i do it only for the important things.
And the obstacles are not my failure to imagine what side effects multiple programs running at the same time might cause, the obstacles are only because parallel programming is hardly accessible as a tool.


Related Articles


Please enter your comment!
Please enter your name here

Latest Articles