summaryrefslogtreecommitdiff
path: root/GL
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2007-01-04 15:01:38 -0800
committerIan Romanick <idr@us.ibm.com>2007-01-04 15:01:38 -0800
commit8dd5771a1b91c331860b667fb18e484452000aad (patch)
tree1e1f0d94d955be2d908bb3010be26b881130b95c /GL
parent45aa26ccb4f61c2919ce2475d0907c6e1b177da2 (diff)
parent7d2ec92170ebbdfa10a05734cb7cfaac97d19d65 (diff)
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver
Conflicts: GL/glx/indirect_dispatch_swap.c GL/glx/swap_interval.c
Diffstat (limited to 'GL')
-rw-r--r--GL/glx/indirect_dispatch_swap.c4
-rw-r--r--GL/glx/indirect_program.c15
-rw-r--r--GL/glx/indirect_texture_compression.c15
-rw-r--r--GL/glx/indirect_util.c18
-rw-r--r--GL/glx/swap_interval.c1
-rw-r--r--GL/mesa/X/xf86glx.c4
6 files changed, 14 insertions, 43 deletions
diff --git a/GL/glx/indirect_dispatch_swap.c b/GL/glx/indirect_dispatch_swap.c
index c0bb71cc4..db651543c 100644
--- a/GL/glx/indirect_dispatch_swap.c
+++ b/GL/glx/indirect_dispatch_swap.c
@@ -25,6 +25,10 @@
* SOFTWARE.
*/
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
#include <X11/Xmd.h>
#include <GL/gl.h>
#include <GL/glxproto.h>
diff --git a/GL/glx/indirect_program.c b/GL/glx/indirect_program.c
index 8d5f0e60f..d23a0a9e6 100644
--- a/GL/glx/indirect_program.c
+++ b/GL/glx/indirect_program.c
@@ -35,6 +35,7 @@
#endif
#include "glxserver.h"
+#include "glxbyteorder.h"
#include "glxext.h"
#include "singlesize.h"
#include "unpack.h"
@@ -46,20 +47,6 @@
#include "dispatch.h"
#include "glapioffsets.h"
-#if defined(__linux__) || defined (__GLIBC__) || defined (__GNU__)
-#include <byteswap.h>
-#elif defined(__OpenBSD__)
-#include <sys/endian.h>
-#define bswap_16 __swap16
-#define bswap_32 __swap32
-#define bswap_64 __swap64
-#else
-#include <sys/endian.h>
-#define bswap_16 bswap16
-#define bswap_32 bswap32
-#define bswap_64 bswap64
-#endif
-
static int DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte *pc,
unsigned get_programiv_offset, unsigned get_program_string_offset,
Bool do_swap);
diff --git a/GL/glx/indirect_texture_compression.c b/GL/glx/indirect_texture_compression.c
index 35af1d235..3c09663fc 100644
--- a/GL/glx/indirect_texture_compression.c
+++ b/GL/glx/indirect_texture_compression.c
@@ -29,6 +29,7 @@
#endif
#include "glxserver.h"
+#include "glxbyteorder.h"
#include "glxext.h"
#include "singlesize.h"
#include "unpack.h"
@@ -39,20 +40,6 @@
#include "glthread.h"
#include "dispatch.h"
-#if defined(__linux__) || defined (__GLIBC__) || defined (__GNU__)
-#include <byteswap.h>
-#elif defined(__OpenBSD__)
-#include <sys/endian.h>
-#define bswap_16 __swap16
-#define bswap_32 __swap32
-#define bswap_64 __swap64
-#else
-#include <sys/endian.h>
-#define bswap_16 bswap16
-#define bswap_32 bswap32
-#define bswap_64 bswap64
-#endif
-
int __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
diff --git a/GL/glx/indirect_util.c b/GL/glx/indirect_util.c
index 09b7ab87c..58c194c99 100644
--- a/GL/glx/indirect_util.c
+++ b/GL/glx/indirect_util.c
@@ -23,29 +23,21 @@
* SOFTWARE.
*/
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
#include <string.h>
#include <X11/Xmd.h>
#include <GL/gl.h>
#include <GL/glxproto.h>
-#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__)
-#include <byteswap.h>
-#elif defined(__OpenBSD__)
-#include <sys/endian.h>
-#define bswap_16 __swap16
-#define bswap_32 __swap32
-#define bswap_64 __swap64
-#else
-#include <sys/endian.h>
-#define bswap_16 bswap16
-#define bswap_32 bswap32
-#define bswap_64 bswap64
-#endif
#include <inttypes.h>
#include "indirect_size.h"
#include "indirect_size_get.h"
#include "indirect_dispatch.h"
#include "glxserver.h"
+#include "glxbyteorder.h"
#include "singlesize.h"
#include "glapitable.h"
#include "glapi.h"
diff --git a/GL/glx/swap_interval.c b/GL/glx/swap_interval.c
index 6aa92a35b..24abd69fa 100644
--- a/GL/glx/swap_interval.c
+++ b/GL/glx/swap_interval.c
@@ -39,7 +39,6 @@
#include "glthread.h"
#include "dispatch.h"
#include "glapioffsets.h"
-
#include "glxbyteorder.h"
static int DoSwapInterval(__GLXclientState *cl, GLbyte *pc, int do_swap);
diff --git a/GL/mesa/X/xf86glx.c b/GL/mesa/X/xf86glx.c
index 94959d628..47c87f6d9 100644
--- a/GL/mesa/X/xf86glx.c
+++ b/GL/mesa/X/xf86glx.c
@@ -78,6 +78,7 @@ typedef struct __GLXMESAdrawable __GLXMESAdrawable;
struct __GLXMESAscreen {
__GLXscreen base;
int index;
+ int num_vis;
XMesaVisual *xm_vis;
};
@@ -280,7 +281,7 @@ __glXMesaScreenDestroy(__GLXscreen *screen)
__GLXMESAscreen *mesaScreen = (__GLXMESAscreen *) screen;
int i;
- for (i = 0; i < screen->numVisuals; i++) {
+ for (i = 0; i < mesaScreen->num_vis; i++) {
if (mesaScreen->xm_vis[i])
XMesaDestroyVisual(mesaScreen->xm_vis[i]);
}
@@ -389,6 +390,7 @@ static void init_screen_visuals(__GLXMESAscreen *screen)
xfree(used);
+ screen->num_vis = pScreen->numVisuals;
screen->xm_vis = pXMesaVisual;
}