summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-09-17 11:16:46 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-09-17 18:30:23 +0200
commit55a7dd458102d63ba6c21a3a5ec7c3365653405e (patch)
treec19591f36acc84b1ff1aba9f8445d1d94bafbe43 /src
parentdfa303c9af3ed6af76a2cb588cd2f9c563ca1886 (diff)
rhi: Enhance compute dispatch docs
These docs are not part of the generated docs due to QRhi being private, but nonetheless keep it useful. Change-Id: Ic46aaa4cd329535c37fffcd514ba354dff4bfb5c Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/rhi/qrhi.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp
index aff3494284..06c3903b0c 100644
--- a/src/gui/rhi/qrhi.cpp
+++ b/src/gui/rhi/qrhi.cpp
@@ -5369,6 +5369,18 @@ void QRhiCommandBuffer::setComputePipeline(QRhiComputePipeline *ps)
\note This function can only be called inside a compute pass, meaning
between a beginComputePass() and endComputePass() call.
+
+ \note \a x, \a y, and \a z must fit the limits from the underlying graphics
+ API implementation at run time. The maximum values are typically 65535.
+
+ \note Watch out for possible limits on the local workgroup size as well.
+ This is specified in the shader, for example: \c{layout(local_size_x = 16,
+ local_size_y = 16) in;}. For example, with OpenGL the minimum value mandated
+ by the specification for the number of invocations in a single local work
+ group (the product of \c local_size_x, \c local_size_y, and \c local_size_z)
+ is 1024, while with OpenGL ES (3.1) the value may be as low as 128. This
+ means that the example given above may be rejected by some OpenGL ES
+ implementations as the number of invocations is 256.
*/
void QRhiCommandBuffer::dispatch(int x, int y, int z)
{