diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-06-16 22:47:29 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-06-26 10:17:43 +0000 |
commit | 564b5623fb43fb863a25553d8c40fa9edb8fd9dc (patch) | |
tree | 4b918d559645a281b601ee39487ebff71b8682be | |
parent | 6a4af39f7490ec419a357f95092bfbfef42f0f91 (diff) |
Query and store the local size
Storing the local size becomes interesting for the Metal backend of
QRhi because there the Metal API needs the local size as well when
doing a dispatch.
Change-Id: I5cdf46d45c69bd24cd5c53aab53ca0c2b0d87b37
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-rw-r--r-- | src/shadertools/qspirvshader.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shadertools/qspirvshader.cpp b/src/shadertools/qspirvshader.cpp index e81a2f9..092d657 100644 --- a/src/shadertools/qspirvshader.cpp +++ b/src/shadertools/qspirvshader.cpp @@ -269,6 +269,10 @@ void QSpirvShaderPrivate::processResources() shaderDescription = QShaderDescription(); QShaderDescriptionPrivate *dd = QShaderDescriptionPrivate::get(&shaderDescription); + dd->localSize[0] = glslGen->get_execution_mode_argument(spv::ExecutionModeLocalSize, 0); + dd->localSize[1] = glslGen->get_execution_mode_argument(spv::ExecutionModeLocalSize, 1); + dd->localSize[2] = glslGen->get_execution_mode_argument(spv::ExecutionModeLocalSize, 2); + spirv_cross::ShaderResources resources = glslGen->get_shader_resources(); for (const spirv_cross::Resource &r : resources.stage_inputs) { |