mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
rusticl/clc add integer_dot_prod feature macros
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23011>
This commit is contained in:
parent
40f1f25f56
commit
75555d0660
2 changed files with 9 additions and 0 deletions
|
|
@ -56,6 +56,7 @@ struct clc_optional_features {
|
|||
bool images;
|
||||
bool images_read_write;
|
||||
bool images_write_3d;
|
||||
bool integer_dot_product;
|
||||
bool intel_subgroups;
|
||||
bool subgroups;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -797,6 +797,14 @@ clc_compile_to_llvm_module(LLVMContext &llvm_ctx,
|
|||
"-U__SPIR__",
|
||||
"-U__SPIRV__",
|
||||
};
|
||||
|
||||
// llvm handles these extensions differently so we have to pass this flag instead to expose the clc functions
|
||||
if (args->features.integer_dot_product) {
|
||||
clang_opts.push_back("-Dcl_khr_integer_dot_product=1");
|
||||
clang_opts.push_back("-D__opencl_c_integer_dot_product_input_4x8bit_packed=1");
|
||||
clang_opts.push_back("-D__opencl_c_integer_dot_product_input_4x8bit=1");
|
||||
}
|
||||
|
||||
// We assume there's appropriate defines for __OPENCL_VERSION__ and __IMAGE_SUPPORT__
|
||||
// being provided by the caller here.
|
||||
clang_opts.insert(clang_opts.end(), args->args, args->args + args->num_args);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue