Skip to content

Commit

Permalink
Revert "GPU: support detection by EGLext"
Browse files Browse the repository at this point in the history
Works only for NVIDIA GPUs

This reverts commits 9ef8580 and 9342d74.
  • Loading branch information
CarterLi committed Dec 31, 2024
1 parent a378d2a commit aa63c4f
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 77 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion doc/json_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2041,7 +2041,6 @@
"pci",
"vulkan",
"opencl",
"eglext",
"opengl"
],
"default": "auto"
Expand Down
1 change: 0 additions & 1 deletion src/data/help.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 0 additions & 5 deletions src/detection/gpu/gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion src/detection/gpu/gpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
62 changes: 0 additions & 62 deletions src/detection/gpu/gpu_eglext.c

This file was deleted.

5 changes: 0 additions & 5 deletions src/modules/gpu/gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
{},
});
Expand Down Expand Up @@ -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 },
{},
});
Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/modules/gpu/option.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit aa63c4f

Please sign in to comment.