mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-09 23:08:18 +02:00
rusticl/program: set __OPENCL_C_VERSION__ ourselves
Reviewed-by: @LingMan Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42021>
This commit is contained in:
parent
7aa9a36ade
commit
6abe48d835
1 changed files with 8 additions and 0 deletions
|
|
@ -400,6 +400,14 @@ impl CompileOptions {
|
|||
ver => args.push(c"-cl-std=CL".concat(ver.api_cstr())),
|
||||
}
|
||||
|
||||
// We set this define ourselves, so that we don't rely on clang to set it properly as 3.1
|
||||
// is still quite new and we can't rely on users having a clang that supports this.
|
||||
if clc_ver >= CLVersion::Cl3_1 {
|
||||
args.push(c"-U__OPENCL_C_VERSION__".to_owned());
|
||||
args.push(c"-D__OPENCL_C_VERSION__=".concat(clc_ver.clc_str()));
|
||||
args.push(c"-DCL_VERSION_3_1=310".to_owned());
|
||||
}
|
||||
|
||||
args
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue