AnsweredAssumed Answered

[compute shader] why is the work group size specified inside the shader code (local_size_x)?!

Question asked by laobrasuca on Aug 13, 2012
Latest reply on Aug 27, 2012 by laobrasuca

hi all,


why?! specially given that in OpenCL it is declared during the application runtime (when calling clEnqueueNDRangeKernel()). In OpenGL, one is able to specify only the number of work groups during the application runtime (with glDispatchCompute()). We lose in flexibility by imposing it during the compute shader compilation time. Any evolution expected on this matter?


another question, is there any restriction on the value specified by local_size_x (layout qualifier) and num_groups_x (input of glDispatchCompute() )? Example, in OpenCL  global_work_size must be evenly divisible by local_work_size.