diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h
index 0f45c29b..1d1c530c 100644
--- a/include/libcamera/internal/egl.h
+++ b/include/libcamera/internal/egl.h
@@ -164,5 +164,7 @@ private:
 		PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR;
 		PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR;
 	} vtable_ = {};
+
+	void locateProcAddresses(VTable *vtable);
 };
 } //namespace libcamera
diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp
index 1a0b6c37..df5b542d 100644
--- a/src/libcamera/egl.cpp
+++ b/src/libcamera/egl.cpp
@@ -417,23 +417,7 @@ int eGL::initEGLContext()
 	for (auto &&extName : utils::split(eglExtensions, " "))
 		eglExtensions_.insert(std::move(extName));
 
-	vtable.eglCreateImageKHR = (PFNEGLCREATEIMAGEKHRPROC)eglGetProcAddress("eglCreateImageKHR");
-	if (!vtable.eglCreateImageKHR) {
-		LOG(eGL, Error) << "eglCreateImageKHR not found";
-		return -ENODEV;
-	}
-
-	vtable.eglDestroyImageKHR = (PFNEGLDESTROYIMAGEKHRPROC)eglGetProcAddress("eglDestroyImageKHR");
-	if (!vtable.eglDestroyImageKHR) {
-		LOG(eGL, Error) << "eglDestroyImageKHR not found";
-		return -ENODEV;
-	}
-
-	vtable.glEGLImageTargetTexture2DOES = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)eglGetProcAddress("glEGLImageTargetTexture2DOES");
-	if (!vtable.glEGLImageTargetTexture2DOES) {
-		LOG(eGL, Error) << "glEGLImageTargetTexture2DOES not found";
-		return -ENODEV;
-	}
+	locateProcAddresses(&vtable);
 
 	if (eglChooseConfig(display_, configAttribs, &config, 1, &numConfigs) != EGL_TRUE) {
 		LOG(eGL, Error) << "eglChooseConfig fail";
@@ -562,6 +546,29 @@ void eGL::makeCurrent()
 	}
 }
 
+/**
+ * \brief Gets the addresses for EGL extension functions
+ * \param[in,out] vtable VTable to store the function addresses
+ *
+ * Locates the relevant runtime function addresses needed to fill the VTable.
+ * This does not fail when a function pointer is not found, nor does it validate
+ * the functions are available for the GL context, so it is also expected to
+ * also check the extension availability.
+ */
+void eGL::locateProcAddresses(VTable *vtable)
+{
+#define GET_PROC_ADDRESS(location, name) ({                                       \
+	location = reinterpret_cast<decltype(location)>(eglGetProcAddress(name)); \
+	if (!location) {                                                          \
+		LOG(eGL, Debug) << name << " not found";                          \
+	}                                                                         \
+})
+
+	GET_PROC_ADDRESS(vtable->eglCreateImageKHR, "eglCreateImageKHR");
+	GET_PROC_ADDRESS(vtable->eglDestroyImageKHR, "eglDestroyImageKHR");
+	GET_PROC_ADDRESS(vtable->glEGLImageTargetTexture2DOES, "glEGLImageTargetTexture2DOES");
+}
+
 /**
  * \brief Add a preprocessor definition to shader environment
  * \param[in,out] shaderEnv Vector of shader environment strings
