Mesa (main): glx/dri2: Stop tracking the protocol version in the display state
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jul 12 19:22:38 UTC 2022
Module: Mesa
Branch: main
Commit: 11c30fcad01cc3666c641630dd3204d665a96229
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=11c30fcad01cc3666c641630dd3204d665a96229
Author: Adam Jackson <ajax at redhat.com>
Date: Wed Jul 6 10:22:39 2022 -0400
glx/dri2: Stop tracking the protocol version in the display state
We only use it at init time, no need to keep it around.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17422>
---
src/glx/dri2_glx.c | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 5624e24be5e..e75ee2b7d38 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -63,13 +63,6 @@ struct dri2_display
{
__GLXDRIdisplay base;
- /*
- ** XFree86-DRI version information
- */
- int driMajor;
- int driMinor;
- int driPatch;
-
__glxHashTable *dri2Hash;
const __DRIextension *loader_extensions[5];
@@ -1321,6 +1314,7 @@ dri2CreateDisplay(Display * dpy)
{
struct dri2_display *pdp;
int eventBase, errorBase, i;
+ int driMajor, driMinor;
if (!DRI2QueryExtension(dpy, &eventBase, &errorBase))
return NULL;
@@ -1329,18 +1323,12 @@ dri2CreateDisplay(Display * dpy)
if (pdp == NULL)
return NULL;
- if (!DRI2QueryVersion(dpy, &pdp->driMajor, &pdp->driMinor)) {
- free(pdp);
- return NULL;
- }
-
- if (pdp->driMinor < 3) {
+ if (!DRI2QueryVersion(dpy, &driMajor, &driMinor) ||
+ driMinor < 3) {
free(pdp);
return NULL;
}
- pdp->driPatch = 0;
-
pdp->base.destroyDisplay = dri2DestroyDisplay;
pdp->base.createScreen = dri2CreateScreen;
More information about the mesa-commit
mailing list