4 ms·
Shader units --- e.g. the VideoCore's QPUs, which this project is targeting --- are very very weird. Compiling C into them basically isn't possible. They don't
by david-given 11y ago
Shader units --- e.g. the VideoCore's QPUs, which this project is targeting --- are very very weird. Compiling C into them basically isn't possible. They don't really do memory accesses, for example.
The VideoCore's own processor, commonly referred to as the VPU or just the VC4, is a perfectly normal architecture with its own vector unit and DSP addons. C can compile into that perfectly easily, and the real-time OS that runs on it alongside Linux is written in it, but there aren't any adequate open source C compilers yet.
More info on the QPU here:
https://github.com/hermanhermitage/videocoreiv-qpu https://github.com/hermanhermitage/videocoreiv-qpu
- SeanDav 11y agoDisclaimer: I know nothing about the issues, but would using C with inline assembly gain anything?
- belleandsebasti 11y agoNo. Inline assembly is a static construct targeting the same compute unit as the C code during compile-time. What is needed is "runtime inline assembly" which assembles inline assembly for a different target architecture at runtime. This is essentially what shader programs are and you don't need special syntax to support it. Just store your shader program in a char* and bundle an assembler/compiler with your host program.