There is no defensible reason why SIMD code should be harder to write than scalar code. GLSL has been around since 2004 and in GLSL it’s easier to write vector code than scalar code.
-
-
Replying to @pcwalton
Is this because of the affordances of the language?
1 reply 0 retweets 0 likes -
Replying to @TedMielczarek
It’s because GLSL puts a lot of effort into ergonomics of vector code. The syntactic sugar runs in the right direction: you want to write vector code because it’s easy, not just because it’s fast.
1 reply 0 retweets 5 likes -
Replying to @pcwalton @TedMielczarek
Actually, it’s ironic because shader-level vector code typically isn’t any faster than scalar code on modern GPUs. Modern GPUs just convert shader code to scalar and parallelize across vertices/fragments/compute work units.
2 replies 0 retweets 0 likes
Replying to @pcwalton @TedMielczarek
Even though it’s not faster anymore, though, GLSL’s vector syntax is really great just for readability.
11:19 AM - 14 Nov 2019
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.