News for hackers. Stuff that matters.
Re:Krita, OpenGL and Qt by zanny on Saturday July 18, 2020 @01:15PM (#23882915)
Meanwhile we have been compiling the same C and above code for mips, arm, power, x86, and riscv for decades in portable ways while still getting performant code.

Now to be fair GPUs have a legacy of slowly becoming generic processors whereas 10+ years ago they were largely fixed function hardware. Writing generic code for a GPU today is totally sensible because it supports most arithmetic, primitive types, branching, etc.

But there is nothing stopping you from optimizing your compiler for glsl any more than optimizing your platform specific custom vendor compiler for C.

Re:Krita, OpenGL and Qt by vbezhenar on Saturday July 18, 2020 @03:06PM (#23883911)
You still write performance-critical code using assembly language. C compiler is not ideal.