diff --git a/CMakeLists.txt b/CMakeLists.txt index a56d50c59..c2b57daaf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -354,7 +354,6 @@ set(LIBFASTFETCH_SRC src/detection/editor/editor.c src/detection/font/font.c src/detection/gpu/gpu.c - src/detection/gpu/gpu_eglext.c src/detection/media/media.c src/detection/netio/netio.c src/detection/opencl/opencl.c diff --git a/doc/json_schema.json b/doc/json_schema.json index 7f8f2288a..efb530e7d 100644 --- a/doc/json_schema.json +++ b/doc/json_schema.json @@ -2041,7 +2041,6 @@ "pci", "vulkan", "opencl", - "eglext", "opengl" ], "default": "auto" diff --git a/src/data/help.json b/src/data/help.json index 1f83e1834..481b3a3e2 100644 --- a/src/data/help.json +++ b/src/data/help.json @@ -1132,7 +1132,6 @@ "pci": "Search PCI devices, which do not requires GPU driver installed. Not supported on Windows and macOS", "vulkan": "Use Vulkan API. Slow and requires proper vulkan driver installed. Used for Android", "opencl": "Use OpenCL API. Slow and requires proper OpenCL driver installed", - "eglext": "Use extensions of EGL API. Slow but support multiple GPUs", "opengl": "Use OpenGL API. Slow and only detects one GPU" }, "default": "auto" diff --git a/src/detection/gpu/gpu.c b/src/detection/gpu/gpu.c index 7eb4dac22..86e16716d 100644 --- a/src/detection/gpu/gpu.c +++ b/src/detection/gpu/gpu.c @@ -114,11 +114,6 @@ const char* ffDetectGPU(const FFGPUOptions* options, FFlist* result) return NULL; } } - if (options->detectionMethod <= FF_GPU_DETECTION_METHOD_EGLEXT) - { - if (ffGPUDetectByEglext(result) == NULL) - return NULL; - } if (options->detectionMethod <= FF_GPU_DETECTION_METHOD_OPENGL) { if (detectByOpenGL(result) == NULL) diff --git a/src/detection/gpu/gpu.h b/src/detection/gpu/gpu.h index 5359b504b..0d5f3dc92 100644 --- a/src/detection/gpu/gpu.h +++ b/src/detection/gpu/gpu.h @@ -47,7 +47,6 @@ const char* ffDetectGPU(const FFGPUOptions* options, FFlist* result); const char* ffDetectGPUImpl(const FFGPUOptions* options, FFlist* gpus); const char* ffGPUGetVendorString(unsigned vendorId); -const char* ffGPUDetectByEglext(FFlist* gpus); #if defined(__linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__NetBSD__) || defined(__OpenBSD__) void ffGPUFillVendorAndName(uint8_t subclass, uint16_t vendor, uint16_t device, FFGPUResult* gpu); diff --git a/src/detection/gpu/gpu_eglext.c b/src/detection/gpu/gpu_eglext.c deleted file mode 100644 index 1fb7c672e..000000000 --- a/src/detection/gpu/gpu_eglext.c +++ /dev/null @@ -1,62 +0,0 @@ -#include "detection/gpu/gpu.h" -#include "common/library.h" - -#if defined(FF_HAVE_EGL) || __has_include() -#include -#include - -#ifndef EGL_RENDERER_EXT -#define EGL_RENDERER_EXT 0x335F -#endif -#ifndef EGL_DRIVER_NAME_EXT -#define EGL_DRIVER_NAME_EXT 0x335E -#endif - -const char* ffGPUDetectByEglext(FFlist* gpus) -{ - FF_LIBRARY_LOAD(egl, "dlopen libEGL" FF_LIBRARY_EXTENSION " failed", "libEGL" FF_LIBRARY_EXTENSION, 1); - FF_LIBRARY_LOAD_SYMBOL_MESSAGE(egl, eglGetProcAddress); - - PFNEGLQUERYDEVICESEXTPROC ffeglQueryDevicesEXT = (PFNEGLQUERYDEVICESEXTPROC) ffeglGetProcAddress("eglQueryDevicesEXT"); - if (!ffeglQueryDevicesEXT) - return "eglGetProcAddress(\"eglQueryDevicesEXT\") returned NULL"; - PFNEGLQUERYDEVICESTRINGEXTPROC ffeglQueryDeviceStringEXT = (PFNEGLQUERYDEVICESTRINGEXTPROC) ffeglGetProcAddress("eglQueryDeviceStringEXT"); - if (!ffeglQueryDeviceStringEXT) - return "eglGetProcAddress(\"eglQueryDeviceStringEXT\") returned NULL"; - - EGLDeviceEXT devs[32]; - EGLint numDevs; - if (ffeglQueryDevicesEXT(ARRAY_SIZE(devs), devs, &numDevs)) - { - for (EGLint i = 0; i < numDevs; i++) - { - const char* renderer = ffeglQueryDeviceStringEXT(devs[i], EGL_RENDERER_EXT); - if (!renderer) continue; - - FFGPUResult* gpu = (FFGPUResult*) ffListAdd(gpus); - ffStrbufInitS(&gpu->name, renderer); - ffStrbufInitS(&gpu->vendor, ffeglQueryDeviceStringEXT(devs[i], EGL_VENDOR)); - ffStrbufInitS(&gpu->driver, ffeglQueryDeviceStringEXT(devs[i], EGL_DRIVER_NAME_EXT)); - gpu->index = FF_GPU_INDEX_UNSET; - gpu->coreCount = FF_GPU_CORE_COUNT_UNSET; - gpu->coreUsage = FF_GPU_CORE_USAGE_UNSET; - gpu->temperature = FF_GPU_TEMP_UNSET; - gpu->frequency = FF_GPU_FREQUENCY_UNSET; - gpu->type = FF_GPU_TYPE_UNKNOWN; - gpu->dedicated.total = gpu->dedicated.used = gpu->shared.total = gpu->shared.used = FF_GPU_VMEM_SIZE_UNSET; - gpu->deviceId = 0; - ffStrbufInitStatic(&gpu->platformApi, "EGLext"); - } - } - - return NULL; -} - -#else - -const char* ffGPUDetectByEglext(FF_MAYBE_UNUSED FFlist* gpus) -{ - return "fastfetch was compiled without egl support"; -} - -#endif diff --git a/src/modules/gpu/gpu.c b/src/modules/gpu/gpu.c index 124487918..887a8a899 100644 --- a/src/modules/gpu/gpu.c +++ b/src/modules/gpu/gpu.c @@ -165,7 +165,6 @@ bool ffParseGPUCommandOptions(FFGPUOptions* options, const char* key, const char { "pci", FF_GPU_DETECTION_METHOD_PCI }, { "vulkan", FF_GPU_DETECTION_METHOD_VULKAN }, { "opencl", FF_GPU_DETECTION_METHOD_OPENCL }, - { "eglext", FF_GPU_DETECTION_METHOD_EGLEXT }, { "opengl", FF_GPU_DETECTION_METHOD_OPENGL }, {}, }); @@ -222,7 +221,6 @@ void ffParseGPUJsonObject(FFGPUOptions* options, yyjson_val* module) { "pci", FF_GPU_DETECTION_METHOD_PCI }, { "vulkan", FF_GPU_DETECTION_METHOD_VULKAN }, { "opencl", FF_GPU_DETECTION_METHOD_OPENCL }, - { "eglext", FF_GPU_DETECTION_METHOD_EGLEXT }, { "opengl", FF_GPU_DETECTION_METHOD_OPENGL }, {}, }); @@ -282,9 +280,6 @@ void ffGenerateGPUJsonConfig(FFGPUOptions* options, yyjson_mut_doc* doc, yyjson_ case FF_GPU_DETECTION_METHOD_OPENCL: yyjson_mut_obj_add_str(doc, module, "detectionMethod", "opencl"); break; - case FF_GPU_DETECTION_METHOD_EGLEXT: - yyjson_mut_obj_add_str(doc, module, "detectionMethod", "eglext"); - break; case FF_GPU_DETECTION_METHOD_OPENGL: yyjson_mut_obj_add_str(doc, module, "detectionMethod", "opengl"); break; diff --git a/src/modules/gpu/option.h b/src/modules/gpu/option.h index 7c52d3a0d..98362940b 100644 --- a/src/modules/gpu/option.h +++ b/src/modules/gpu/option.h @@ -18,7 +18,6 @@ typedef enum __attribute__((__packed__)) FFGPUDetectionMethod FF_GPU_DETECTION_METHOD_PCI, FF_GPU_DETECTION_METHOD_VULKAN, FF_GPU_DETECTION_METHOD_OPENCL, - FF_GPU_DETECTION_METHOD_EGLEXT, FF_GPU_DETECTION_METHOD_OPENGL, } FFGPUDetectionMethod;