linux-directfb-install:
cd src/mesa/drivers/directfb && $(MAKE) install
+# Xserver GLcore module
+glcore:
+ cd src/mesa/drivers/xorg ; $(MAKE)
+
+glcore-install:
+ cd src/mesa/drivers/xorg ; $(MAKE) install
+
# If there's no current configuration file
$(TOP)/configs/current:
@echo
$(EXTRA_LIB_PATH) @GLW_LIB_DEPS@
APP_LIB_DEPS = $(EXTRA_LIB_PATH) @APP_LIB_DEPS@
+# GLcore dependencies
+GLCORE_LIB_DEPS = $(EXTRA_LIB_PATH) @GLCORE_LIB_DEPS@
+
# DRI dependencies
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@
LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
GL_LIB_DEPS="$X_LIBS -lX11 -lXext"
fi
GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
+ GLCORE_LIB_DEPS=""
# if static, move the external libraries to the programs
# and empty the libraries for libGL
# need DRM libs, -lpthread, etc.
GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
+ GLCORE_LIB_DEPS="-lm -lpthread $DLOPEN_LIBS"
;;
osmesa)
# No libGL for osmesa
GL_LIB_DEPS=""
+ GLCORE_LIB_DEPS=""
;;
esac
AC_SUBST(GL_LIB_DEPS)
+AC_SUBST(GLCORE_LIB_DEPS)
dnl
dnl More X11 setup
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
+
+/************************************************************************/
+
+#ifdef _NEED_GL_CORE_IF
+
+/**
+ * The GLcore interface (a subset of the XMesa interface)
+ */
+#define __GL_CORE "GL_Core"
+
+typedef struct __GLcoreModuleRec {
+ /*
+ * XMesaVisual
+ */
+ XMesaVisual (*XMesaCreateVisual)( ScreenPtr display,
+ VisualPtr visinfo,
+ GLboolean rgb_flag,
+ GLboolean alpha_flag,
+ GLboolean db_flag,
+ GLboolean stereo_flag,
+ GLboolean ximage_flag,
+ GLint depth_size,
+ GLint stencil_size,
+ GLint accum_red_size,
+ GLint accum_green_size,
+ GLint accum_blue_size,
+ GLint accum_alpha_size,
+ GLint num_samples,
+ GLint level,
+ GLint visualCaveat );
+
+ void (*XMesaDestroyVisual)( XMesaVisual v );
+
+ /*
+ * XMesaBuffer
+ */
+ XMesaBuffer (*XMesaCreateWindowBuffer)( XMesaVisual v,
+ WindowPtr w );
+
+ XMesaBuffer (*XMesaCreatePixmapBuffer)( XMesaVisual v,
+ PixmapPtr p,
+ ColormapPtr cmap );
+
+ void (*XMesaDestroyBuffer)( XMesaBuffer b );
+
+ void (*XMesaSwapBuffers)( XMesaBuffer b );
+
+ void (*XMesaResizeBuffers)( XMesaBuffer b );
+
+ /*
+ * XMesaContext
+ */
+ XMesaContext (*XMesaCreateContext)( XMesaVisual v,
+ XMesaContext share_list );
+
+ void (*XMesaDestroyContext)( XMesaContext c );
+
+ GLboolean (*XMesaCopyContext)( XMesaContext src,
+ XMesaContext dst,
+ GLuint mask );
+
+ GLboolean (*XMesaMakeCurrent2)( XMesaContext c,
+ XMesaBuffer drawBuffer,
+ XMesaBuffer readBuffer );
+
+ GLboolean (*XMesaForceCurrent)( XMesaContext c );
+
+ GLboolean (*XMesaLoseCurrent)( XMesaContext c );
+
+} __GLcoreModule;
+
+#endif /* _NEED_GL_CORE_IF */
+
#endif /* __gl_core_h_ */
$(OSMESA_DRIVER_OBJECTS)
-stand-alone: depend subdirs $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
+stand-alone: depend subdirs libmesa.a \
+ $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
-osmesa-only: depend subdirs $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
+osmesa-only: depend subdirs \
+ $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
# Make the GL library
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
#ifdef XFree86Server
+# include "xorg-server.h"
# include "resource.h"
# include "windowstr.h"
--- /dev/null
+glxheader.h
+xmesaP.h
+xm_*
--- /dev/null
+# src/mesa/drivers/xorg/Makefile
+
+TOP = ../../../..
+include $(TOP)/configs/current
+
+LIBNAME = libGLcore.so
+
+SYMLINKS = \
+ glxheader.h \
+ xmesaP.h \
+ xm_api.c \
+ xm_buffer.c \
+ xm_dd.c \
+ xm_image.c \
+ xm_image.h \
+ xm_line.c \
+ xm_span.c \
+ xm_tri.c
+
+C_SOURCES = \
+ xm_api.c \
+ xm_buffer.c \
+ xm_dd.c \
+ xm_image.c \
+ xm_line.c \
+ xm_span.c \
+ xm_tri.c \
+ glcore.c
+
+########################################
+
+MESA_MODULES = $(TOP)/src/mesa/libmesa.a
+
+C_SOURCES += ../common/driverfuncs.c
+
+OBJECTS = $(C_SOURCES:.c=.o)
+
+### Include directories
+INCLUDES = \
+ -I. \
+ -I.. \
+ -I$(TOP)/include \
+ -I$(TOP)/src/mesa \
+ -I$(TOP)/src/mesa/main \
+ -I$(TOP)/src/mesa/glapi \
+ `pkg-config --cflags xorg-server`
+
+# undef 'USE_XSHM' to make it explicit that 'XFree86Server' takes precedence
+DRIVER_DEFINES = -UUSE_XSHM -DXFree86Server
+
+##### RULES #####
+
+.c.o:
+ $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
+
+
+##### TARGETS #####
+
+default: depend symlinks $(LIBNAME)
+
+
+$(LIBNAME): $(OBJECTS) $(MESA_MODULES) Makefile
+ $(TOP)/bin/mklib -noprefix -o $@ \
+ $(OBJECTS) $(MESA_MODULES) $(GLCORE_LIB_DEPS)
+
+
+depend: $(C_SOURCES) $(SYMLINKS)
+ touch depend
+ $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) \
+ > /dev/null
+
+
+clean:
+ -rm -f *.o *.so $(SYMLINKS)
+ -rm -f depend depend.bak
+
+install: $(LIBNAME)
+ $(INSTALL) -d $(DRI_DRIVER_INSTALL_DIR)
+ $(INSTALL) -m 755 $(LIBNAME) $(DRI_DRIVER_INSTALL_DIR)
+
+$(SYMLINKS):
+ @[ -e $@ ] || ln -sf ../x11/$@ ./
+
+symlinks: $(SYMLINKS)
+
+include depend
--- /dev/null
+
+#define _NEED_GL_CORE_IF
+#include <GL/xmesa.h>
+#include <GL/internal/glcore.h>
+#include "xmesaP.h"
+
+PUBLIC
+__GLcoreModule GL_Core = {
+ XMesaCreateVisual,
+ XMesaDestroyVisual,
+
+ XMesaCreateWindowBuffer,
+ XMesaCreatePixmapBuffer,
+ XMesaDestroyBuffer,
+ XMesaSwapBuffers,
+ XMesaResizeBuffers,
+
+ XMesaCreateContext,
+ XMesaDestroyContext,
+ XMesaCopyContext,
+ XMesaMakeCurrent2,
+ XMesaForceCurrent,
+ XMesaLoseCurrent
+};
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
#include "glheader.h"
#include "glapi.h"
#include "glapioffsets.h"
*/
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
#include "glheader.h"
#include "glthread.h"
#ifndef GLHEADER_H
#define GLHEADER_H
-/* This allows Mesa to be integrated into XFree86 */
-#ifdef HAVE_DIX_CONFIG_H
-#include "dix-config.h"
-#endif
-
#include <assert.h>
#include <ctype.h>
#if defined(__alpha__) && defined(CCPML)