[Mesa-dev] [PATCH 1/6] Float fbconfigs exchange patch [1/6] Improved handling of renderType attribute in GLX structures.

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


>From bf60ddd081bd66d1364bf7973e664af46335dfd6 Mon Sep 17 00:00:00 2001
From: Daniel Czarnowski <daniel.czarnowski at intel.com>
Date: Wed, 16 Oct 2013 13:35:20 +0200
Subject: [PATCH] Support of GLX_RGBA*_FLOAT_BIT*, and correct setting of the
flags. Also commented each renderType use with information
which (fbconfig or context) RENDER_TYPE it is.

---
glx/createcontext.c |    2 ++
glx/glxext.h        |   15 +++++++++++++++
2 files changed, 17 insertions(+)

diff --git a/glx/createcontext.c b/glx/createcontext.c
index 13d21cc..41ecd11 100644
--- a/glx/createcontext.c
+++ b/glx/createcontext.c
@@ -68,6 +68,8 @@ validate_render_type(uint32_t render_type)
     switch (render_type) {
     case GLX_RGBA_TYPE:
     case GLX_COLOR_INDEX_TYPE:
+    case GLX_RGBA_FLOAT_TYPE_ARB:
+    case GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT:
         return True;
     default:
         return False;
diff --git a/glx/glxext.h b/glx/glxext.h
index 9b0978b..2d67af3 100644
--- a/glx/glxext.h
+++ b/glx/glxext.h
@@ -35,6 +35,21 @@
  * Silicon Graphics, Inc.
  */
+// doing #include <GL/glx.h> & #include <GL/glxext.h> could cause problems with
+// overlapping definitions, so let's use the easy way
+#ifndef GLX_RGBA_FLOAT_BIT_ARB
+#define GLX_RGBA_FLOAT_BIT_ARB             0x00000004
+#endif
+#ifndef GLX_RGBA_FLOAT_TYPE_ARB
+#define GLX_RGBA_FLOAT_TYPE_ARB            0x20B9
+#endif
+#ifndef GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT
+#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT    0x00000008
+#endif
+#ifndef GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT
+#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT   0x20B1
+#endif
+
extern GLboolean __glXFreeContext(__GLXcontext * glxc);
extern void __glXFlushContextCache(void);
--
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/8e2c259a/attachment-0001.html>


More information about the mesa-dev mailing list