clc: add new feature options for intel_clc
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17253>
This commit is contained in:

committed by
Marge Bot

parent
2e895f8b04
commit
cf44282deb
@@ -50,11 +50,14 @@ enum clc_spirv_version {
|
||||
};
|
||||
|
||||
struct clc_optional_features {
|
||||
bool fp16;
|
||||
bool fp64;
|
||||
bool int64;
|
||||
bool images;
|
||||
bool images_read_write;
|
||||
bool images_write_3d;
|
||||
bool intel_subgroups;
|
||||
bool subgroups;
|
||||
};
|
||||
|
||||
struct clc_compile_args {
|
||||
|
@@ -871,6 +871,9 @@ clc_compile_to_llvm_module(LLVMContext &llvm_ctx,
|
||||
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("+cl_khr_global_int32_extended_atomics");
|
||||
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("+cl_khr_local_int32_base_atomics");
|
||||
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("+cl_khr_local_int32_extended_atomics");
|
||||
if (args->features.fp16) {
|
||||
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("+cl_khr_fp16");
|
||||
}
|
||||
if (args->features.fp64) {
|
||||
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("+cl_khr_fp64");
|
||||
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("+__opencl_c_fp64");
|
||||
@@ -889,6 +892,12 @@ clc_compile_to_llvm_module(LLVMContext &llvm_ctx,
|
||||
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("+cl_khr_3d_image_writes");
|
||||
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("+__opencl_c_3d_image_writes");
|
||||
}
|
||||
if (args->features.intel_subgroups) {
|
||||
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("+cl_intel_subgroups");
|
||||
}
|
||||
if (args->features.subgroups) {
|
||||
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("+cl_khr_subgroups");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (args->num_headers) {
|
||||
|
Reference in New Issue
Block a user