[PATCH xserver 4/4] glx: Implement GLX_EXT_fbconfig_packed_float

Adam Jackson ajax at redhat.com
Thu Mar 10 18:25:06 UTC 2016


The tokens for this are already defined by GLX_ARB_fbconfig_float, which
we already support, so just add the extension to the list and let the
driver provide those configs if it wants.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 glx/extension_string.c | 1 +
 glx/extension_string.h | 1 +
 glx/glxdri2.c          | 6 ++++++
 glx/glxdriswrast.c     | 1 +
 4 files changed, 9 insertions(+)

diff --git a/glx/extension_string.c b/glx/extension_string.c
index c3ddc4c..616c793 100644
--- a/glx/extension_string.c
+++ b/glx/extension_string.c
@@ -82,6 +82,7 @@ static const struct extension_info known_glx_extensions[] = {
 
     { GLX(EXT_create_context_es_profile), VER(0,0), N, },
     { GLX(EXT_create_context_es2_profile), VER(0,0), N, },
+    { GLX(EXT_fbconfig_packed_float),   VER(0,0), N, },
     { GLX(EXT_framebuffer_sRGB),        VER(0,0), N, },
     { GLX(EXT_import_context),          VER(0,0), Y, },
     { GLX(EXT_stereo_tree),             VER(0,0), N, },
diff --git a/glx/extension_string.h b/glx/extension_string.h
index c1df91b..425a805 100644
--- a/glx/extension_string.h
+++ b/glx/extension_string.h
@@ -45,6 +45,7 @@ enum {
     ARB_multisample_bit,
     EXT_create_context_es_profile_bit,
     EXT_create_context_es2_profile_bit,
+    EXT_fbconfig_packed_float_bit,
     EXT_import_context_bit,
     EXT_stereo_tree_bit,
     EXT_texture_from_pixmap_bit,
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 89ad808..58e60b9 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -895,6 +895,12 @@ initializeExtensions(__GLXDRIscreen * screen)
         LogMessage(X_INFO, "AIGLX: enabled GLX_ARB_fbconfig_float\n");
     }
 
+    /* enable EXT_fbconfig_packed_float (even if there are no packed float fbconfigs) */
+    {
+        __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_fbconfig_packed_float");
+        LogMessage(X_INFO, "AIGLX: enabled GLX_EXT_fbconfig_packed_float\n");
+    }
+
     for (i = 0; extensions[i]; i++) {
         if (strcmp(extensions[i]->name, __DRI_READ_DRAWABLE) == 0) {
             __glXEnableExtension(screen->glx_enable_bits,
diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c
index be00f5f..924067c 100644
--- a/glx/glxdriswrast.c
+++ b/glx/glxdriswrast.c
@@ -413,6 +413,7 @@ initializeExtensions(__GLXDRIscreen * screen)
     /* these are harmless to enable unconditionally */
     __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_framebuffer_sRGB");
     __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_fbconfig_float");
+    __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_fbconfig_packed_float");
     __glXEnableExtension(screen->glx_enable_bits, "GLX_SGI_make_current_read");
 
     extensions = screen->core->getExtensions(screen->driScreen);
-- 
2.5.0



More information about the xorg-devel mailing list