solaris-port.patch revision 606
606N/A--- src/glx/x11/Makefile 2008-09-13 13:25:44.000000000 -0700
606N/A+++ src/glx/x11/Makefile 2008-10-03 07:51:04.249576000 -0700
606N/A@@ -66,6 +66,10 @@
606N/A
606N/A default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
606N/A
606N/A+# Needed to truly hide symbols gcc treats as HIDDEN/INTERNAL but doesn't mark
606N/A+# as hidden in the ELF files properly.
606N/A+GL_LIB_DEPS += -Wl,-M,mapfile.scope
606N/A+
606N/A # Make libGL
606N/A $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
606N/A $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
606N/A
606N/A--- src/mesa/drivers/dri/Makefile.template 2008-08-25 07:49:40.000000000 -0700
606N/A+++ src/mesa/drivers/dri/Makefile.template 2008-10-03 10:53:42.854207000 -0700
606N/A@@ -1,5 +1,10 @@
606N/A # -*-makefile-*-
606N/A
606N/A+# Needed to specify symbols which are allowed to be undefined when
606N/A+# linking DRI modules with -z defs
606N/A+DRI_LIB_DEPS += -Wl,-M,$(TOP)/src/mesa/drivers/dri/mapfile.externs
606N/A+
606N/A+
606N/A MESA_MODULES = $(TOP)/src/mesa/libmesa.a
606N/A
606N/A COMMON_SOURCES = \
606N/A
606N/A--- src/mesa/drivers/dri/intel/intel_context.c Tue Sep 30 10:14:35 2008
606N/A+++ src/mesa/drivers/dri/intel/intel_context.c Tue Sep 30 10:29:38 2008
606N/A@@ -69,6 +69,11 @@
606N/A int INTEL_DEBUG = (0);
606N/A #endif
606N/A
606N/A+#if defined(sun)
606N/A+extern void _sigoff(void);
606N/A+extern void _sigon(void);
606N/A+#endif
606N/A+
606N/A #define need_GL_NV_point_sprite
606N/A #define need_GL_ARB_multisample
606N/A #define need_GL_ARB_point_parameters
606N/A@@ -867,7 +872,7 @@
606N/A intel->locked = 1;
606N/A
606N/A if (INTEL_DEBUG & DEBUG_LOCK)
606N/A- _mesa_printf("%s - got contended lock\n", __progname);
606N/A+ _mesa_printf("%s - got contended lock\n", __FUNCTION__);
606N/A
606N/A /* If the window moved, may need to set a new cliprect now.
606N/A *
606N/A@@ -966,6 +971,9 @@
606N/A intel_fb->Base._ColorDrawBufferIndexes[0]);
606N/A }
606N/A
606N/A+#if defined(sun)
606N/A+ _sigoff();
606N/A+#else
606N/A if (intel_rb && dPriv->vblFlags &&
606N/A !(dPriv->vblFlags & VBLANK_FLAG_NO_IRQ) &&
606N/A (intel_fb->vbl_waited - intel_rb->vbl_pending) > (1<<23)) {
606N/A@@ -981,6 +989,7 @@
606N/A drmWaitVBlank(intel->driFd, &vbl);
606N/A intel_fb->vbl_waited = vbl.reply.sequence;
606N/A }
606N/A+#endif
606N/A
606N/A DRM_CAS(intel->driHwLock, intel->hHWContext,
606N/A (DRM_LOCK_HELD|intel->hHWContext), __ret);
606N/A@@ -998,7 +1007,7 @@
606N/A
606N/A
606N/A if (INTEL_DEBUG & DEBUG_LOCK)
606N/A- _mesa_printf("%s - locked\n", __progname);
606N/A+ _mesa_printf("%s - locked\n", __FUNCTION__);
606N/A }
606N/A
606N/A
606N/A@@ -1014,7 +1023,7 @@
606N/A _glthread_UNLOCK_MUTEX(lockMutex);
606N/A
606N/A if (INTEL_DEBUG & DEBUG_LOCK)
606N/A- _mesa_printf("%s - unlocked\n", __progname);
606N/A+ _mesa_printf("%s - unlocked\n", __FUNCTION__);
606N/A
606N/A /**
606N/A * Nothing should be left in batch outside of LOCK/UNLOCK which references
606N/A@@ -1021,5 +1030,9 @@
606N/A * cliprects.
606N/A */
606N/A assert(intel->batch->cliprect_mode != REFERENCES_CLIPRECTS);
606N/A+
606N/A+#if defined(sun)
606N/A+ _sigon();
606N/A+#endif
606N/A }
606N/A
606N/A--- src/mesa/drivers/dri/intel/intel_screen.c Tue Sep 30 10:38:08 2008
606N/A+++ src/mesa/drivers/dri/intel/intel_screen.c Tue Sep 30 10:41:06 2008
606N/A@@ -25,6 +25,8 @@
606N/A *
606N/A **************************************************************************/
606N/A
606N/A+#include <unistd.h>
606N/A+#include <signal.h>
606N/A #include "glheader.h"
606N/A #include "context.h"
606N/A #include "framebuffer.h"
606N/A@@ -51,6 +53,15 @@
606N/A #include "intel_batchbuffer.h"
606N/A #include "intel_bufmgr_ttm.h"
606N/A
606N/A+static void stop_handler(int sig)
606N/A+{
606N/A+ kill(getpid(), SIGSTOP);
606N/A+}
606N/A+static void exit_handler(int sig)
606N/A+{
606N/A+ _exit(1);
606N/A+}
606N/A+
606N/A PUBLIC const char __driConfigOptions[] =
606N/A DRI_CONF_BEGIN
606N/A DRI_CONF_SECTION_PERFORMANCE
606N/A@@ -488,6 +499,12 @@
606N/A
606N/A sPriv->extensions = intelScreenExtensions;
606N/A
606N/A+ (void) sigset(SIGTSTP, stop_handler);
606N/A+ (void) sigset(SIGTTIN, stop_handler);
606N/A+ (void) sigset(SIGTTOU, stop_handler);
606N/A+
606N/A+
606N/A+
606N/A return GL_TRUE;
606N/A }
606N/A
606N/A--- src/mesa/drivers/dri/common/dri_util.h Wed Sep 24 13:38:44 2008
606N/A+++ src/mesa/drivers/dri/common/dri_util.h Wed Sep 24 13:39:06 2008
606N/A@@ -60,6 +60,10 @@
606N/A
606N/A #define GLX_BAD_CONTEXT 5
606N/A
606N/A+#define u_int64_t uint64_t
606N/A+#define u_int32_t uint32_t
606N/A+#define u_int8_t uint8_t
606N/A+
606N/A typedef struct __DRIswapInfoRec __DRIswapInfo;
606N/A
606N/A /* Typedefs to avoid rewriting the world. */
606N/A--- src/mesa/drivers/dri/i915/intel_tris.c Mon Aug 25 07:49:40 2008
606N/A+++ src/mesa/drivers/dri/i915/intel_tris.c Wed Sep 24 13:53:25 2008
606N/A@@ -156,7 +156,7 @@
606N/A * Emit primitives as inline vertices *
606N/A ***********************************************************************/
606N/A
606N/A-#ifdef __i386__
606N/A+#if (defined(i386) || defined(__i386__)) && !(defined(__SOLARIS__) || defined(sun))
606N/A #define COPY_DWORDS( j, vb, vertsize, v ) \
606N/A do { \
606N/A int __tmp; \
606N/A224c224
606N/A--- src/mesa/drivers/dri/common/mio.h Wed Sep 24 14:04:29 2008
606N/A+++ src/mesa/drivers/dri/common/mmio.h Wed Sep 24 14:04:45 2008
606N/A@@ -34,6 +34,7 @@
606N/A #define MMIO_H
606N/A
606N/A #include "glheader.h"
606N/A+#include "dri_util.h"
606N/A
606N/A #if defined( __powerpc__ )
606N/A
606N/A--- src/mesa/drivers/dri/radeon/server/radeon_dri.h Wed Sep 24 14:05:24 2008
606N/A+++ src/mesa/drivers/dri/radeon/server/radeon_dri.h Wed Sep 24 14:06:48 2008
606N/A@@ -90,6 +90,7 @@
606N/A /*@{*/
606N/A drm_handle_t registerHandle; /**< \brief MMIO register map size */
606N/A drmSize registerSize; /**< \brief MMIO register map handle */
606N/A+ int padding0;
606N/A /*@}*/
606N/A
606N/A /**
606N/A@@ -98,6 +99,7 @@
606N/A /*@{*/
606N/A drm_handle_t statusHandle; /**< \brief status map handle */
606N/A drmSize statusSize; /**< \brief status map size */
606N/A+ int padding1;
606N/A /*@}*/
606N/A
606N/A /**
606N/A@@ -106,11 +108,13 @@
606N/A /*@{*/
606N/A drm_handle_t gartTexHandle; /**< \brief AGP texture area map handle */
606N/A drmSize gartTexMapSize; /**< \brief AGP texture area map size */
606N/A+ int padding2;
606N/A int log2GARTTexGran; /**< \brief AGP texture granularity in log base 2 */
606N/A int gartTexOffset; /**< \brief AGP texture area offset in AGP space */
606N/A /*@}*/
606N/A
606N/A unsigned int sarea_priv_offset; /**< \brief offset of the private SAREA data*/
606N/A+ int padding3;
606N/A } RADEONDRIRec, *RADEONDRIPtr;
606N/A
606N/A #endif
606N/A
606N/A--- src/mesa/drivers/dri/i965/brw_draw_upload.c Wed Sep 24 14:14:46 2008
606N/A+++ src/mesa/drivers/dri/i965/brw_draw_upload.c Wed Sep 24 14:16:22 2008
606N/A@@ -26,6 +26,7 @@
606N/A **************************************************************************/
606N/A
606N/A #include <stdlib.h>
606N/A+#include <string.h>
606N/A
606N/A #include "glheader.h"
606N/A #include "context.h"
606N/A@@ -156,7 +157,24 @@
606N/A BRW_SURFACEFORMAT_R8G8B8A8_SSCALED
606N/A };
606N/A
606N/A+#if defined (sun)
606N/A+/* Solaris does not have ffsll in libc */
606N/A+#define NBITS_INT (CHAR_BIT * sizeof (int))
606N/A+static int ffsll(long long i)
606N/A+{
606N/A+ int i1;
606N/A+ int ret;
606N/A
606N/A+ i1 = i & UINT_MAX;
606N/A+ ret = ffs(i1);
606N/A+ if (ret == 0) {
606N/A+ i1 = (i & 0xffffffff00000000) >> NBITS_INT;
606N/A+ ret = ffs(i1) + NBITS_INT;
606N/A+ }
606N/A+ return ret;
606N/A+}
606N/A+#endif
606N/A+
606N/A static GLuint get_surface_type( GLenum type, GLuint size, GLboolean normalized )
606N/A {
606N/A if (INTEL_DEBUG & DEBUG_VERTS)
606N/A
606N/A--- src/mesa/drivers/dri/intel/server/i830_dri.h Tue Sep 30 09:13:02 2008
606N/A+++ src/mesa/drivers/dri/intel/server/i830_dri.h Tue Sep 30 09:15:40 2008
606N/A@@ -21,16 +21,20 @@
606N/A drm_handle_t unused2; /* backbuffer */
606N/A
606N/A drmSize unused3; /* depthbufferSize */
606N/A+ drmSize pad0;
606N/A drm_handle_t unused4; /* depthbuffer */
606N/A
606N/A drmSize unused5; /* rotatedSize */
606N/A+ drmSize pad1;
606N/A drm_handle_t unused6; /* rotatedbuffer */
606N/A
606N/A drm_handle_t unused7; /* textures */
606N/A int unused8; /* textureSize */
606N/A+ drmSize pad2;
606N/A
606N/A drm_handle_t unused9; /* agp_buffers */
606N/A drmSize unused10; /* agp_buf_size */
606N/A+ drmSize pad3;
606N/A
606N/A int deviceID;
606N/A int width;
606N/A--- src/mesa/drivers/dri/intel/intel_buffers.c Tue Sep 30 10:54:45 2008
606N/A+++ src/mesa/drivers/dri/intel/intel_buffers.c Tue Sep 30 10:55:09 2008
606N/A@@ -224,7 +224,7 @@
606N/A
606N/A if (INTEL_DEBUG & DEBUG_LOCK)
606N/A if (pf_active != intel_fb->pf_active)
606N/A- _mesa_printf("%s - Page flipping %sactive\n", __progname,
606N/A+ _mesa_printf("%s - Page flipping %sactive\n", __FUNCTION__,
606N/A pf_active ? "" : "in");
606N/A
606N/A if (pf_active) {
606N/A--- src/mesa/drivers/dri/intel/intel_context.h Tue Sep 30 10:31:32 2008
606N/A+++ src/mesa/drivers/dri/intel/intel_context.h Tue Sep 30 12:01:59 2008
606N/A@@ -327,7 +327,7 @@
606N/A * than COPY_DWORDS would:
606N/A * XXX Put this in src/mesa/main/imports.h ???
606N/A */
606N/A-#if defined(i386) || defined(__i386__)
606N/A+#if (defined(i386) || defined(__i386__)) && !(defined(__SOLARIS__) || defined(sun))
606N/A static INLINE void * __memcpy(void * to, const void * from, size_t n)
606N/A {
606N/A int d0, d1, d2;
606N/A