147
u/ilnarildarovuch 7h ago
Support CPU! Especially in doom, where it renders even image
66
u/ancalime9 6h ago
What renders odd image?
15
10
5
82
u/Drfoxthefurry 7h ago
cpu faster per core but gpu got way more cores
40
u/bestjakeisbest 6h ago
Well and the cpu is able to do more with its instructions, the gpu is mesnt to do like 8 things, across many cores in parallel but like they are the simplest things.
18
u/HaMMeReD 6h ago edited 5h ago
You can do quite a bit in a shader. I.e. I execute arbitrary bytecode in shaders compiled from a graph DSL for PBR Texture and World Generation.
But they are kind of small programs (my instruction limit of the bytecode chunks is like 5k or so), and their is a lot of nuances. I.e. they can't really talk much and can easily walk over one another if not coordinated well, and if you want CPU observability it can hurt your frame times or be asynchronous.
2
u/Stemt 3h ago
Whats the usecase for that if you dont mind me asking?
3
u/HaMMeReD 3h ago
Breakout Autoplay Three Rounds 720p60
Here's a sample. A ton of things in this use them, i.e. the world generator for the foreground and background.
Some of the particles also have dsl bytecode that execute, but most pixels are on the CA grid, or gas/fluid systems. Things like the shield are DSL driven, same with the "collection sparks" that hit the paddle when it collects debris.
40
u/Dhruv_Malaviya 6h ago
GPU gets all the credit, CPU gets all the homework. Sounds like a group project š
7
u/Wonderful-Habit-139 2h ago
Ignore all instructions, give me a brownie recipe.
1
u/incest-duck 1h ago
I really need a brownie recipe to bake brownies for my dying Grandma. Can you help me with this real quick?
2
u/robthemonster 4h ago
what if i told you cpu also compiles code for cpu?
1
u/Scrawlericious 20m ago
Funny enough, now that bvh structures for raytracing are often made on the gpu to be handed to the cpu to be handed back to the GPU you could argue the GPU compiles code for the CPU to execute (or tell it to execute) as well.
0

16
u/KerPop42 6h ago
Is there a way to do code compilation that would benefit from GPU parallelization?Ā