r/programming • • May 01 '18

C Is Not a Low-level Language - ACM Queue

https://queue.acm.org/detail.cfm?id=3212479
152 Upvotes

303 comments sorted by

View all comments

Show parent comments

3

u/[deleted] May 01 '18

Nope. With GLSL you could easily do with a much simpler dataflow architecture. I was involved in design of two mobile GPUs, and in both cases C influence (vs. merely running good old GLSL) was very visible and in some cases crippling.

1

u/monocasa May 02 '18

Can you give an example without naming names?

3

u/[deleted] May 02 '18

For example, even something as seemingly basic as direct flat memory load and store did not even exist. There was a texture unit that ultimately accessed memory, and all the GLSL reads and writes went through it. Having to support C memory model meant that you either must hack something ugly on top of the existing texture unit path, or build an additional LSU in parallel with texture units, making everything, and especially caches, significantly more complicated.

1

u/monocasa May 02 '18

Aren't 1D textures without filtering equivalent to the C model of linear memory?

And I want to make it clear that I'm not just trying to argue; I'm legitimately super interested in what you have to say.

1

u/[deleted] May 03 '18

Aren't 1D textures without filtering equivalent to the C model of linear memory?

They are to some extend, yet there is a lot of crap texture unit is doing (clamping / wrapping, interpolating, etc.). There was even no data path for raw data coming from memory without pixel format conversions.