[client] egl: use new util_hasGLExt helper to check extensions

We previously used strstr, which can be prone to false positives when
the name of one extension is a substring of another extension.

This commit creates the helper function util_hasGLExt, which asserts
that the substring found in extension list is bounded by either spaces
or the beginning/end of the string.
This commit is contained in:
Quantum
2021-05-13 16:36:01 -04:00
committed by Geoffrey McRae
parent edbd6f6ade
commit f9a9953071
8 changed files with 47 additions and 7 deletions

View File

@@ -698,7 +698,7 @@ bool egl_render_startup(void * opaque)
if (g_egl_dynProcs.glEGLImageTargetTexture2DOES)
{
if (strstr(client_exts, "EGL_EXT_image_dma_buf_import") != NULL)
if (util_hasGLExt(client_exts, "EGL_EXT_image_dma_buf_import"))
{
/*
* As of version 455.45.01 NVidia started advertising support for this