clc: plumb cl_khr_subgroup_ballot

although rusticl isn't lighting it up yet, it's helpful to get
sub_group_ballot for driver CL, which is all standard Vulkan-compatible spirv.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
This commit is contained in:
Alyssa Rosenzweig 2024-12-12 07:16:31 -05:00 committed by Marge Bot
parent d4a54d4f92
commit 13b8af95fb
2 changed files with 4 additions and 0 deletions

View file

@ -71,6 +71,7 @@ struct clc_optional_features {
bool subgroups_ifp;
bool subgroups_shuffle;
bool subgroups_shuffle_relative;
bool subgroups_ballot;
};
struct clc_compile_args {

View file

@ -1001,6 +1001,9 @@ clc_compile_to_llvm_module(LLVMContext &llvm_ctx,
if (args->features.subgroups_shuffle_relative) {
c->getPreprocessorOpts().addMacroDef("cl_khr_subgroup_shuffle_relative=1");
}
if (args->features.subgroups_ballot) {
c->getPreprocessorOpts().addMacroDef("cl_khr_subgroup_ballot=1");
}
}
if (args->features.subgroups_ifp) {
assert(args->features.subgroups);