(Compute shader dispatch)!
6, Apr, 2020OpenGL has compute shader functionality built for some time. Regardless of the funcitonality itself, you may dispatch 3d grid of shader workgroups - that is nx * ny *nz. This probably was designed to easy texture and voxel data computations tasks. No more index to 2/3D indices calculation. For 1D problems, in theory, one may set nx=n, ny=1, nz=1. But only in theory. In practice 1D data may be large, and OpenGL gives you limits on number of work groups in each direction. The limits are platform dependent, with 65536 as a minimum portable value required. This is much less than any 1D data that anybody would like to put to GPU in first place. So, trivial index calculation for one set of operations was exchanged to not so trivial closest integer factorization problem for other.
- Posted by michal in
- Add a comment