SWDEV-132637: Remove OpenCL cl_khr_depth_images workaround that is not needed anymore
The cl_khr_depth_images associated macro definition is defined twice in the compiler: in opencl-c.h and automatically by the compiler deduced from the cl-ext list. These two co-exist and there is no need to remove cl_khr_depth_images from the cl-ext list. If we remove cl_khr_depth_images from the cl-ext list, and we do not include opencl-c.h the macro is not defined. This fixes conformance test ./test_compiler compiler_defines_for_extensions when using Comgr with -include opencl-c-base.h -fdeclare-opencl-builtins without including opencl-c.h. Before we got the error `ERROR: Supported extension cl_khr_depth_images not defined in kernel` This change is needed to eventually get rid of the opencl-c.pch that is embedded in comgr, and that makes implementing a compilation cache in comgr hard. Change-Id: I76497874ebe7163966420d4ac23a0788b93a36fd
Αυτή η υποβολή περιλαμβάνεται σε:
υποβλήθηκε από
Juan MartinezFernandez
γονέας
33e48b9629
υποβολή
8c9e6d0fa5
@@ -1964,13 +1964,6 @@ std::vector<std::string> Program::ProcessOptions(amd::option::Options* options)
|
||||
std::vector<std::string> extensions(sit, end);
|
||||
|
||||
if (isLC()) {
|
||||
// FIXME_lmoriche: opencl-c.h defines 'cl_khr_depth_images', so
|
||||
// remove it from the command line. Should we fix opencl-c.h?
|
||||
auto found = std::find(extensions.begin(), extensions.end(), "cl_khr_depth_images");
|
||||
if (found != extensions.end()) {
|
||||
extensions.erase(found);
|
||||
}
|
||||
|
||||
if (!extensions.empty()) {
|
||||
std::ostringstream clext;
|
||||
|
||||
|
||||
Αναφορά σε νέο ζήτημα
Block a user