[Mesa-dev] [PATCH 3/6] Float fbconfigs exchange patch [3/6] Extension string enabling.

Czarnowski, Daniel daniel.czarnowski at intel.com
Thu Oct 17 23:07:33 CEST 2013


>From 762d184225d5f4c6c46ff302725063483ebd8bf0 Mon Sep 17 00:00:00 2001
From: Daniel Czarnowski <daniel.czarnowski at intel.com>
Date: Thu, 17 Oct 2013 12:27:15 +0200
Subject: [PATCH] Enables the fbconfig_float extension in list of supported
extensions, and adds it to known extensions table.

---
glx/extension_string.c |    5 +++++
glx/extension_string.h |    1 +
glx/glxdri2.c          |   10 ++++++++++
3 files changed, 16 insertions(+)

diff --git a/glx/extension_string.c b/glx/extension_string.c
index 58f930f..1b2c7d9 100644
--- a/glx/extension_string.c
+++ b/glx/extension_string.c
@@ -65,6 +65,10 @@ struct extension_info {
     unsigned char driver_support;
};
+/**
+ * List of known GLX Extensions.
+ * The last Y/N switch informs whether the support of this extension is always enabled.
+ */
static const struct extension_info known_glx_extensions[] = {
/*   GLX_ARB_get_proc_address is implemented on the client. */
     /* *INDENT-OFF* */
@@ -74,6 +78,7 @@ static const struct extension_info known_glx_extensions[] = {
     { GLX(ARB_framebuffer_sRGB),        VER(0,0), N, },
     { GLX(ARB_multisample),             VER(1,4), Y, },
+    { GLX(ARB_fbconfig_float),          VER(0,0), N, },
     { GLX(EXT_create_context_es2_profile), VER(0,0), N, },
     { GLX(EXT_framebuffer_sRGB),        VER(0,0), N, },
     { GLX(EXT_import_context),          VER(0,0), Y, },
diff --git a/glx/extension_string.h b/glx/extension_string.h
index 81b7de3..3bec1b1 100644
--- a/glx/extension_string.h
+++ b/glx/extension_string.h
@@ -41,6 +41,7 @@ enum {
     ARB_create_context_robustness_bit,
     ARB_framebuffer_sRGB_bit,
     ARB_multisample_bit,
+    ARB_fbconfig_float_bit,
     EXT_create_context_es2_profile_bit,
     EXT_import_context_bit,
     EXT_texture_from_pixmap_bit,
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 8a1fa41..2315761 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -634,6 +634,10 @@ __glXDRIscreenCreateContext(__GLXscreen * baseScreen,
     return &context->base;
}
+/**
+ * Initializes extensions flags in glx_enable_bits when a new screen is created.
+ * @param screen The screen where glx_enable_bits are to be set.
+ */
static void
__glXDRIinvalidateBuffers(DrawablePtr pDraw, void *priv, XID id)
{
@@ -889,6 +893,12 @@ initializeExtensions(__GLXDRIscreen * screen)
         LogMessage(X_INFO, "AIGLX: enabled GLX_EXT_framebuffer_sRGB\n");
     }
+    /* enable ARB_fbconfig_float extension (even if there are no float fbconfigs) */
+    {
+        __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_fbconfig_float");
+        LogMessage(X_INFO, "AIGLX: enabled GLX_ARB_fbconfig_float\n");
+    }
+
     for (i = 0; extensions[i]; i++) {
#ifdef __DRI_READ_DRAWABLE
         if (strcmp(extensions[i]->name, __DRI_READ_DRAWABLE) == 0) {
--
1.7.10.4

--------------------------------------------------------------------

Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.

Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131017/a5131f9d/attachment.html>


More information about the mesa-dev mailing list