Mesa (main): clover/spirv: Increase max amount of function args
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Aug 3 17:25:25 UTC 2021
Module: Mesa
Branch: main
Commit: f69d1c1c56138093ccba2490b3c2b4fb359d43ec
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f69d1c1c56138093ccba2490b3c2b4fb359d43ec
Author: Pierre Moreau <dev at pmoreau.org>
Date: Thu May 21 18:48:22 2020 +0200
clover/spirv: Increase max amount of function args
OpenCL only has an upper limit on the size taken by all arguments to a
kernel (implementation-defined, but at least 1024 bytes), and not on the
count of those arguments.
This fixes OpenCL-CTS’s api.min_max_parameter_size.
v2: Use `numeric_limits<>::max()` instead of hardcoded value.
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Signed-off-by: Pierre Moreau <dev at pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10256>
---
src/gallium/frontends/clover/spirv/invocation.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/gallium/frontends/clover/spirv/invocation.cpp b/src/gallium/frontends/clover/spirv/invocation.cpp
index cec265d87ed..0723c088a1e 100644
--- a/src/gallium/frontends/clover/spirv/invocation.cpp
+++ b/src/gallium/frontends/clover/spirv/invocation.cpp
@@ -22,6 +22,7 @@
#include "invocation.hpp"
+#include <limits>
#include <unordered_map>
#include <unordered_set>
#include <vector>
@@ -857,8 +858,12 @@ clover::spirv::is_valid_spirv(const std::string &binary,
spvtools::SpirvTools spvTool(target_env);
spvTool.SetMessageConsumer(validator_consumer);
+ spvtools::ValidatorOptions validator_options;
+ validator_options.SetUniversalLimit(spv_validator_limit_max_function_args,
+ std::numeric_limits<uint32_t>::max());
+
return spvTool.Validate(reinterpret_cast<const uint32_t *>(binary.data()),
- binary.size() / 4u);
+ binary.size() / 4u, validator_options);
}
std::string
More information about the mesa-commit
mailing list