From 8c9e6d0fa5ca7e462a4257a9f9c18cc8158f07c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Thu, 23 Jan 2025 14:49:12 +0100 Subject: [PATCH] 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 --- rocclr/device/devprogram.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/rocclr/device/devprogram.cpp b/rocclr/device/devprogram.cpp index 374ad2315b..0fdaccc8bd 100644 --- a/rocclr/device/devprogram.cpp +++ b/rocclr/device/devprogram.cpp @@ -1964,13 +1964,6 @@ std::vector Program::ProcessOptions(amd::option::Options* options) std::vector 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;