mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-21 07:40:38 +02:00
clc: wire up cl_khr_kernel_clock
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35179>
This commit is contained in:
parent
63758bc093
commit
f5a9a80f29
2 changed files with 6 additions and 0 deletions
|
|
@ -63,6 +63,7 @@ struct clc_optional_features {
|
|||
bool images_write_3d;
|
||||
bool integer_dot_product;
|
||||
bool intel_subgroups;
|
||||
bool kernel_clock;
|
||||
/* OpenCL core subgroups */
|
||||
bool subgroups;
|
||||
/* OpenCL extension cl_khr_subgroups, which requires independent forward
|
||||
|
|
|
|||
|
|
@ -1001,6 +1001,11 @@ clc_compile_to_llvm_module(LLVMContext &llvm_ctx,
|
|||
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("+cl_intel_subgroups");
|
||||
needs_opencl_c_h = true;
|
||||
}
|
||||
if (args->features.kernel_clock && LLVM_VERSION_MAJOR >= 19) {
|
||||
c->getPreprocessorOpts().addMacroDef("cl_khr_kernel_clock=1");
|
||||
c->getPreprocessorOpts().addMacroDef("__opencl_c_kernel_clock_scope_device=1");
|
||||
c->getPreprocessorOpts().addMacroDef("__opencl_c_kernel_clock_scope_sub_group=1");
|
||||
}
|
||||
if (args->features.subgroups) {
|
||||
c->getTargetOpts().OpenCLExtensionsAsWritten.push_back("+__opencl_c_subgroups");
|
||||
if (args->features.subgroups_shuffle) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue