Mesa (main): glx: Fix GLX_NV_float_buffer fbconfig handling
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Dec 16 22:36:56 UTC 2021
Module: Mesa
Branch: main
Commit: c77e5af7a36f9652d005c5ddf9c21e6c3cd6812d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c77e5af7a36f9652d005c5ddf9c21e6c3cd6812d
Author: Adam Jackson <ajax at redhat.com>
Date: Wed Jun 16 14:01:04 2021 -0400
glx: Fix GLX_NV_float_buffer fbconfig handling
Since we didn't record this attribute from the server, we wouldn't
account for it in glXChooseFBConfig, and glXGetFBConfigAttrib wouldn't
know about it.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14221>
---
src/glx/glxcmds.c | 1 +
src/glx/glxconfig.c | 4 +++-
src/glx/glxconfig.h | 3 +++
src/glx/glxext.c | 3 +++
4 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index 83d46755f18..e494abe92c1 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -1035,6 +1035,7 @@ fbconfigs_compatible(const struct glx_config * const a,
MATCH_MASK(drawableType);
MATCH_MASK(renderType);
MATCH_DONT_CARE(sRGBCapable);
+ MATCH_DONT_CARE(floatComponentsNV);
/* There is a bug in a few of the XFree86 DDX drivers. They contain
* visuals with a "transparent type" of 0 when they really mean GLX_NONE.
diff --git a/src/glx/glxconfig.c b/src/glx/glxconfig.c
index 925345567fb..f8dc3ce6086 100644
--- a/src/glx/glxconfig.c
+++ b/src/glx/glxconfig.c
@@ -186,10 +186,12 @@ glx_config_get(struct glx_config * mode, int attribute, int *value_return)
case GLX_Y_INVERTED_EXT:
*value_return = mode->yInverted;
return 0;
-
case GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT:
*value_return = mode->sRGBCapable;
return 0;
+ case GLX_FLOAT_COMPONENTS_NV:
+ *value_return = mode->floatComponentsNV;
+ return 0;
/* Applications are NOT allowed to query GLX_VISUAL_SELECT_GROUP_SGIX.
* It is ONLY for communication between the GLX client and the GLX
diff --git a/src/glx/glxconfig.h b/src/glx/glxconfig.h
index 132c5b28d45..009357ce271 100644
--- a/src/glx/glxconfig.h
+++ b/src/glx/glxconfig.h
@@ -99,6 +99,9 @@ struct glx_config {
/* EXT_framebuffer_sRGB */
GLint sRGBCapable;
+
+ /* NV_float_buffer */
+ GLint floatComponentsNV;
};
extern GLint _gl_convert_from_x_visual_type(int visualType);
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index 8930e866fa3..48a60ad35cc 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -612,6 +612,9 @@ __glXInitializeVisualConfigFromTags(struct glx_config * config, int count,
if (fbconfig_style_tags)
bp++;
break;
+ case GLX_FLOAT_COMPONENTS_NV:
+ config->floatComponentsNV = *bp++;
+ break;
case None:
i = count;
break;
More information about the mesa-commit
mailing list