PDA

View Full Version : Minor OpenGL ES 3.2 spec bug/question re: glDispatchCompute



inioinio
06-05-2017, 11:41 AM
I'm trying to figure out if it is legal to effectively cancel a glDispatchComputeIndirect call by zeroing one of the dimensions. Reading the OpenGL ES 3.2 spec, Chapter 17 paragraph 2 ends (emphasis mine):


One or more work groups is launched by calling:

which would seem to imply that requesting zero work groups could be an error, while paragraph 4 ends:


If the work group count in any dimension is zero, no work groups are dispatched.

which implies that it's not an error. I assume the "one or more" in the prior is an error and should read "zero or more", right?

GClements
06-05-2017, 01:33 PM
I assume the "one or more" in the prior is an error and should read "zero or more", right?
It's just a question of phrasing. You can't "launch" zero work groups.

You can use glDispatchComputeIndirect() to launch one or more work groups.
You can use glDispatchComputeIndirect() to do absolutely nothing, by calling it with one of the counts equal to zero.

The two cases are just phrased differently.