rusticl: add -cl-std only when it's not defined
This fixes piglit "Invalid CL Version Declaration" test.
Fixes: fc30fe2c11
("rusticl/kernel: add missing preprocessor definitions")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29638>
This commit is contained in:
@@ -26,11 +26,6 @@ api@clgetkernelarginfo,Fail
|
||||
# Failed (error code: CL_SUCCESS): Trigger CL_LINK_PROGRAM_FAILURE if there is a failure to link the compiled binaries and/or libraries.
|
||||
api@cllinkprogram,Fail
|
||||
|
||||
# input.cl:31:2: error: use of undeclared identifier 'double2'; did you mean 'double'?
|
||||
# [...]
|
||||
# Program built when it should have failed: CL_SUCCESS
|
||||
program@build@fail@invalid-version-declaration,Fail
|
||||
|
||||
# "input.cl:8:10: fatal error: 'include_test.h' file not found"
|
||||
# build-piglit.sh removes all the *.[ch] files from the piglit tree, so it's a Mesa CI bug.
|
||||
program@build@include-directories,Fail
|
||||
|
@@ -298,7 +298,7 @@ pub struct ProgramDevBuild {
|
||||
|
||||
fn prepare_options(options: &str, dev: &Device) -> Vec<CString> {
|
||||
let mut options = options.to_owned();
|
||||
if !options.contains("-cl-std=CL") {
|
||||
if !options.contains("-cl-std=") {
|
||||
options.push_str(" -cl-std=CL");
|
||||
options.push_str(dev.clc_version.api_str());
|
||||
}
|
||||
|
Reference in New Issue
Block a user