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@redhat.com> Signed-off-by: Pierre Moreau <dev@pmoreau.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10256>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user