diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h
index d3749d2e7..0e57678e8 100644
--- a/include/libcamera/internal/egl.h
+++ b/include/libcamera/internal/egl.h
@@ -146,5 +146,10 @@ private:
 	PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR;
 	PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR;
 	PFNGLGETSTRINGPROC glGetString;
+	PFNGLBEGINQUERYPROC glBeginQuery;
+	PFNGLENDQUERYPROC glEndQuery;
+	PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv;
+	PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectui64v;
+	PFNGLGENQUERIESPROC glGenQueries;
 };
 } //namespace libcamera
diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp
index 8d135e092..2fc10b800 100644
--- a/src/libcamera/egl.cpp
+++ b/src/libcamera/egl.cpp
@@ -390,6 +390,36 @@ int eGL::initEGLContext()
 		goto fail;
 	}
 
+	glBeginQuery = (PFNGLBEGINQUERYPROC)eglGetProcAddress("glBeginQuery");
+	if (!glBeginQuery) {
+		LOG(eGL, Error) << "glBegin not found";
+		goto fail;
+	}
+
+	glEndQuery = (PFNGLENDQUERYPROC)eglGetProcAddress("glEndQuery");
+	if (!glEndQuery) {
+		LOG(eGL, Error) << "glEndQuery not found";
+		goto fail;
+	}
+
+	glGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC)eglGetProcAddress("glGetQueryObjectuiv");
+	if (!glGetQueryObjectuiv) {
+		LOG(eGL, Error) << "glGetQueryObjectuiv not found";
+		goto fail;
+	}
+
+	glGetQueryObjectui64v = (PFNGLGETQUERYOBJECTUIVPROC)eglGetProcAddress("glGetQueryObjectui64v");
+	if (!glGetQueryObjectuiv) {
+		LOG(eGL, Error) << "glGetQueryObjectui64v not found";
+		goto fail;
+	}
+
+	glGenQueries = (PFNGLGENQUERIESPROC)eglGetProcAddress("glGenQueries");
+	if (!glGetQueryObjectuiv) {
+		LOG(eGL, Error) << "glGenQueries not found";
+		goto fail;
+	}
+
 	if (eglChooseConfig(display_, configAttribs, &config, 1, &numConfigs) != EGL_TRUE) {
 		LOG(eGL, Error) << "eglChooseConfig fail";
 		goto fail;
