Hacker News new | past | comments | ask | show | jobs | submit login
More compute shaders (anteru.net)
70 points by tempodox on July 17, 2018 | hide | past | favorite | 5 comments



I'm not an expert, and in my opinion, I'm hoping the industry focuses more on the software tooling to utilize hardware accelerated compute power better. In my limited experience, the "tool chain" is overly complicated.


Nice post! Is there a way to directly use uniform variables in e.g. OpenCL, or is it up to the kernel compiler to determine that some variable is wavefront- or group-invariant?


I'm only skim-reading but it tastes like OpenCL's '__local' address-space qualifier

https://www.khronos.org/registry/OpenCL/sdk/2.1/docs/man/xht...


__local is meant to describe memory shared across the whole workgroup meaning each operation is visible to all SIMD lanes. Uniform are variables that have are only visible to one lane but can be proven to have the same value for all SIMD lanes.

In general it is up to the compiler to decide what variables are uniform as it is pretty easy for user to get it wrong. Metal shader language as a uniform marker: uniform<int> i = …;

Metal spec: https://developer.apple.com/metal/Metal-Shading-Language-Spe...


Oh yes, I suppose that might work. I've been using lots of local memory for facilitating communication and caching, but never made the connection that the compiler might map non-addressed local variables to uniforms.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: