From 55a7dd458102d63ba6c21a3a5ec7c3365653405e Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 17 Sep 2020 11:16:46 +0200 Subject: [PATCH] rhi: Enhance compute dispatch docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/gui/rhi/qrhi.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) {