Compare commits
	
		
			1 Commits
		
	
	
		
			mesa-10.1.
			...
			mesa-10.1-
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 9f4366f1ac | 
| @@ -8,5 +8,4 @@ | ||||
| 	    (c-set-offset 'innamespace '0) | ||||
| 	    (c-set-offset 'inline-open '0))) | ||||
|   ) | ||||
|  (makefile-mode (indent-tabs-mode . t)) | ||||
|  ) | ||||
|   | ||||
| @@ -78,7 +78,6 @@ endif | ||||
| ifneq ($(strip $(MESA_GPU_DRIVERS)),) | ||||
|  | ||||
| SUBDIRS := \ | ||||
| 	src/loader \ | ||||
| 	src/mapi \ | ||||
| 	src/glsl \ | ||||
| 	src/mesa \ | ||||
|   | ||||
| @@ -36,6 +36,7 @@ PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION) | ||||
| EXTRA_FILES = \ | ||||
| 	aclocal.m4					\ | ||||
| 	configure					\ | ||||
| 	VERSION					\ | ||||
| 	bin/ar-lib					\ | ||||
| 	bin/compile					\ | ||||
| 	bin/config.sub					\ | ||||
| @@ -45,7 +46,6 @@ EXTRA_FILES = \ | ||||
| 	bin/ltmain.sh					\ | ||||
| 	bin/missing					\ | ||||
| 	bin/ylwrap					\ | ||||
|         bin/test-driver					\ | ||||
| 	src/glsl/glsl_parser.cpp			\ | ||||
| 	src/glsl/glsl_parser.h				\ | ||||
| 	src/glsl/glsl_lexer.cpp				\ | ||||
|   | ||||
| @@ -1,9 +0,0 @@ | ||||
| # This patch does not apply cleanly, author says it can be skipped. | ||||
| dff3eccd158d648482bb47118ef5d57a9186e5a4 | ||||
|  | ||||
| # And this one depends on the above, author says it too can be skipped. | ||||
| ac35ded4733883037316d556af596524e5e02535 | ||||
|  | ||||
| # This patch introduces some regressions. See: | ||||
| # https://bugs.freedesktop.org/show_bug.cgi?id=77443 | ||||
| 1afe3359258a9e89b62c8638761f52d78f6d1cbc | ||||
| @@ -100,4 +100,4 @@ def AddOptions(opts): | ||||
| 	opts.Add(BoolOption('quiet', 'DEPRECATED: profile build', 'yes')) | ||||
| 	opts.Add(BoolOption('texture_float', 'enable floating-point textures and renderbuffers', 'no')) | ||||
| 	if host_platform == 'windows': | ||||
| 		opts.Add(EnumOption('MSVC_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0', '10.0', '11.0', '12.0'))) | ||||
| 		opts.Add(EnumOption('MSVC_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0', '10.0', '11.0'))) | ||||
|   | ||||
							
								
								
									
										131
									
								
								configure.ac
									
									
									
									
									
								
							
							
						
						
									
										131
									
								
								configure.ac
									
									
									
									
									
								
							| @@ -28,11 +28,11 @@ AC_SUBST([OSMESA_VERSION]) | ||||
|  | ||||
| dnl Versions for external dependencies | ||||
| LIBDRM_REQUIRED=2.4.24 | ||||
| LIBDRM_RADEON_REQUIRED=2.4.50 | ||||
| LIBDRM_INTEL_REQUIRED=2.4.52 | ||||
| LIBDRM_RADEON_REQUIRED=2.4.46 | ||||
| LIBDRM_INTEL_REQUIRED=2.4.38 | ||||
| LIBDRM_NVVIEUX_REQUIRED=2.4.33 | ||||
| LIBDRM_NOUVEAU_REQUIRED="2.4.33 libdrm >= 2.4.41" | ||||
| LIBDRM_FREEDRENO_REQUIRED=2.4.51 | ||||
| LIBDRM_FREEDRENO_REQUIRED=2.4.39 | ||||
| DRI2PROTO_REQUIRED=2.6 | ||||
| DRI3PROTO_REQUIRED=1.0 | ||||
| PRESENTPROTO_REQUIRED=1.0 | ||||
| @@ -230,12 +230,6 @@ esac | ||||
| AC_SUBST([VISIBILITY_CFLAGS]) | ||||
| AC_SUBST([VISIBILITY_CXXFLAGS]) | ||||
|  | ||||
| dnl | ||||
| dnl Optional flags, check for compiler support | ||||
| dnl | ||||
| AX_CHECK_COMPILE_FLAG([-msse4.1], [SSE41_SUPPORTED=1], [SSE41_SUPPORTED=0]) | ||||
| AM_CONDITIONAL([SSE41_SUPPORTED], [test x$SSE41_SUPPORTED = x1]) | ||||
|  | ||||
| dnl | ||||
| dnl Hacks to enable 32 or 64 bit build | ||||
| dnl | ||||
| @@ -542,20 +536,6 @@ AC_ARG_ENABLE([dri], | ||||
|         [enable DRI modules @<:@default=enabled@:>@])], | ||||
|     [enable_dri="$enableval"], | ||||
|     [enable_dri=yes]) | ||||
|  | ||||
| case "$host_os" in | ||||
| linux*) | ||||
|     dri3_default=yes | ||||
|     ;; | ||||
| *) | ||||
|     dri3_default=no | ||||
|     ;; | ||||
| esac | ||||
| AC_ARG_ENABLE([dri3], | ||||
|     [AS_HELP_STRING([--enable-dri3], | ||||
|         [enable DRI3 @<:@default=auto@:>@])], | ||||
|     [enable_dri3="$enableval"], | ||||
|     [enable_dri3="$dri3_default"]) | ||||
| AC_ARG_ENABLE([glx], | ||||
|     [AS_HELP_STRING([--enable-glx], | ||||
|         [enable GLX library @<:@default=enabled@:>@])], | ||||
| @@ -592,7 +572,7 @@ AC_ARG_ENABLE([xvmc], | ||||
|    [AS_HELP_STRING([--enable-xvmc], | ||||
|          [enable xvmc library @<:@default=auto@:>@])], | ||||
|    [enable_xvmc="$enableval"], | ||||
|    [enable_xvmc=no]) | ||||
|    [enable_xvmc=auto]) | ||||
| AC_ARG_ENABLE([vdpau], | ||||
|    [AS_HELP_STRING([--enable-vdpau], | ||||
|          [enable vdpau library @<:@default=auto@:>@])], | ||||
| @@ -722,7 +702,6 @@ fi | ||||
| AM_CONDITIONAL(HAVE_DRI_GLX, test "x$enable_glx" = xyes -a \ | ||||
|                                   "x$enable_dri" = xyes) | ||||
| AM_CONDITIONAL(HAVE_DRI, test "x$enable_dri" = xyes) | ||||
| AM_CONDITIONAL(HAVE_DRI3, test "x$enable_dri3" = xyes) | ||||
|  | ||||
| AC_ARG_ENABLE([shared-glapi], | ||||
|     [AS_HELP_STRING([--enable-shared-glapi], | ||||
| @@ -776,19 +755,6 @@ AC_SUBST([MESA_LLVM]) | ||||
| # Check for libdrm | ||||
| PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED], | ||||
|                   [have_libdrm=yes], [have_libdrm=no]) | ||||
| if test "x$have_libdrm" = xyes; then | ||||
| 	DEFINES="$DEFINES -DHAVE_LIBDRM" | ||||
| fi | ||||
|  | ||||
| case "$host_os" in | ||||
| linux*) | ||||
|     need_libudev=yes ;; | ||||
| *) | ||||
|     need_libudev=no ;; | ||||
| esac | ||||
|  | ||||
| PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED], | ||||
|                   have_libudev=yes, have_libudev=no) | ||||
|  | ||||
| if test "x$enable_dri" = xyes; then | ||||
|     # DRI must be shared, I think | ||||
| @@ -845,18 +811,13 @@ xyesno) | ||||
|         fi | ||||
|         PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED]) | ||||
|         GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV libdrm >= $LIBDRM_REQUIRED" | ||||
|         if test x"$enable_dri3" = xyes; then | ||||
|             PKG_CHECK_MODULES([DRI3PROTO], [dri3proto >= $DRI3PROTO_REQUIRED]) | ||||
|             PKG_CHECK_MODULES([PRESENTPROTO], [presentproto >= $PRESENTPROTO_REQUIRED]) | ||||
|         fi | ||||
|         PKG_CHECK_MODULES([DRI3PROTO], [dri3proto >= $DRI3PROTO_REQUIRED]) | ||||
|         PKG_CHECK_MODULES([PRESENTPROTO], [presentproto >= $PRESENTPROTO_REQUIRED]) | ||||
|         PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED]) | ||||
|     fi | ||||
|  | ||||
|     # find the DRI deps for libGL | ||||
|     dri_modules="x11 xext xdamage xfixes x11-xcb xcb-glx >= 1.8.1 xcb-dri2 >= 1.8" | ||||
|  | ||||
|     if test x"$enable_dri3" = xyes; then | ||||
|         dri_modules="$dri_modules xcb-dri3 xcb-present xcb-sync xshmfence >= 1.1" | ||||
|     fi | ||||
|     dri_modules="x11 xext xdamage xfixes x11-xcb xcb-glx >= 1.8.1 xcb-dri2 >= 1.8 xcb-dri3 xcb-present xcb-sync xshmfence" | ||||
|  | ||||
|     # add xf86vidmode if available | ||||
|     PKG_CHECK_MODULES([XF86VIDMODE], [xxf86vm], HAVE_XF86VIDMODE=yes, HAVE_XF86VIDMODE=no) | ||||
| @@ -866,13 +827,8 @@ xyesno) | ||||
|  | ||||
|     PKG_CHECK_MODULES([DRIGL], [$dri_modules]) | ||||
|     GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV $dri_modules" | ||||
|     X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS" | ||||
|     GL_LIB_DEPS="$DRIGL_LIBS" | ||||
|  | ||||
|     if test x"$enable_dri3$have_libudev" = xyesyes; then | ||||
|         X11_INCLUDES="$X11_INCLUDES $LIBUDEV_CFLAGS" | ||||
|         GL_LIB_DEPS="$GL_LIB_DEPS" | ||||
|     fi | ||||
|     X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS $LIBUDEV_CFLAGS" | ||||
|     GL_LIB_DEPS="$DRIGL_LIBS $LIBUDEV_LIBS" | ||||
|  | ||||
|     # need DRM libs, $PTHREAD_LIBS, etc. | ||||
|     GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS" | ||||
| @@ -880,10 +836,6 @@ xyesno) | ||||
|     ;; | ||||
| esac | ||||
|  | ||||
| if test "$have_libudev" = yes; then | ||||
|     DEFINES="$DEFINES -DHAVE_LIBUDEV" | ||||
| fi | ||||
|  | ||||
| # This is outside the case (above) so that it is invoked even for non-GLX | ||||
| # builds. | ||||
| AM_CONDITIONAL(HAVE_XF86VIDMODE, test "x$HAVE_XF86VIDMODE" = xyes) | ||||
| @@ -995,9 +947,6 @@ if test "x$enable_dri" = xyes; then | ||||
|     linux*) | ||||
|         DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1" | ||||
|         DEFINES="$DEFINES -DHAVE_ALIAS" | ||||
|         if test "x$enable_dri3" = xyes; then | ||||
|             DEFINES="$DEFINES -DHAVE_DRI3" | ||||
|         fi | ||||
|  | ||||
|         case "$host_cpu" in | ||||
|         x86_64|amd64) | ||||
| @@ -1030,7 +979,7 @@ if test "x$enable_dri" = xyes; then | ||||
|     gnu*) | ||||
|         DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1" | ||||
|         DEFINES="$DEFINES -DHAVE_ALIAS" | ||||
|         ;; | ||||
| 	;; | ||||
|     solaris*) | ||||
|         DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1" | ||||
|         ;; | ||||
| @@ -1050,7 +999,7 @@ if test "x$enable_dri" = xyes; then | ||||
|     DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/  */ /g'` | ||||
|  | ||||
|     # Check for expat | ||||
|     PKG_CHECK_EXISTS([expat], [have_expat=yes], [have_expat=no]) | ||||
|     PKG_CHECK_EXISTS([EXPAT], [have_expat=yes], [have_expat=no]) | ||||
|     if test "x$have_expat" = "xyes"; then | ||||
|        PKG_CHECK_MODULES([EXPAT], [expat], [], | ||||
|                          AC_MSG_ERROR([Expat required for DRI.])) | ||||
| @@ -1076,6 +1025,7 @@ if test "x$enable_dri" = xyes; then | ||||
|     DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS" | ||||
|     GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIBS -lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS" | ||||
|  | ||||
|     DRI_DRIVER_LDFLAGS="-module -avoid-version -shared -Wl,-Bsymbolic" | ||||
| fi | ||||
|  | ||||
| AM_CONDITIONAL(NEED_MEGADRIVER, test -n "$DRI_DIRS") | ||||
| @@ -1083,6 +1033,7 @@ AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_xlib_glx" = xyes -o \ | ||||
|                                   "x$enable_osmesa" = xyes -o \ | ||||
|                                   -n "$DRI_DIRS") | ||||
| AC_SUBST([DRI_LIB_DEPS]) | ||||
| AC_SUBST([DRI_DRIVER_LDFLAGS]) | ||||
| AC_SUBST([GALLIUM_DRI_LIB_DEPS]) | ||||
|  | ||||
| case $DRI_DIRS in | ||||
| @@ -1191,9 +1142,8 @@ if test "x$enable_gbm" = xauto; then | ||||
|     esac | ||||
| fi | ||||
| if test "x$enable_gbm" = xyes; then | ||||
|     if test "x$need_libudev$have_libudev" = xyesno; then | ||||
|         AC_MSG_ERROR([gbm requires udev >= $LIBUDEV_REQUIRED]) | ||||
|     fi | ||||
|     PKG_CHECK_MODULES([LIBUDEV], [libudev], [], | ||||
|                       AC_MSG_ERROR([gbm needs udev])) | ||||
|  | ||||
|     if test "x$enable_dri" = xyes; then | ||||
|         GBM_BACKEND_DIRS="$GBM_BACKEND_DIRS dri" | ||||
| @@ -1203,11 +1153,7 @@ if test "x$enable_gbm" = xyes; then | ||||
|     fi | ||||
| fi | ||||
| AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes) | ||||
| if test "x$need_libudev" = xyes; then | ||||
|     GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED" | ||||
| else | ||||
|     GBM_PC_REQ_PRIV="" | ||||
| fi | ||||
| GBM_PC_REQ_PRIV="libudev" | ||||
| GBM_PC_LIB_PRIV="$DLOPEN_LIBS" | ||||
| AC_SUBST([GBM_PC_REQ_PRIV]) | ||||
| AC_SUBST([GBM_PC_LIB_PRIV]) | ||||
| @@ -1224,6 +1170,11 @@ if test "x$enable_egl" = xyes; then | ||||
|  | ||||
|     if test "$enable_static" != yes; then | ||||
|         # build egl_glx when libGL is built | ||||
|         PKG_CHECK_MODULES([LIBUDEV], [libudev > 150], | ||||
|                           [have_libudev=yes],[have_libudev=no]) | ||||
|         if test "$have_libudev" = yes; then | ||||
|             DEFINES="$DEFINES -DHAVE_LIBUDEV" | ||||
|         fi | ||||
|  | ||||
|         if test "x$enable_dri" = xyes; then | ||||
| 	    HAVE_EGL_DRIVER_DRI2=1 | ||||
| @@ -1466,8 +1417,6 @@ for plat in $egl_platforms; do | ||||
| 	drm) | ||||
| 		test "x$enable_gbm" = "xno" && | ||||
| 			AC_MSG_ERROR([EGL platform drm needs gbm]) | ||||
| 		test "x$have_libdrm" != xyes && | ||||
| 			AC_MSG_ERROR([EGL platform drm requires libdrm >= $LIBDRM_REQUIRED]) | ||||
| 		;; | ||||
|  | ||||
| 	android|fbdev|gdi|null) | ||||
| @@ -1478,9 +1427,9 @@ for plat in $egl_platforms; do | ||||
| 		;; | ||||
| 	esac | ||||
|  | ||||
|         case "$plat$need_libudev$have_libudev" in | ||||
|                 waylandyesno|drmyesno) | ||||
|                     AC_MSG_ERROR([cannot build $plat platform without udev >= $LIBUDEV_REQUIRED]) ;; | ||||
|         case "$plat$have_libudev" in | ||||
|                 waylandno|drmno) | ||||
|                     AC_MSG_ERROR([cannot build $plat platfrom without udev]) ;; | ||||
|         esac | ||||
| done | ||||
|  | ||||
| @@ -1546,11 +1495,17 @@ AC_ARG_ENABLE([gallium-llvm], | ||||
|     [enable_gallium_llvm="$enableval"], | ||||
|     [enable_gallium_llvm=auto]) | ||||
|  | ||||
| AC_ARG_ENABLE([llvm-shared-libs], | ||||
|     [AS_HELP_STRING([--enable-llvm-shared-libs], | ||||
|         [link with LLVM shared libraries @<:@default=enabled@:>@])], | ||||
| AC_ARG_WITH([llvm-shared-libs], | ||||
|     [AS_HELP_STRING([--with-llvm-shared-libs], | ||||
|         [link with LLVM shared libraries @<:@default=disabled@:>@])], | ||||
|     [], | ||||
|     [with_llvm_shared_libs=yes]) | ||||
|     [with_llvm_shared_libs=no]) | ||||
| AS_IF([test x$enable_opencl = xyes], | ||||
|     [ | ||||
|         if test "x$with_llvm_shared_libs" != xyes; then | ||||
|             AC_MSG_ERROR([OpenCL requires LLVM shared libraries]) | ||||
|         fi | ||||
|     ]) | ||||
|  | ||||
| AC_ARG_WITH([llvm-prefix], | ||||
|     [AS_HELP_STRING([--with-llvm-prefix], | ||||
| @@ -1570,7 +1525,6 @@ strip_unwanted_llvm_flags() { | ||||
| 	-e 's/-O.\>//g' \ | ||||
| 	-e 's/-g\>//g' \ | ||||
| 	-e 's/-Wall\>//g' \ | ||||
| 	-e 's/-fcolor-diagnostics\>//g' \ | ||||
| 	-e 's/-fomit-frame-pointer\>//g' | ||||
| } | ||||
|  | ||||
| @@ -1585,9 +1539,9 @@ if test "x$enable_gallium_llvm" = xauto; then | ||||
| fi | ||||
| if test "x$enable_gallium_llvm" = xyes; then | ||||
|     if test "x$llvm_prefix" != x; then | ||||
|         AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no], ["$llvm_prefix/bin"]) | ||||
|         AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no], ["$llvm_prefix/bin"]) | ||||
|     else | ||||
|         AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no]) | ||||
|         AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no]) | ||||
|     fi | ||||
|  | ||||
|     if test "x$LLVM_CONFIG" != xno; then | ||||
| @@ -1719,9 +1673,8 @@ gallium_require_llvm() { | ||||
|  | ||||
| gallium_require_drm_loader() { | ||||
|     if test "x$enable_gallium_loader" = xyes; then | ||||
|         if test "x$need_libudev$have_libudev" = xyesno; then | ||||
|             AC_MSG_ERROR([Gallium drm loader requires libudev >= $LIBUDEV_REQUIRED]) | ||||
|         fi | ||||
|         PKG_CHECK_MODULES([LIBUDEV], [libudev], [], | ||||
|                           AC_MSG_ERROR([Gallium drm loader requires libudev])) | ||||
|         if test "x$have_libdrm" != xyes; then | ||||
|             AC_MSG_ERROR([Gallium drm loader requires libdrm >= $LIBDRM_REQUIRED]) | ||||
|         fi | ||||
| @@ -1954,7 +1907,6 @@ AM_CONDITIONAL(HAVE_MESA_LLVM, test x$MESA_LLVM = x1) | ||||
| AC_SUBST([ELF_LIB]) | ||||
|  | ||||
| AM_CONDITIONAL(DRICOMMON_NEED_LIBDRM, test "x$DRICOMMON_NEED_LIBDRM" = xyes) | ||||
| AM_CONDITIONAL(HAVE_LIBDRM, test "x$have_libdrm" = xyes) | ||||
| AM_CONDITIONAL(HAVE_X11_DRIVER, test "x$enable_xlib_glx" = xyes) | ||||
| AM_CONDITIONAL(HAVE_OSMESA, test "x$enable_osmesa" = xyes) | ||||
| AM_CONDITIONAL(HAVE_GALLIUM_OSMESA, test "x$enable_gallium_osmesa" = xyes) | ||||
| @@ -1970,7 +1922,7 @@ AC_SUBST([XVMC_MAJOR], 1) | ||||
| AC_SUBST([XVMC_MINOR], 0) | ||||
|  | ||||
| AC_SUBST([XA_MAJOR], 2) | ||||
| AC_SUBST([XA_MINOR], 1) | ||||
| AC_SUBST([XA_MINOR], 0) | ||||
| AC_SUBST([XA_TINY], 0) | ||||
| AC_SUBST([XA_VERSION], "$XA_MAJOR.$XA_MINOR.$XA_TINY") | ||||
|  | ||||
| @@ -2005,6 +1957,8 @@ AC_CONFIG_FILES([Makefile | ||||
| 		src/gallium/auxiliary/pipe-loader/Makefile | ||||
| 		src/gallium/drivers/Makefile | ||||
| 		src/gallium/drivers/freedreno/Makefile | ||||
| 		src/gallium/drivers/freedreno/a2xx/Makefile | ||||
| 		src/gallium/drivers/freedreno/a3xx/Makefile | ||||
| 		src/gallium/drivers/galahad/Makefile | ||||
| 		src/gallium/drivers/i915/Makefile | ||||
| 		src/gallium/drivers/identity/Makefile | ||||
| @@ -2079,7 +2033,6 @@ AC_CONFIG_FILES([Makefile | ||||
| 		src/glx/Makefile | ||||
| 		src/glx/tests/Makefile | ||||
| 		src/gtest/Makefile | ||||
| 		src/loader/Makefile | ||||
| 		src/mapi/Makefile | ||||
| 		src/mapi/es1api/Makefile | ||||
| 		src/mapi/es1api/glesv1_cm.pc | ||||
|   | ||||
							
								
								
									
										258
									
								
								docs/GL3.txt
									
									
									
									
									
								
							
							
						
						
									
										258
									
								
								docs/GL3.txt
									
									
									
									
									
								
							| @@ -18,166 +18,164 @@ are exposed in the 3.0 context as extensions. | ||||
| Feature                                               Status | ||||
| ----------------------------------------------------- ------------------------ | ||||
|  | ||||
| GL 3.0 --- all DONE: i965, nv50, nvc0, r600, radeonsi | ||||
| GL 3.0: | ||||
|  | ||||
|   GLSL 1.30                                             DONE () | ||||
|   glBindFragDataLocation, glGetFragDataLocation         DONE | ||||
|   Conditional rendering (GL_NV_conditional_render)      DONE (r300, swrast) | ||||
|   Map buffer subranges (GL_ARB_map_buffer_range)        DONE (r300, swrast) | ||||
|   Clamping controls (GL_ARB_color_buffer_float)         DONE (r300) | ||||
|   Float textures, renderbuffers (GL_ARB_texture_float)  DONE (r300) | ||||
|   GL_EXT_packed_float                                   DONE () | ||||
|   GL_EXT_texture_shared_exponent                        DONE (swrast) | ||||
|   Float depth buffers (GL_ARB_depth_buffer_float)       DONE () | ||||
|   Framebuffer objects (GL_ARB_framebuffer_object)       DONE (r300, swrast) | ||||
|   GL_ARB_half_float_pixel                               DONE (r300, swrast) | ||||
|   GL_ARB_half_float_vertex                              DONE (r300, swrast) | ||||
|   GL_EXT_texture_integer                                DONE () | ||||
|   GL_EXT_texture_array                                  DONE () | ||||
|   Per-buffer blend and masks (GL_EXT_draw_buffers2)     DONE (swrast) | ||||
|   GL_EXT_texture_compression_rgtc                       DONE (r300, swrast) | ||||
|   GL_ARB_texture_rg                                     DONE (r300, swrast) | ||||
|   Transform feedback (GL_EXT_transform_feedback)        DONE () | ||||
|   Vertex array objects (GL_ARB_vertex_array_object)     DONE (all drivers) | ||||
|   sRGB framebuffer format (GL_EXT_framebuffer_sRGB)     DONE () | ||||
|   glClearBuffer commands                                DONE | ||||
|   glGetStringi command                                  DONE | ||||
|   glTexParameterI, glGetTexParameterI commands          DONE | ||||
|   glVertexAttribI commands                              DONE | ||||
|   Depth format cube textures                            DONE () | ||||
|   GLX_ARB_create_context (GLX 1.4 is required)          DONE | ||||
|   Multisample anti-aliasing                             DONE (r300) | ||||
| GLSL 1.30                                             DONE (i965, r600, radeonsi) | ||||
| glBindFragDataLocation, glGetFragDataLocation         DONE | ||||
| Conditional rendering (GL_NV_conditional_render)      DONE (i965, r300, r600, radeonsi, swrast) | ||||
| Map buffer subranges (GL_ARB_map_buffer_range)        DONE (i965, r300, r600, radeonsi, swrast) | ||||
| Clamping controls (GL_ARB_color_buffer_float)         DONE (i965, r300, r600, radeonsi) | ||||
| Float textures, renderbuffers (GL_ARB_texture_float)  DONE (i965, r300, r600, radeonsi) | ||||
| GL_EXT_packed_float                                   DONE (i965, r600, radeonsi) | ||||
| GL_EXT_texture_shared_exponent                        DONE (i965, r600, radeonsi, swrast) | ||||
| Float depth buffers (GL_ARB_depth_buffer_float)       DONE (i965, r600, radeonsi) | ||||
| Framebuffer objects (GL_ARB_framebuffer_object)       DONE (i965, r300, r600, radeonsi, swrast) | ||||
| Half-float                                            DONE (i965, r300, r600, radeonsi, swrast) | ||||
| Non-normalized Integer texture/framebuffer formats    DONE (i965, r600, radeonsi) | ||||
| 1D/2D Texture arrays                                  DONE (i965, r600, radeonsi) | ||||
| Per-buffer blend and masks (GL_EXT_draw_buffers2)     DONE (i965, r600, radeonsi, swrast) | ||||
| GL_EXT_texture_compression_rgtc                       DONE (i965, r300, r600, radeonsi, swrast) | ||||
| Red and red/green texture formats                     DONE (i965, r300, r600, radeonsi, swrast) | ||||
| Transform feedback (GL_EXT_transform_feedback)        DONE (i965, r600, radeonsi) | ||||
| Vertex array objects (GL_APPLE_vertex_array_object)   DONE (all drivers) | ||||
| sRGB framebuffer format (GL_EXT_framebuffer_sRGB)     DONE (i965, r600, radeonsi) | ||||
| glClearBuffer commands                                DONE | ||||
| glGetStringi command                                  DONE | ||||
| glTexParameterI, glGetTexParameterI commands          DONE | ||||
| glVertexAttribI commands                              DONE | ||||
| Depth format cube textures                            DONE (i965, r600, radeonsi) | ||||
| GLX_ARB_create_context (GLX 1.4 is required)          DONE | ||||
|  | ||||
|  | ||||
| GL 3.1 --- all DONE: i965, nv50, nvc0, r600, radeonsi | ||||
| GL 3.1: | ||||
|  | ||||
|   GLSL 1.40                                             DONE () | ||||
|   Forward compatible context support/deprecations       DONE () | ||||
|   Instanced drawing (GL_ARB_draw_instanced)             DONE (swrast) | ||||
|   Buffer copying (GL_ARB_copy_buffer)                   DONE (r300, swrast) | ||||
|   Primitive restart (GL_NV_primitive_restart)           DONE (r300) | ||||
|   16 vertex texture image units                         DONE () | ||||
|   Texture buffer objs (GL_ARB_texture_buffer_object)    DONE for OpenGL 3.1 contexts () | ||||
|   Rectangular textures (GL_ARB_texture_rectangle)       DONE (r300, swrast) | ||||
|   Uniform buffer objs (GL_ARB_uniform_buffer_object)    DONE (swrast) | ||||
|   Signed normalized textures (GL_EXT_texture_snorm)     DONE (r300) | ||||
| GLSL 1.40                                             DONE (i965, r600, radeonsi) | ||||
| Forward compatible context support/deprecations       DONE (i965, r600, radeonsi) | ||||
| Instanced drawing (GL_ARB_draw_instanced)             DONE (i965, r600, radeonsi, swrast) | ||||
| Buffer copying (GL_ARB_copy_buffer)                   DONE (i965, r300, r600, radeonsi, swrast) | ||||
| Primitive restart (GL_NV_primitive_restart)           DONE (i965, r300, r600, radeonsi) | ||||
| 16 vertex texture image units                         DONE (i965, r600, radeonsi) | ||||
| Texture buffer objs (GL_ARB_texture_buffer_object)    DONE for OpenGL 3.1 contexts (i965, r600, radeonsi) | ||||
| Rectangular textures (GL_ARB_texture_rectangle)       DONE (i965, r300, r600, radeonsi, swrast) | ||||
| Uniform buffer objs (GL_ARB_uniform_buffer_object)    DONE (i965, r600, radeonsi, swrast) | ||||
| Signed normalized textures (GL_EXT_texture_snorm)     DONE (i965, r300, r600, radeonsi) | ||||
|  | ||||
|  | ||||
| GL 3.2 --- all DONE: i965, nv50, nvc0, radeonsi | ||||
| GL 3.2: | ||||
|  | ||||
|   Core/compatibility profiles                           DONE | ||||
|   GLSL 1.50                                             DONE () | ||||
|   Geometry shaders                                      DONE () | ||||
|   BGRA vertex order (GL_ARB_vertex_array_bgra)          DONE (r300, r600, swrast) | ||||
|   Base vertex offset(GL_ARB_draw_elements_base_vertex)  DONE (r300, r600, swrast) | ||||
|   Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (r300, r600, swrast) | ||||
|   Provoking vertex (GL_ARB_provoking_vertex)            DONE (r300, r600, swrast) | ||||
|   Seamless cubemaps (GL_ARB_seamless_cube_map)          DONE (r600) | ||||
|   Multisample textures (GL_ARB_texture_multisample)     DONE (r600) | ||||
|   Frag depth clamp (GL_ARB_depth_clamp)                 DONE (r600, swrast) | ||||
|   Fence objects (GL_ARB_sync)                           DONE (r300, r600, swrast) | ||||
|   GLX_ARB_create_context_profile                        DONE | ||||
| Core/compatibility profiles                           DONE | ||||
| GLSL 1.50                                             DONE (i965) | ||||
| Geometry shaders                                      DONE (i965) | ||||
| BGRA vertex order (GL_ARB_vertex_array_bgra)          DONE (i965, r300, r600, radeonsi, swrast) | ||||
| Base vertex offset(GL_ARB_draw_elements_base_vertex)  DONE (i965, r300, r600, radeonsi, swrast) | ||||
| Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (i965, r300, r600, radeonsi, swrast) | ||||
| Provoking vertex (GL_ARB_provoking_vertex)            DONE (i965, r300, r600, radeonsi, swrast) | ||||
| Seamless cubemaps (GL_ARB_seamless_cube_map)          DONE (i965, r600, radeonsi) | ||||
| Multisample textures (GL_ARB_texture_multisample)     DONE (i965, r600, radeonsi) | ||||
| Frag depth clamp (GL_ARB_depth_clamp)                 DONE (i965, r600, swrast, radeonsi) | ||||
| Fence objects (GL_ARB_sync)                           DONE (i965, r300, r600, radeonsi, swrast) | ||||
| GLX_ARB_create_context_profile                        DONE | ||||
|  | ||||
|  | ||||
| GL 3.3 --- all DONE: i965, nv50, nvc0, radeonsi | ||||
| GL 3.3: | ||||
|  | ||||
|   GLSL 3.30                                             DONE () | ||||
|   GL_ARB_blend_func_extended                            DONE (r600, softpipe) | ||||
|   GL_ARB_explicit_attrib_location                       DONE (all drivers that support GLSL) | ||||
|   GL_ARB_occlusion_query2                               DONE (r300, r600, swrast) | ||||
|   GL_ARB_sampler_objects                                DONE (all drivers) | ||||
|   GL_ARB_shader_bit_encoding                            DONE (r600) | ||||
|   GL_ARB_texture_rgb10_a2ui                             DONE (r600) | ||||
|   GL_ARB_texture_swizzle                                DONE (r300, r600, swrast) | ||||
|   GL_ARB_timer_query                                    DONE (r600) | ||||
|   GL_ARB_instanced_arrays                               DONE (r300, r600) | ||||
|   GL_ARB_vertex_type_2_10_10_10_rev                     DONE (r600) | ||||
| GLSL 3.30                                             DONE (i965) | ||||
| GL_ARB_blend_func_extended                            DONE (i965, r600, radeonsi, softpipe) | ||||
| GL_ARB_explicit_attrib_location                       DONE (i915, i965, r300, r600, radeonsi, swrast) | ||||
| GL_ARB_occlusion_query2                               DONE (i965, r300, r600, radeonsi, swrast) | ||||
| GL_ARB_sampler_objects                                DONE (i965, r300, r600, radeonsi) | ||||
| GL_ARB_shader_bit_encoding                            DONE (i965, r600, radeonsi) | ||||
| GL_ARB_texture_rgb10_a2ui                             DONE (i965, r600, radeonsi) | ||||
| GL_ARB_texture_swizzle                                DONE (i965, r300, r600, radeonsi, swrast) | ||||
| GL_ARB_timer_query                                    DONE (i965, r600, radeonsi) | ||||
| GL_ARB_instanced_arrays                               DONE (i965, r300, r600, radeonsi) | ||||
| GL_ARB_vertex_type_2_10_10_10_rev                     DONE (i965, r600, radeonsi) | ||||
|  | ||||
|  | ||||
| GL 4.0: | ||||
|  | ||||
|   GLSL 4.0                                             not started | ||||
|   GL_ARB_texture_query_lod                             DONE (i965) | ||||
|   GL_ARB_draw_buffers_blend                            DONE (i965, nv50, nvc0, r600, radeonsi, softpipe) | ||||
|   GL_ARB_draw_indirect                                 DONE (i965) | ||||
|   GL_ARB_gpu_shader5                                   started | ||||
|   GL_ARB_gpu_shader_fp64                               not started | ||||
|   GL_ARB_sample_shading                                DONE (i965) | ||||
|   GL_ARB_shader_subroutine                             not started | ||||
|   GL_ARB_tessellation_shader                           not started | ||||
|   GL_ARB_texture_buffer_object_rgb32                   DONE (i965, r600, radeonsi, softpipe) | ||||
|   GL_ARB_texture_cube_map_array                        DONE (i965, nvc0, r600, softpipe) | ||||
|   GL_ARB_texture_gather                                DONE (i965) | ||||
|   GL_ARB_transform_feedback2                           DONE (i965, nv50, nvc0, r600, radeonsi) | ||||
|   GL_ARB_transform_feedback3                           DONE (i965, nv50, nvc0, r600, radeonsi) | ||||
| GLSL 4.0                                             not started | ||||
| GL_ARB_texture_query_lod                             DONE (i965) | ||||
| GL_ARB_draw_buffers_blend                            DONE (i965, r600, radeonsi, softpipe) | ||||
| GL_ARB_draw_indirect                                 started (Christoph) | ||||
| GL_ARB_gpu_shader5                                   started | ||||
| GL_ARB_gpu_shader_fp64                               not started | ||||
| GL_ARB_sample_shading                                DONE (i965) | ||||
| GL_ARB_shader_subroutine                             not started | ||||
| GL_ARB_tessellation_shader                           not started | ||||
| GL_ARB_texture_buffer_object_rgb32                   DONE (i965, r600, radeonsi, softpipe) | ||||
| GL_ARB_texture_cube_map_array                        DONE (i965, r600, softpipe) | ||||
| GL_ARB_texture_gather                                DONE (i965) | ||||
| GL_ARB_transform_feedback2                           DONE (i965, r600, radeonsi) | ||||
| GL_ARB_transform_feedback3                           DONE (i965, r600, radeonsi) | ||||
|  | ||||
|  | ||||
| GL 4.1: | ||||
|  | ||||
|   GLSL 4.1                                             not started | ||||
|   GL_ARB_ES2_compatibility                             DONE (i965, nv50, nvc0, r300, r600, radeonsi) | ||||
|   GL_ARB_get_program_binary                            DONE (0 binary formats) | ||||
|   GL_ARB_separate_shader_objects                       started (Ian Romanick, Gregory Hainaut) | ||||
|   GL_ARB_shader_precision                              not started | ||||
|   GL_ARB_vertex_attrib_64bit                           not started | ||||
|   GL_ARB_viewport_array                                DONE (i965) | ||||
| GLSL 4.1                                             not started | ||||
| GL_ARB_ES2_compatibility                             DONE (i965, r300, r600, radeonsi) | ||||
| GL_ARB_get_program_binary                            DONE (0 binary formats) | ||||
| GL_ARB_separate_shader_objects                       some infrastructure done | ||||
| GL_ARB_shader_precision                              not started | ||||
| GL_ARB_vertex_attrib_64bit                           not started | ||||
| GL_ARB_viewport_array                                not started | ||||
|  | ||||
|  | ||||
| GL 4.2: | ||||
|  | ||||
|   GLSL 4.2                                             not started | ||||
|   GL_ARB_texture_compression_bptc                      not started | ||||
|   GL_ARB_compressed_texture_pixel_storage              not started | ||||
|   GL_ARB_shader_atomic_counters                        DONE (i965) | ||||
|   GL_ARB_texture_storage                               DONE (all drivers) | ||||
|   GL_ARB_transform_feedback_instanced                  DONE (i965, nv50, nvc0, r600, radeonsi) | ||||
|   GL_ARB_base_instance                                 DONE (i965, nv50, nvc0, r600, radeonsi) | ||||
|   GL_ARB_shader_image_load_store                       in progress (curro) | ||||
|   GL_ARB_conservative_depth                            DONE (all drivers that support GLSL 1.30) | ||||
|   GL_ARB_shading_language_420pack                      DONE (all drivers that support GLSL 1.30) | ||||
|   GL_ARB_internalformat_query                          DONE (i965, nv50, nvc0, r300, r600, radeonsi) | ||||
|   GL_ARB_map_buffer_alignment                          DONE (all drivers) | ||||
| GLSL 4.2                                             not started | ||||
| GL_ARB_texture_compression_bptc                      not started | ||||
| GL_ARB_compressed_texture_pixel_storage              not started | ||||
| GL_ARB_shader_atomic_counters                        DONE (i965) | ||||
| GL_ARB_texture_storage                               DONE (all drivers) | ||||
| GL_ARB_transform_feedback_instanced                  DONE (i965, r600, radeonsi) | ||||
| GL_ARB_base_instance                                 DONE (i965, nv50, nvc0, r600, radeonsi) | ||||
| GL_ARB_shader_image_load_store                       not started | ||||
| GL_ARB_conservative_depth                            DONE (all drivers that support GLSL 1.30) | ||||
| GL_ARB_shading_language_420pack                      DONE (all drivers that support GLSL 1.30) | ||||
| GL_ARB_internalformat_query                          DONE (i965, r300, r600, radeonsi) | ||||
| GL_ARB_map_buffer_alignment                          DONE (r300, r600, radeonsi) | ||||
|  | ||||
|  | ||||
| GL 4.3: | ||||
|  | ||||
|   GLSL 4.3                                             not started | ||||
|   GL_ARB_arrays_of_arrays                              started | ||||
|   GL_ARB_ES3_compatibility                             DONE (i965) | ||||
|   GL_ARB_clear_buffer_object                           DONE (all drivers) | ||||
|   GL_ARB_compute_shader                                started (Paul Berry) | ||||
|   GL_ARB_copy_image                                    not started | ||||
|   GL_KHR_debug                                         DONE (all drivers) | ||||
|   GL_ARB_explicit_uniform_location                     not started | ||||
|   GL_ARB_fragment_layer_viewport                       not started | ||||
|   GL_ARB_framebuffer_no_attachments                    not started | ||||
|   GL_ARB_internalformat_query2                         not started | ||||
|   GL_ARB_invalidate_subdata                            DONE (all drivers) | ||||
|   GL_ARB_multi_draw_indirect                           DONE (i965) | ||||
|   GL_ARB_program_interface_query                       not started | ||||
|   GL_ARB_robust_buffer_access_behavior                 not started | ||||
|   GL_ARB_shader_image_size                             not started | ||||
|   GL_ARB_shader_storage_buffer_object                  not started | ||||
|   GL_ARB_stencil_texturing                             not started | ||||
|   GL_ARB_texture_buffer_range                          DONE (nv50, nvc0, i965, r600, radeonsi) | ||||
|   GL_ARB_texture_query_levels                          DONE (i965) | ||||
|   GL_ARB_texture_storage_multisample                   DONE (all drivers that support GL_ARB_texture_multisample) | ||||
|   GL_ARB_texture_view                                  started (Courtney Goeltzenleuchter, Chris Forbes) | ||||
|   GL_ARB_vertex_attrib_binding                         DONE (all drivers) | ||||
| GLSL 4.3                                             not started | ||||
| GL_ARB_arrays_of_arrays                              not started | ||||
| GL_ARB_ES3_compatibility                             DONE (i965) | ||||
| GL_ARB_clear_buffer_object                           not started | ||||
| GL_ARB_compute_shader                                not started | ||||
| GL_ARB_copy_image                                    not started | ||||
| GL_KHR_debug                                         DONE (all drivers) | ||||
| GL_ARB_explicit_uniform_location                     not started | ||||
| GL_ARB_fragment_layer_viewport                       not started | ||||
| GL_ARB_framebuffer_no_attachments                    not started | ||||
| GL_ARB_internalformat_query2                         not started | ||||
| GL_ARB_invalidate_subdata                            DONE (all drivers) | ||||
| GL_ARB_multi_draw_indirect                           not started | ||||
| GL_ARB_program_interface_query                       not started | ||||
| GL_ARB_robust_buffer_access_behavior                 not started | ||||
| GL_ARB_shader_image_size                             not started | ||||
| GL_ARB_shader_storage_buffer_object                  not started | ||||
| GL_ARB_stencil_texturing                             not started | ||||
| GL_ARB_texture_buffer_range                          DONE (nv50, nvc0, i965, r600, radeonsi) | ||||
| GL_ARB_texture_query_levels                          DONE (i965) | ||||
| GL_ARB_texture_storage_multisample                   DONE (all drivers that support GL_ARB_texture_multisample) | ||||
| GL_ARB_texture_view                                  not started | ||||
| GL_ARB_vertex_attrib_binding                         DONE (all drivers) | ||||
|  | ||||
|  | ||||
| GL 4.4: | ||||
|  | ||||
|   GLSL 4.4                                             not started | ||||
|   GL_MAX_VERTEX_ATTRIB_STRIDE                          not started | ||||
|   GL_ARB_buffer_storage                                not started | ||||
|   GL_ARB_clear_texture                                 not started | ||||
|   GL_ARB_enhanced_layouts                              not started | ||||
|   GL_ARB_multi_bind                                    started (Fredrik Höglund) | ||||
|   GL_ARB_query_buffer_object                           not started | ||||
|   GL_ARB_texture_mirror_clamp_to_edge                  DONE (i965, nv30, nv50, nvc0, r300, r600, radeonsi, swrast) | ||||
|   GL_ARB_texture_stencil8                              not started | ||||
|   GL_ARB_vertex_type_10f_11f_11f_rev                   DONE (i965, r600) | ||||
| GLSL 4.4                                             not started | ||||
| GL_MAX_VERTEX_ATTRIB_STRIDE                          not started | ||||
| GL_ARB_buffer_storage                                not started | ||||
| GL_ARB_clear_texture                                 not started | ||||
| GL_ARB_enhanced_layouts                              not started | ||||
| GL_ARB_multi_bind                                    not started | ||||
| GL_ARB_query_buffer_object                           not started | ||||
| GL_ARB_texture_mirror_clamp_to_edge                  DONE (i965, nv30, nv50, nvc0, r300, r600, radeonsi, swrast) | ||||
| GL_ARB_texture_stencil8                              not started | ||||
| GL_ARB_vertex_type_10f_11f_11f_rev                   DONE (i965, r600) | ||||
|  | ||||
|  | ||||
| More info about these features and the work involved can be found at | ||||
|   | ||||
							
								
								
									
										256
									
								
								docs/README.CYGWIN
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										256
									
								
								docs/README.CYGWIN
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,256 @@ | ||||
|  | ||||
|                           Mesa Cygwin/X11 Information | ||||
|  | ||||
|  | ||||
| WARNING | ||||
| ======= | ||||
|  | ||||
| If you installed X11 (packages xorg-x11-devel and xorg-x11-bin-dlls ) with the  | ||||
| latest setup.exe from Cygwin the GL (Mesa) libraries and include are already  | ||||
| installed in /usr/X11R6.  | ||||
|  | ||||
| The following will explain how to "replace" them. | ||||
|  | ||||
| Installation | ||||
| ============ | ||||
|  | ||||
| How to compile Mesa on Cygwin/X11 systems: | ||||
|  | ||||
| 1. Shared libs: | ||||
|     type 'make cygwin-sl'. | ||||
|  | ||||
|     When finished, the Mesa DLL will be in the Mesa-x.y/lib/ and  | ||||
|     Mesa-x.y/bin directories. | ||||
|  | ||||
|  | ||||
| 2. Static libs: | ||||
|     type 'make cygwin-static'. | ||||
|     When finished, the Mesa libraries will be in the Mesa-x.y/lib/ directory. | ||||
|  | ||||
| Header and library files: | ||||
|    After you've compiled Mesa and tried the demos I recommend the following | ||||
|    procedure for "installing" Mesa. | ||||
|  | ||||
|    Copy the Mesa include/GL directory to /usr/X11R6/include: | ||||
| 	cp -a include/GL /usr/X11R6/include | ||||
|  | ||||
|    Copy the Mesa library files to /usr/X11R6/lib: | ||||
| 	cp -a lib/* /usr/X11R6ocal/lib | ||||
|  | ||||
|    Copy the Mesa bin files (used by the DLL stuff) to /usr/X11R6/bin: | ||||
| 	cp -a lib/cyg* /usr/X11R6/bin | ||||
|  | ||||
| Xt/Motif widgets: | ||||
|    If you want to use Mesa or OpenGL in your Xt/Motif program you can build | ||||
|    the widgets found in either the widgets-mesa or widgets-sgi directories. | ||||
|    The former were written for Mesa and the later are the original SGI | ||||
|    widgets.  Look in those directories for more information. | ||||
|    For the Motif widgets you must have downloaded the lesstif package. | ||||
|  | ||||
|  | ||||
| Using the library | ||||
| ================= | ||||
|  | ||||
| Configuration options: | ||||
|    The file src/mesa/main/config.h has many parameters which you can adjust | ||||
|    such as maximum number of lights, clipping planes, maximum texture size, | ||||
|    etc.  In particular, you may want to change DEPTH_BITS from 16 to 32 | ||||
|    if a 16-bit depth buffer isn't precise enough for your application. | ||||
|  | ||||
|  | ||||
| Shared libraries: | ||||
|    If you compile shared libraries (Win32 DLLS) you may have to set an  | ||||
|    environment variable to specify where the Mesa libraries are located.   | ||||
|    Set the PATH variable to include /your-dir/Mesa-2.6/bin.    | ||||
|    Otherwise, when you try to run a demo it may fail with a message saying  | ||||
|    that one or more DLL couldn't be found. | ||||
|  | ||||
|  | ||||
| Xt/Motif Widgets: | ||||
|    Two versions of the Xt/Motif OpenGL drawing area widgets are included: | ||||
|  | ||||
|       widgets-sgi/	SGI's stock widgets | ||||
|       widgets-mesa/	Mesa-tuned widgets | ||||
|  | ||||
|    Look in those directories for details | ||||
|  | ||||
|  | ||||
| Togl: | ||||
|    Togl is an OpenGL/Mesa widget for Tcl/Tk. | ||||
|    See http://togl.sourceforge.net for more information. | ||||
|  | ||||
|  | ||||
|  | ||||
| X Display Modes: | ||||
|    Mesa supports RGB(A) rendering into almost any X visual type and depth. | ||||
|  | ||||
|    The glXChooseVisual function tries its best to pick an appropriate visual | ||||
|    for the given attribute list.  However, if this doesn't suit your needs | ||||
|    you can force Mesa to use any X visual you want (any supported by your | ||||
|    X server that is) by setting the MESA_RGB_VISUAL and MESA_CI_VISUAL | ||||
|    environment variables.  When an RGB visual is requested, glXChooseVisual | ||||
|    will first look if the MESA_RGB_VISUAL variable is defined.  If so, it | ||||
|    will try to use the specified visual.  Similarly, when a color index | ||||
|    visual is requested, glXChooseVisual will look for the MESA_CI_VISUAL | ||||
|    variable. | ||||
|  | ||||
|    The format of accepted values is:  <visual-class> <depth> | ||||
|    Here are some examples: | ||||
|  | ||||
|    using the C-shell: | ||||
| 	% setenv MESA_RGB_VISUAL "TrueColor 8"		// 8-bit TrueColor | ||||
| 	% setenv MESA_CI_VISUAL "PseudoColor 12"	// 12-bit PseudoColor | ||||
| 	% setenv MESA_RGB_VISUAL "PseudoColor 8"	// 8-bit PseudoColor | ||||
|  | ||||
|    using the KornShell: | ||||
| 	$ export MESA_RGB_VISUAL="TrueColor 8" | ||||
| 	$ export MESA_CI_VISUAL="PseudoColor 12" | ||||
| 	$ export MESA_RGB_VISUAL="PseudoColor 8" | ||||
|  | ||||
|  | ||||
| Double buffering: | ||||
|    Mesa can use either an X Pixmap or XImage as the backbuffer when in | ||||
|    double buffer mode.  Using GLX, the default is to use an XImage.  The | ||||
|    MESA_BACK_BUFFER environment variable can override this.  The valid | ||||
|    values for MESA_BACK_BUFFER are:  Pixmap and XImage (only the first | ||||
|    letter is checked, case doesn't matter). | ||||
|  | ||||
|    A pixmap is faster when drawing simple lines and polygons while an | ||||
|    XImage is faster when Mesa has to do pixel-by-pixel rendering.  If you | ||||
|    need depth buffering the XImage will almost surely be faster.  Exper- | ||||
|    iment with the MESA_BACK_BUFFER variable to see which is faster for | ||||
|    your application.   | ||||
|  | ||||
|  | ||||
| Colormaps: | ||||
|    When using Mesa directly or with GLX, it's up to the application writer | ||||
|    to create a window with an appropriate colormap.  The aux, tk, and GLUT | ||||
|    toolkits try to minimize colormap "flashing" by sharing colormaps when | ||||
|    possible.  Specifically, if the visual and depth of the window matches | ||||
|    that of the root window, the root window's colormap will be shared by | ||||
|    the Mesa window.  Otherwise, a new, private colormap will be allocated. | ||||
|  | ||||
|    When sharing the root colormap, Mesa may be unable to allocate the colors | ||||
|    it needs, resulting in poor color quality.  This can happen when a | ||||
|    large number of colorcells in the root colormap are already allocated. | ||||
|    To prevent colormap sharing in aux, tk and GLUT, define the environment | ||||
|    variable MESA_PRIVATE_CMAP.  The value isn't significant. | ||||
|  | ||||
|  | ||||
| Gamma correction: | ||||
|    To compensate for the nonlinear relationship between pixel values | ||||
|    and displayed intensities, there is a gamma correction feature in | ||||
|    Mesa.  Some systems, such as Silicon Graphics, support gamma | ||||
|    correction in hardware (man gamma) so you won't need to use Mesa's | ||||
|    gamma facility.  Other systems, however, may need gamma adjustment | ||||
|    to produce images which look correct.  If in the past you thought | ||||
|    Mesa's images were too dim, read on. | ||||
|  | ||||
|    Gamma correction is controlled with the MESA_GAMMA environment | ||||
|    variable.  Its value is of the form "Gr Gg Gb" or just "G" where | ||||
|    Gr is the red gamma value, Gg is the green gamma value, Gb is the | ||||
|    blue gamma value and G is one gamma value to use for all three | ||||
|    channels.  Each value is a positive real number typically in the | ||||
|    range 1.0 to 2.5.  The defaults are all 1.0, effectively disabling | ||||
|    gamma correction.  Examples using csh: | ||||
|  | ||||
| 	% setenv MESA_GAMMA "2.3 2.2 2.4"	// separate R,G,B values | ||||
| 	% setenv MESA_GAMMA "2.0"		// same gamma for R,G,B | ||||
|  | ||||
|    The demos/gamma.c program may help you to determine reasonable gamma | ||||
|    value for your display.  With correct gamma values, the color intensities | ||||
|    displayed in the top row (drawn by dithering) should nearly match those | ||||
|    in the bottom row (drawn as grays). | ||||
|  | ||||
|    Alex De Bruyn reports that gamma values of 1.6, 1.6 and 1.9 work well | ||||
|    on HP displays using the HP-ColorRecovery technology. | ||||
|  | ||||
|    Mesa implements gamma correction with a lookup table which translates | ||||
|    a "linear" pixel value to a gamma-corrected pixel value.  There is a | ||||
|    small performance penalty.  Gamma correction only works in RGB mode. | ||||
|    Also be aware that pixel values read back from the frame buffer will | ||||
|    not be "un-corrected" so glReadPixels may not return the same data | ||||
|    drawn with glDrawPixels. | ||||
|  | ||||
|    For more information about gamma correction see: | ||||
|    http://www.inforamp.net/~poynton/notes/colour_and_gamma/GammaFAQ.html | ||||
|  | ||||
|  | ||||
| Overlay Planes | ||||
|  | ||||
|    Overlay planes in the frame buffer are supported by Mesa but require | ||||
|    hardware and X server support.  To determine if your X server has | ||||
|    overlay support you can test for the SERVER_OVERLAY_VISUALS property: | ||||
|  | ||||
| 	xprop -root | grep SERVER_OVERLAY_VISUALS | ||||
|  | ||||
|  | ||||
| HPCR glClear(GL_COLOR_BUFFER_BIT) dithering | ||||
|  | ||||
|    If you set the MESA_HPCR_CLEAR environment variable then dithering | ||||
|    will be used when clearing the color buffer.  This is only applicable | ||||
|    to HP systems with the HPCR (Color Recovery) system. | ||||
|  | ||||
|  | ||||
| Extensions | ||||
| ========== | ||||
|    There are three Mesa-specific GLX extensions at this time. | ||||
|  | ||||
|    GLX_MESA_pixmap_colormap  | ||||
|  | ||||
|       This extension adds the GLX function: | ||||
|  | ||||
|          GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual, | ||||
|                                            Pixmap pixmap, Colormap cmap ) | ||||
|  | ||||
|       It is an alternative to the standard glXCreateGLXPixmap() function. | ||||
|       Since Mesa supports RGB rendering into any X visual, not just True- | ||||
|       Color or DirectColor, Mesa needs colormap information to convert RGB | ||||
|       values into pixel values.  An X window carries this information but a | ||||
|       pixmap does not.  This function associates a colormap to a GLX pixmap. | ||||
|       See the xdemos/glxpixmap.c file for an example of how to use this | ||||
|       extension. | ||||
|  | ||||
|    GLX_MESA_release_buffers | ||||
|  | ||||
|       Mesa associates a set of ancillary (depth, accumulation, stencil and | ||||
|       alpha) buffers with each X window it draws into.  These ancillary | ||||
|       buffers are allocated for each X window the first time the X window | ||||
|       is passed to glXMakeCurrent().  Mesa, however, can't detect when an | ||||
|       X window has been destroyed in order to free the ancillary buffers. | ||||
|  | ||||
|       The best it can do is to check for recently destroyed windows whenever | ||||
|       the client calls the glXCreateContext() or glXDestroyContext() | ||||
|       functions.  This may not be sufficient in all situations though. | ||||
|  | ||||
|       The GLX_MESA_release_buffers extension allows a client to explicitly | ||||
|       deallocate the ancillary buffers by calling glxReleaseBuffersMESA() | ||||
|       just before an X window is destroyed.  For example: | ||||
|  | ||||
|          #ifdef GLX_MESA_release_buffers | ||||
|             glXReleaseBuffersMESA( dpy, window ); | ||||
|          #endif | ||||
|          XDestroyWindow( dpy, window ); | ||||
|  | ||||
|       This extension is new in Mesa 2.0. | ||||
|  | ||||
|    GLX_MESA_copy_sub_buffer | ||||
|  | ||||
|       This extension adds the glXCopySubBufferMESA() function.  It works | ||||
|       like glXSwapBuffers() but only copies a sub-region of the window | ||||
|       instead of the whole window. | ||||
|  | ||||
|       This extension is new in Mesa version 2.6 | ||||
|  | ||||
|  | ||||
|  | ||||
| Summary of X-related environment variables: | ||||
|    MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode (X only) | ||||
|    MESA_CI_VISUAL - specifies the X visual and depth for CI mode (X only) | ||||
|    MESA_BACK_BUFFER - specifies how to implement the back color buffer (X only) | ||||
|    MESA_PRIVATE_CMAP - force aux/tk libraries to use private colormaps (X only) | ||||
|    MESA_GAMMA - gamma correction coefficients (X only) | ||||
|  | ||||
|  | ||||
| ---------------------------------------------------------------------- | ||||
| README.CYGWIN - lassauge April 2004 - based on README.X11 | ||||
							
								
								
									
										102
									
								
								docs/README.MITS
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										102
									
								
								docs/README.MITS
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,102 @@ | ||||
|  | ||||
| 			Mesa 3.0 MITS Information | ||||
|  | ||||
|  | ||||
| This software is distributed under the terms of the GNU Library | ||||
| General Public License, see the LICENSE file for details. | ||||
|  | ||||
|  | ||||
| This document is a preliminary introduction to help you get | ||||
| started. For more detaile information consult the web page. | ||||
|  | ||||
| http://10-dencies.zkm.de/~mesa/ | ||||
|  | ||||
|  | ||||
|  | ||||
| Version 0.1 (Yes it's very alpha code so be warned!) | ||||
| Contributors:  | ||||
|   Emil Briggs    	(briggs@bucky.physics.ncsu.edu) | ||||
|   David Bucciarelli 	(tech.hmw@plus.it) | ||||
|   Andreas Schiffler 	(schiffler@zkm.de) | ||||
|  | ||||
|  | ||||
|  | ||||
| 1. Requirements: | ||||
|      Mesa 3.0. | ||||
|      An SMP capable machine running Linux 2.x | ||||
|      libpthread installed on your machine. | ||||
|  | ||||
|  | ||||
| 2. What does MITS stand for? | ||||
|      MITS stands for Mesa Internal Threading System. By adding | ||||
|      internal threading to Mesa it should be possible to improve | ||||
|      performance of OpenGL applications on SMP machines. | ||||
|  | ||||
|  | ||||
| 3. Do applications have to be recoded to take advantage of MITS? | ||||
|      No. The threading is internal to Mesa and transparent to | ||||
|      applications. | ||||
|  | ||||
|  | ||||
| 4. Will all applications benefit from the current implementation of MITS? | ||||
|      No. This implementation splits the processing of the vertex buffer | ||||
|      over two threads. There is a certain amount of overhead involved | ||||
|      with the thread synchronization and if there is not enough work | ||||
|      to be done the extra overhead outweighs any speedup from using | ||||
|      dual processors. You will not for example see any speedup when | ||||
|      running Quake because it uses GL_POLYGON and there is only one | ||||
|      polygon for each vertex buffer processed. Test results on a | ||||
|      dual 200 Mhz. Pentium Pro system show that one needs around | ||||
|      100-200 vertices in the vertex buffer before any there is any | ||||
|      appreciable benefit from the threading. | ||||
|  | ||||
|  | ||||
| 5. Are there any parameters that I can tune to try to improve performance. | ||||
|      Yes. You can try to vary the size of the vertex buffer which is | ||||
|      define in VB_MAX located in the file src/vb.h from your top level | ||||
|      Mesa distribution. The number needs to be a multiple of 12 and | ||||
|      the optimum value will probably depend on the capabilities of | ||||
|      your machine and the particular application you are running. | ||||
|  | ||||
|  | ||||
| 6. Are there any ways I can modify the application to improve its | ||||
|    performance with the MITS? | ||||
|      Yes. Try to use as many vertices between each Begin/End pair | ||||
|      as possbile. This will reduce the thread synchronization | ||||
|      overhead. | ||||
|  | ||||
|  | ||||
| 7. What sort of speedups can I expect? | ||||
|      On some benchmarks performance gains of up to 30% have been | ||||
|      observerd. Others may see no gain at all and in a few rare | ||||
|      cases even some degradation. | ||||
|  | ||||
|  | ||||
| 8. What still needs to be done? | ||||
|      Lots of testing and benchmarking. | ||||
|      A portable implementation that works within the Mesa thread API. | ||||
|      Threading of additional areas of Mesa to improve performance | ||||
|      even more. | ||||
|  | ||||
|  | ||||
|  | ||||
| Installation: | ||||
|  | ||||
|    1. This assumes that you already have a working Mesa 3.0 installation | ||||
|       from source. | ||||
|    2. Place the tarball MITS.tar.gz in your top level Mesa directory. | ||||
|    3. Unzip it and untar it. It will replace the following files in | ||||
|       your Mesa source tree so back them up if you want to save them. | ||||
|  | ||||
|  | ||||
| 	 README.MITS | ||||
|          Make-config | ||||
| 	 Makefile | ||||
| 	 mklib.glide | ||||
|          src/vbxform.c | ||||
| 	 src/vb.h | ||||
|  | ||||
|    4. Rebuild Mesa using the command | ||||
|  | ||||
|           make linux-386-glide-mits | ||||
|  | ||||
							
								
								
									
										207
									
								
								docs/README.QUAKE
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										207
									
								
								docs/README.QUAKE
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,207 @@ | ||||
|  | ||||
|              Info on using Mesa 3.0 with Linux Quake I and Quake II | ||||
|  | ||||
|  | ||||
|  | ||||
| Disclaimer | ||||
| ---------- | ||||
|  | ||||
| I am _not_ a Quake expert by any means.  I pretty much only run it to | ||||
| test Mesa.  There have been a lot of questions about Linux Quake and | ||||
| Mesa so I'm trying to provide some useful info here.  If this file | ||||
| doesn't help you then you should look elsewhere for help.  The Mesa | ||||
| mailing list or the news://news.3dfx.com/3dfx.linux.glide newsgroup | ||||
| might be good. | ||||
|  | ||||
| Again, all the information I have is in this file.  Please don't email | ||||
| me with questions. | ||||
|  | ||||
| If you have information to contribute to this file please send it to | ||||
| me at brianp@elastic.avid.com | ||||
|  | ||||
|  | ||||
|  | ||||
| Linux Quake | ||||
| ----------- | ||||
|  | ||||
| You can get Linux Quake from http://www.idsoftware.com/ | ||||
|  | ||||
| Quake I and II for Linux were tested with, and include, Mesa 2.6.  You | ||||
| shouldn't have too many problems if you simply follow the instructions | ||||
| in the Quake distribution. | ||||
|  | ||||
|  | ||||
|  | ||||
| RedHat 5.0 Linux problems | ||||
| ------------------------- | ||||
|  | ||||
| RedHat Linux 5.x uses the GNU C library ("glibc" or "libc6") whereas | ||||
| previous RedHat and other Linux distributions use "libc5" for its | ||||
| runtime C library. | ||||
|  | ||||
| Linux Quake I and II were compiled for libc5.  If you compile Mesa | ||||
| on a RedHat 5.x system the resulting libMesaGL.so file will not work | ||||
| with Linux Quake because of the different C runtime libraries. | ||||
| The symptom of this is a segmentation fault soon after starting Quake. | ||||
|  | ||||
| If you want to use a newer version of Mesa (like 3.x) with Quake on | ||||
| RedHat 5.x then read on. | ||||
|  | ||||
| The solution to the C library problem is to force Mesa to use libc5. | ||||
| libc5 is in /usr/i486-linux-libc5/lib on RedHat 5.x systems. | ||||
|  | ||||
| Emil Briggs (briggs@tick.physics.ncsu.edu) nicely gave me the following | ||||
| info: | ||||
|  | ||||
| >   I only know what works on a RedHat 5.0 distribution. RH5 includes | ||||
| > a full set of libraries for both libc5 and glibc. The loader ld.so | ||||
| > uses the libc5 libraries in /usr/i486-linux-libc5/lib for programs | ||||
| > linked against libc5 while it uses the glibc libraries in /lib and | ||||
| > /usr/lib for programs linked against glibc. | ||||
| >  | ||||
| > Anyway I changed line 41 of mklib.glide to | ||||
| >     GLIDELIBS="-L/usr/local/glide/lib -lglide2x -L/usr/i486-linux-libc5/lib" | ||||
| >  | ||||
| > And I started quake2 up with a script like this | ||||
| > #!/bin/csh | ||||
| > setenv LD_LIBRARY_PATH /usr/i486-linux-libc5/lib | ||||
| > setenv MESA_GLX_FX f | ||||
| > ./quake2 +set vid_ref gl | ||||
| > kbd_mode -a | ||||
| > reset | ||||
|  | ||||
|  | ||||
| I've already patched the mklib.glide file.  You'll have to start Quake | ||||
| with the script shown above though. | ||||
|  | ||||
|  | ||||
|  | ||||
| ********************** | ||||
|  | ||||
| Daryll Strauss writes: | ||||
|  | ||||
| Here's my thoughts on the problem. On a RH 5.x system, you can NOT build | ||||
| a libc5 executable or library. Red Hat just doesn't include the right | ||||
| stuff to do it. | ||||
|  | ||||
| Since Quake is a libc5 based application, you are in trouble. You need | ||||
| libc5 libraries. | ||||
|  | ||||
| What can you do about it? Well there's a package called gcc5 that does | ||||
| MOST of the right stuff to compile with libc5. (It brings back older | ||||
| header files, makes appropriate symbolic links for libraries, and sets | ||||
| up the compiler to use the correct directories) You can find gcc5 here:  | ||||
| ftp://ecg.mit.edu/pub/linux/gcc5-1.0-1.i386.rpm | ||||
|  | ||||
| No, this isn't quite enough. There are still a few tricks to getting | ||||
| Mesa to compile as a libc5 application. First you have to make sure that | ||||
| every compile uses gcc5 instead of gcc. Second, in some cases the link | ||||
| line actually lists -L/usr/lib which breaks gcc5 (because it forces you | ||||
| to use the glibc version of things) | ||||
|  | ||||
| If you get all the stuff correctly compiled with gcc5 it should work. | ||||
| I've run Mesa 3.0B6  and its demos in a window with my Rush on a Red Hat | ||||
| 5.1 system. It is a big hassle, but it can be done. I've only made Quake | ||||
| segfault, but I think that's from my libRush using the wrong libc.  | ||||
|  | ||||
| Yes, mixing libc5 and glibc is a major pain. I've been working to get | ||||
| all my libraries compiling correctly with this setup. Someone should | ||||
| make an RPM out of it and feed changes back to Brian once they get it | ||||
| all working. If no one else has done so by the time I get the rest of my | ||||
| stuff straightened out, I'll try to do it myself. | ||||
|  | ||||
| 							- |Daryll | ||||
|  | ||||
|  | ||||
|  | ||||
| ********************* | ||||
|  | ||||
| David Bucciarelli (tech.hmw@plus.it) writes: | ||||
|  | ||||
| I'm using the Mesa-3.0beta7 and the RedHat 5.1 and QuakeII is | ||||
| working fine for me.  I had only to make a small change to the | ||||
| Mesa-3.0/mklib.glide file, from: | ||||
|  | ||||
|  | ||||
|     GLIDELIBS="-L/usr/local/glide/lib -lglide2x | ||||
| -L/usr/i486-linux-libc5/lib -lm" | ||||
|  | ||||
| to: | ||||
|  | ||||
|     GLIDELIBS="-L/usr/i486-linux-libc5/lib -lglide2x" | ||||
|  | ||||
| and to make two symbolic links: | ||||
|  | ||||
| [david@localhost Mesa]$ ln -s libMesaGL.so libMesaGL.so.2 | ||||
| [david@localhost Mesa]$ ln -s libMesaGLU.so libMesaGLU.so.2 | ||||
|  | ||||
| I'm using the Daryll's Linux glide rpm for the Voodoo2 and glibc (it | ||||
| includes also the Glide for the libc5). I'm not using the /dev/3Dfx and | ||||
| running QuakeII as root with the following env. var: | ||||
|  | ||||
| export | ||||
| LD_LIBRARY_PATH=/dsk1/home/david/src/gl/Mesa/lib:/usr/i486-linux-libc5/lib | ||||
|  | ||||
| I think that all problems are related to the glibc, Quake will never | ||||
| work if you get the following output: | ||||
|  | ||||
| [david@localhost Mesa]$ ldd lib/libMesaGL.so | ||||
|         libglide2x.so => /usr/lib/libglide2x.so (0x400f8000) | ||||
|         libm.so.6 => /lib/libm.so.6 (0x40244000) | ||||
|         libc.so.6 => /lib/libc.so.6 (0x4025d000) | ||||
|         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000) | ||||
|  | ||||
| You must get the following outputs: | ||||
|  | ||||
| [david@localhost Mesa]# ldd lib/libMesaGL.so | ||||
|         libglide2x.so => /usr/i486-linux-libc5/lib/libglide2x.so | ||||
| (0x400f3000) | ||||
|  | ||||
| [root@localhost quake2]# ldd quake2 | ||||
|         libdl.so.1 => /lib/libdl.so.1 (0x40005000) | ||||
|         libm.so.5 => /usr/i486-linux-libc5/lib/libm.so.5 (0x40008000) | ||||
|         libc.so.5 => /usr/i486-linux-libc5/lib/libc.so.5 (0x40010000) | ||||
|  | ||||
| [root@localhost quake2]# ldd ref_gl.so | ||||
|         libMesaGL.so.2 => | ||||
| /dsk1/home/david/src/gl/Mesa/lib/libMesaGL.so.2 (0x400eb000) | ||||
|         libglide2x.so => /usr/i486-linux-libc5/lib/libglide2x.so | ||||
| (0x401d9000) | ||||
|         libX11.so.6 => /usr/i486-linux-libc5/lib/libX11.so.6 | ||||
| (0x40324000) | ||||
|         libXext.so.6 => /usr/i486-linux-libc5/lib/libXext.so.6 | ||||
| (0x403b7000) | ||||
|         libvga.so.1 => /usr/i486-linux-libc5/lib/libvga.so.1 | ||||
| (0x403c1000) | ||||
|         libm.so.5 => /usr/i486-linux-libc5/lib/libm.so.5 (0x403f5000) | ||||
|         libc.so.5 => /usr/i486-linux-libc5/lib/libc.so.5 (0x403fd000) | ||||
|  | ||||
|  | ||||
| *********************** | ||||
|  | ||||
| Steve Davies (steve@one47.demon.co.uk) writes: | ||||
|  | ||||
|  | ||||
| Try using: | ||||
|  | ||||
|     export LD_LIBRARY_PATH=/usr/i486-linux-libc5/lib | ||||
|     ./quake2 +set vid_ref gl | ||||
|  | ||||
| to start the game... Works for me, but assumes that you have the | ||||
| compatability libc5 RPMs installed. | ||||
|  | ||||
|  | ||||
| *************************** | ||||
|  | ||||
| WWW resources - you may find additional Linux Quake help at these URLs: | ||||
|  | ||||
|  | ||||
| http://quake.medina.net/howto | ||||
|  | ||||
| http://webpages.mr.net/bobz | ||||
|  | ||||
| http://www.linuxgames.com/quake2/ | ||||
|  | ||||
|  | ||||
|  | ||||
| ---------------------------------------------------------------------- | ||||
							
								
								
									
										52
									
								
								docs/README.THREADS
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								docs/README.THREADS
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,52 @@ | ||||
|  | ||||
|  | ||||
| Mesa Threads README | ||||
| ------------------- | ||||
|  | ||||
| Thread safety was introduced in Mesa 2.6 by John Stone and | ||||
| Christoph Poliwoda. | ||||
|  | ||||
| It was redesigned in Mesa 3.3 so that thread safety is | ||||
| supported by default (on systems which support threads, | ||||
| that is).  There is no measurable penalty on single | ||||
| threaded applications. | ||||
|  | ||||
| NOTE that the only _driver_ which is thread safe at this time | ||||
| is the OS/Mesa driver! | ||||
|  | ||||
|  | ||||
| At present the mthreads code supports three thread APIS: | ||||
|   1) POSIX threads (aka pthreads). | ||||
|   2) Solaris / Unix International threads. | ||||
|   3) Win32 threads (Win 95/NT). | ||||
|  | ||||
| Support for other thread libraries can be added src/glthread.[ch] | ||||
|  | ||||
|  | ||||
| In order to guarantee proper operation, it is | ||||
| necessary for both Mesa and application code to use the same threads API. | ||||
| So, if your application uses Sun's thread API, then you should build Mesa | ||||
| using one of the targets for Sun threads. | ||||
|  | ||||
| The mtdemos directory contains some example programs which use  | ||||
| multiple threads to render to osmesa rendering context(s). | ||||
|  | ||||
| Linux users should be aware that there exist many different POSIX | ||||
| threads packages. The best solution is the linuxthreads package | ||||
| (http://pauillac.inria.fr/~xleroy/linuxthreads/) as this package is the | ||||
| only one that really supports multiprocessor machines (AFAIK). See | ||||
| http://pauillac.inria.fr/~xleroy/linuxthreads/README for further | ||||
| information about the usage of linuxthreads. | ||||
|  | ||||
| If you are interested in helping with thread safety work in Mesa | ||||
| join the Mesa developers mailing list and post your proposal. | ||||
|  | ||||
|  | ||||
| Regards, | ||||
|   John Stone           -- j.stone@acm.org  johns@cs.umr.edu | ||||
|   Christoph Poliwoda   -- poliwoda@volumegraphics.com | ||||
|  | ||||
|  | ||||
| Version info: | ||||
|    Mesa 2.6 - initial thread support. | ||||
|    Mesa 3.3 - thread support mostly rewritten (Brian Paul) | ||||
| @@ -19,7 +19,7 @@ | ||||
| <p> | ||||
| The SGI OpenGL conformance tests verify correct operation of OpenGL | ||||
| implementations.  I, Brian Paul, have been given a copy of the tests | ||||
| for testing Mesa.  The tests are not publicly available. | ||||
| for testing Mesa.  The tests are not publically available. | ||||
| </p> | ||||
| <p> | ||||
| This file has the latest results of testing Mesa with the OpenGL 1.2 | ||||
|   | ||||
| @@ -17,7 +17,7 @@ | ||||
| <h1>Development Notes</h1> | ||||
|  | ||||
|  | ||||
| <h2>Adding Extensions</h2> | ||||
| <h2>Adding Extentions</h2> | ||||
|  | ||||
| <p> | ||||
| To add a new GL extension to Mesa you have to do at least the following. | ||||
| @@ -190,26 +190,11 @@ you should add an appropriate note to the commit message. | ||||
| Here are some examples of such a note: | ||||
| </p> | ||||
| <ul> | ||||
|   <li>CC: <mesa-stable@lists.freedesktop.org></li> | ||||
|   <li>CC: "9.2 10.0" <mesa-stable@lists.freedesktop.org></li> | ||||
|   <li>CC: "10.0" <mesa-stable@lists.freedesktop.org></li> | ||||
|   <li>NOTE: This is a candidate for the 9.0 branch.</li> | ||||
|   <li>NOTE: This is a candidate for the 8.0 and 9.0 branches.</li> | ||||
|   <li>NOTE: This is a candidate for the stable branches.</li> | ||||
| </ul> | ||||
|  | ||||
| Simply adding the CC to the mesa-stable list address is adequate to nominate | ||||
| the commit for the most-recently-created stable branch. It is only necessary | ||||
| to specify a specific branch name, (such as "9.2 10.0" or "10.0" in the | ||||
| examples above), if you want to nominate the commit for an older stable | ||||
| branch. And, as in these examples, you can nominate the commit for the older | ||||
| branch in addition to the more recent branch, or nominate the commit | ||||
| exclusively for the older branch. | ||||
|  | ||||
| This "CC" syntax for patch nomination will cause patches to automatically be | ||||
| copied to the mesa-stable@ mailing list when you use "git send-email" to send | ||||
| patches to the mesa-dev@ mailing list. Also, if you realize that a commit | ||||
| should be nominated for the stable branch after it has already been committed, | ||||
| you can send a note directly to the mesa-stable@lists.freedesktop.org where | ||||
| the Mesa stable-branch maintainers will receive it. Be sure to mention the | ||||
| commit ID of the commit of interest (as it appears in the mesa master branch). | ||||
|  | ||||
| <h2>Cherry-picking candidates for a stable branch</h2> | ||||
|  | ||||
|   | ||||
| @@ -25,7 +25,7 @@ href="#overview">overview of Mesa's implementation</a>.</p> | ||||
| <h2>1. Complexity of GL Dispatch</h2> | ||||
|  | ||||
| <p>Every GL application has at least one object called a GL <em>context</em>. | ||||
| This object, which is an implicit parameter to every GL function, stores all | ||||
| This object, which is an implicit parameter to ever GL function, stores all | ||||
| of the GL related state for the application.  Every texture, every buffer | ||||
| object, every enable, and much, much more is stored in the context.  Since | ||||
| an application can have more than one context, the context to be used is | ||||
| @@ -51,7 +51,7 @@ example, <tt>glFogCoordf</tt> may operate differently depending on whether | ||||
| or not fog is enabled.</p> | ||||
|  | ||||
| <p>In multi-threaded environments, it is possible for each thread to have a | ||||
| different GL context current.  This means that poor old <tt>glVertex3fv</tt> | ||||
| differnt GL context current.  This means that poor old <tt>glVertex3fv</tt> | ||||
| has to know which GL context is current in the thread where it is being | ||||
| called.</p> | ||||
|  | ||||
| @@ -207,13 +207,13 @@ few preprocessor defines.</p> | ||||
| <li>If <tt>GLX_USE_TLS</tt> is defined, method #4 is used.</li> | ||||
| <li>If <tt>HAVE_PTHREAD</tt> is defined, method #3 is used.</li> | ||||
| <li>If <tt>WIN32_THREADS</tt> is defined, method #2 is used.</li> | ||||
| <li>If none of the preceding are defined, method #1 is used.</li> | ||||
| <li>If none of the preceeding are defined, method #1 is used.</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Two different techniques are used to handle the various different cases. | ||||
| On x86 and SPARC, a macro called <tt>GL_STUB</tt> is used.  In the preamble | ||||
| of the assembly source file different implementations of the macro are | ||||
| selected based on the defined preprocessor variables.  The assembly code | ||||
| selected based on the defined preprocessor variables.  The assmebly code | ||||
| then consists of a series of invocations of the macros such as: | ||||
|  | ||||
| <blockquote> | ||||
| @@ -242,7 +242,7 @@ first technique, is to insert <tt>#ifdef</tt> within the assembly | ||||
| implementation of each function.  This makes the assembly file considerably | ||||
| larger (e.g., 29,332 lines for <tt>glapi_x86-64.S</tt> versus 1,155 lines for | ||||
| <tt>glapi_x86.S</tt>) and causes simple changes to the function | ||||
| implementation to generate many lines of diffs.  Since the assembly files | ||||
| implementation to generate many lines of diffs.  Since the assmebly files | ||||
| are typically generated by scripts (see <a href="#autogen">below</a>), this | ||||
| isn't a significant problem.</p> | ||||
|  | ||||
|   | ||||
| @@ -88,7 +88,7 @@ drivers will be installed to <code>${libdir}/egl</code>.</p> | ||||
| <dd> | ||||
|  | ||||
| <p>List the platforms (window systems) to support.  Its argument is a comma | ||||
| separated string such as <code>--with-egl-platforms=x11,drm</code>.  It decides | ||||
| seprated string such as <code>--with-egl-platforms=x11,drm</code>.  It decides | ||||
| the platforms a driver may support.  The first listed platform is also used by | ||||
| the main library to decide the native platform: the platform the EGL native | ||||
| types such as <code>EGLNativeDisplayType</code> or | ||||
| @@ -223,7 +223,7 @@ the X server directly using (XCB-)DRI2 protocol.</p> | ||||
| <dd> | ||||
|  | ||||
| <p>This driver is based on Gallium3D.  It supports all rendering APIs and | ||||
| hardware supported by Gallium3D.  It is the only driver that supports OpenVG. | ||||
| hardwares supported by Gallium3D.  It is the only driver that supports OpenVG. | ||||
| The supported platforms are X11, DRM, FBDEV, and GDI.</p> | ||||
|  | ||||
| <p>This driver comes with its own hardware drivers | ||||
| @@ -273,8 +273,8 @@ longer than the display that creates them.</p> | ||||
|  | ||||
| <p>In EGL, when a display is terminated through <code>eglTerminate</code>, all | ||||
| display resources should be destroyed.  Similarly, when a thread is released | ||||
| through <code>eglReleaseThread</code>, all current display resources should be | ||||
| released.  Another way to destroy or release resources is through functions | ||||
| throught <code>eglReleaseThread</code>, all current display resources should be | ||||
| released.  Another way to destory or release resources is through functions | ||||
| such as <code>eglDestroySurface</code> or <code>eglMakeCurrent</code>.</p> | ||||
|  | ||||
| <p>When a resource that is current to some thread is destroyed, the resource | ||||
|   | ||||
| @@ -47,7 +47,7 @@ sometimes be useful for debugging end-user issues. | ||||
| <li>MESA_NO_SSE - if set, disables Intel SSE optimizations | ||||
| <li>MESA_DEBUG - if set, error messages are printed to stderr.  For example, | ||||
|    if the application generates a GL_INVALID_ENUM error, a corresponding error | ||||
|    message indicating where the error occurred, and possibly why, will be | ||||
|    message indicating where the error occured, and possibly why, will be | ||||
|    printed to stderr.<br> | ||||
|    If the value of MESA_DEBUG is 'FP' floating point arithmetic errors will | ||||
|    generate exceptions. | ||||
| @@ -121,38 +121,10 @@ See the <a href="xlibdriver.html">Xlib software driver page</a> for details. | ||||
| <h2>i945/i965 driver environment variables (non-Gallium)</h2> | ||||
|  | ||||
| <ul> | ||||
| <li>INTEL_NO_HW - if set to 1, prevents batches from being submitted to the hardware. | ||||
|    This is useful for debugging hangs, etc.</li> | ||||
| <li>INTEL_DEBUG - a comma-separated list of named flags, which do various things: | ||||
| <ul> | ||||
|    <li>tex - emit messages about textures.</li> | ||||
|    <li>state - emit messages about state flag tracking</li> | ||||
|    <li>blit - emit messages about blit operations</li> | ||||
|    <li>miptree - emit messages about miptrees</li> | ||||
|    <li>perf - emit messages about performance issues</li> | ||||
|    <li>perfmon - emit messages about AMD_performance_monitor</li> | ||||
|    <li>bat - emit batch information</li> | ||||
|    <li>pix - emit messages about pixel operations</li> | ||||
|    <li>buf - emit messages about buffer objects</li> | ||||
|    <li>reg - emit messages about regions</li> | ||||
|    <li>fbo - emit messages about framebuffers</li> | ||||
|    <li>fs - dump shader assembly for fragment shaders</li> | ||||
|    <li>gs - dump shader assembly for geometry shaders</li> | ||||
|    <li>sync - emit messages about synchronization</li> | ||||
|    <li>prim - emit messages about drawing primitives</li> | ||||
|    <li>vert - emit messages about vertex assembly</li> | ||||
|    <li>dri - emit messages about the DRI interface</li> | ||||
|    <li>sf - emit messages about the strips & fans unit (for old gens, includes the SF program)</li> | ||||
|    <li>stats - enable statistics counters. you probably actually want perfmon or intel_gpu_top instead.</li> | ||||
|    <li>urb - emit messages about URB setup</li> | ||||
|    <li>vs - dump shader assembly for vertex shaders</li> | ||||
|    <li>clip - emit messages about the clip unit (for old gens, includes the CLIP program)</li> | ||||
|    <li>aub - dump batches into an AUB trace for use with simulation tools</li> | ||||
|    <li>shader_time - record how much GPU time is spent in each shader</li> | ||||
|    <li>no16 - suppress generation of 16-wide fragment shaders. useful for debugging broken shaders</li> | ||||
|    <li>blorp - emit messages about the blorp operations (blits & clears)</li> | ||||
|    <li>nodualobj - suppress generation of dual-object geometry shader code</li> | ||||
| </ul> | ||||
| <li>INTEL_STRICT_CONFORMANCE - if set to 1, enable sw fallbacks to improve | ||||
|     OpenGL conformance.  If set to 2, always use software rendering. | ||||
| <li>INTEL_NO_BLIT - if set, disable hardware-accelerated glBitmap, | ||||
|     glCopyPixels, glDrawPixels. | ||||
| </ul> | ||||
|  | ||||
|  | ||||
| @@ -201,14 +173,14 @@ See src/mesa/state_tracker/st_debug.c for other options. | ||||
|     to stderr | ||||
| <li>SOFTPIPE_NO_RAST - if set, rasterization is no-op'd.  For profiling purposes. | ||||
| <li>SOFTPIPE_USE_LLVM - if set, the softpipe driver will try to use LLVM JIT for | ||||
|     vertex shading processing. | ||||
|     vertex shading procesing. | ||||
| </ul> | ||||
|  | ||||
|  | ||||
| <h3>LLVMpipe driver environment variables</h3> | ||||
| <ul> | ||||
| <li>LP_NO_RAST - if set LLVMpipe will no-op rasterization | ||||
| <li>LP_DEBUG - a comma-separated list of debug options is accepted.  See the | ||||
| <li>LP_DEBUG - a comma-separated list of debug options is acceptec.  See the | ||||
|     source code for details. | ||||
| <li>LP_PERF - a comma-separated list of options to selectively no-op various | ||||
|     parts of the driver.  See the source code for details. | ||||
|   | ||||
| @@ -137,7 +137,7 @@ Just follow the Mesa <a href="install.html">compilation instructions</a>. | ||||
| <h2>1.6 Are there other open-source implementations of OpenGL?</h2> | ||||
| <p> | ||||
| Yes, SGI's <a href="http://oss.sgi.com/projects/ogl-sample/index.html"> | ||||
| OpenGL Sample Implementation (SI)</a> is available. | ||||
| OpenGL Sample Implemenation (SI)</a> is available. | ||||
| The SI was written during the time that OpenGL was originally designed. | ||||
| Unfortunately, development of the SI has stagnated. | ||||
| Mesa is much more up to date with modern features and extensions. | ||||
| @@ -353,7 +353,7 @@ That's where Mesa development is discussed. | ||||
| </p> | ||||
| <p> | ||||
| The <a href="http://www.opengl.org/documentation"> | ||||
| OpenGL Specification</a> is the bible for OpenGL implementation work. | ||||
| OpenGL Specification</a> is the bible for OpenGL implemention work. | ||||
| You should read it. | ||||
| </p> | ||||
| <p>Most of the Mesa development work involves implementing new OpenGL | ||||
| @@ -375,7 +375,7 @@ For a Gallium3D hardware driver, the r300g, r600g and the i915g are good example | ||||
| </p> | ||||
| <p>The DRI website has more information about writing hardware drivers. | ||||
| The process isn't well document because the Mesa driver interface changes | ||||
| over time, and we seldom have spare time for writing documentation. | ||||
| over time, and we seldome have spare time for writing documentation. | ||||
| That being said, many people have managed to figure out the process. | ||||
| </p> | ||||
| <p> | ||||
| @@ -390,7 +390,7 @@ The <a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/texture_compres | ||||
| indicates that there are intellectual property (IP) and/or patent issues | ||||
| to be dealt with. | ||||
| </p> | ||||
| <p>We've been unsuccessful in getting a response from S3 (or whoever owns | ||||
| <p>We've been unsucessful in getting a response from S3 (or whoever owns | ||||
| the IP nowadays) to indicate whether or not an open source project can | ||||
| implement the extension (specifically the compression/decompression | ||||
| algorithms). | ||||
|   | ||||
| @@ -16,38 +16,6 @@ | ||||
|  | ||||
| <h1>News</h1> | ||||
|  | ||||
| <h2>January 9, 2014</h2> | ||||
| <p> | ||||
| <a href="relnotes/10.0.2.html">Mesa 10.0.2</a> is released. | ||||
| This is a bug-fix release. | ||||
| </p> | ||||
|  | ||||
| <h2>December 12, 2013</h2> | ||||
| <p> | ||||
| <a href="relnotes/10.0.1.html">Mesa 10.0.1</a> | ||||
| and <a href="relnotes/9.2.5.html">Mesa 9.2.5</a> are released. | ||||
| These are both bug-fix releases. | ||||
| </p> | ||||
|  | ||||
| <h2>November 30, 2013</h2> | ||||
| <p> | ||||
| <a href="relnotes/10.0.html">Mesa 10.0</a> is released. | ||||
| This is a new development release. | ||||
| See the release notes for more information about the release. | ||||
| </p> | ||||
|  | ||||
| <h2>November 27, 2013</h2> | ||||
| <p> | ||||
| <a href="relnotes/9.2.4.html">Mesa 9.2.4</a> is released. | ||||
| This is a bug fix release. | ||||
| </p> | ||||
|  | ||||
| <h2>November 13, 2013</h2> | ||||
| <p> | ||||
| <a href="relnotes/9.2.3.html">Mesa 9.2.3</a> is released. | ||||
| This is a bug fix release. | ||||
| </p> | ||||
|  | ||||
| <h2>October 18, 2013</h2> | ||||
| <p> | ||||
| <a href="relnotes/9.2.2.html">Mesa 9.2.2</a> is released. | ||||
|   | ||||
| @@ -103,9 +103,6 @@ Device drivers    src/mesa/drivers/*     MIT, generally | ||||
|  | ||||
| Ext headers       include/GL/glext.h     Khronos | ||||
|                   include/GL/glxext.h | ||||
|  | ||||
| C11 thread        include/c11/threads*.h Boost (permissive) | ||||
| emulation | ||||
| </pre> | ||||
|  | ||||
| <p> | ||||
|   | ||||
| @@ -203,66 +203,11 @@ for posterior analysis, e.g.: | ||||
|   We use LLVM-C bindings for now. They are not documented, but follow the C++ | ||||
|   interfaces very closely, and appear to be complete enough for code | ||||
|   generation. See  | ||||
|   <a href="http://npcontemplation.blogspot.com/2008/06/secret-of-llvm-c-bindings.html"> | ||||
|   this stand-alone example</a>.  See the llvm-c/Core.h file for reference. | ||||
|   http://npcontemplation.blogspot.com/2008/06/secret-of-llvm-c-bindings.html | ||||
|   for a stand-alone example.  See the llvm-c/Core.h file for reference. | ||||
| </li> | ||||
| </ul> | ||||
|  | ||||
| <h1 id="recommended_reading">Recommended Reading</h1> | ||||
|  | ||||
| <ul> | ||||
|   <li> | ||||
|     <p>Rasterization</p> | ||||
|     <ul> | ||||
|       <li><a href="http://www.cs.unc.edu/~olano/papers/2dh-tri/">Triangle Scan Conversion using 2D Homogeneous Coordinates</a></li> | ||||
|       <li><a href="http://www.drdobbs.com/parallel/rasterization-on-larrabee/217200602">Rasterization on Larrabee</a> (<a href="http://devmaster.net/posts/2887/rasterization-on-larrabee">DevMaster copy</a>)</li> | ||||
|       <li><a href="http://devmaster.net/posts/6133/rasterization-using-half-space-functions">Rasterization using half-space functions</a></li> | ||||
|       <li><a href="http://devmaster.net/posts/6145/advanced-rasterization">Advanced Rasterization</a></li> | ||||
|       <li><a href="http://fgiesen.wordpress.com/2013/02/17/optimizing-sw-occlusion-culling-index/">Optimizing Software Occlusion Culling</a></li> | ||||
|     </ul> | ||||
|   </li> | ||||
|   <li> | ||||
|     <p>Texture sampling</p> | ||||
|     <ul> | ||||
|       <li><a href="http://chrishecker.com/Miscellaneous_Technical_Articles#Perspective_Texture_Mapping">Perspective Texture Mapping</a></li> | ||||
|       <li><a href="http://www.flipcode.com/archives/Texturing_As_In_Unreal.shtml">Texturing As In Unreal</a></li> | ||||
|       <li><a href="http://www.gamasutra.com/view/feature/3301/runtime_mipmap_filtering.php">Run-Time MIP-Map Filtering</a></li> | ||||
|       <li><a href="http://alt.3dcenter.org/artikel/2003/10-26_a_english.php">Will "brilinear" filtering persist?</a></li> | ||||
|       <li><a href="http://ixbtlabs.com/articles2/gffx/nv40-rx800-3.html">Trilinear filtering</a></li> | ||||
|       <li><a href="http://devmaster.net/posts/12785/texture-swizzling">Texture Swizzling</a></li> | ||||
|     </ul> | ||||
|   </li> | ||||
|   <li> | ||||
|     <p>SIMD</p> | ||||
|     <ul> | ||||
|       <li><a href="http://www.cdl.uni-saarland.de/projects/wfv/#header4">Whole-Function Vectorization</a></li> | ||||
|     </ul> | ||||
|   </li> | ||||
|   <li> | ||||
|     <p>Optimization</p> | ||||
|     <ul> | ||||
|       <li><a href="http://www.drdobbs.com/optimizing-pixomatic-for-modern-x86-proc/184405807">Optimizing Pixomatic For Modern x86 Processors</a></li> | ||||
|       <li><a href="http://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-optimization-manual.html">Intel 64 and IA-32 Architectures Optimization Reference Manual</a></li> | ||||
|       <li><a href="http://www.agner.org/optimize/">Software optimization resources</a></li> | ||||
|       <li><a href="http://software.intel.com/en-us/articles/intel-intrinsics-guide">Intel Intrinsics Guide</a><li> | ||||
|     </ul> | ||||
|   </li> | ||||
|   <li> | ||||
|     <p>LLVM</p> | ||||
|     <ul> | ||||
|       <li><a href="http://llvm.org/docs/LangRef.html">LLVM Language Reference Manual</a></li> | ||||
|       <li><a href="http://npcontemplation.blogspot.co.uk/2008/06/secret-of-llvm-c-bindings.html">The secret of LLVM C bindings</a></li> | ||||
|     </ul> | ||||
|   </li> | ||||
|   <li> | ||||
|     <p>General</p> | ||||
|     <ul> | ||||
|       <li><a href="http://fgiesen.wordpress.com/2011/07/09/a-trip-through-the-graphics-pipeline-2011-index/">A trip through the Graphics Pipeline</a></li> | ||||
|       <li><a href="http://msdn.microsoft.com/en-us/library/gg615082.aspx#architecture">WARP Architecture and Performance</a></li> | ||||
|     </ul> | ||||
|   </li> | ||||
| </ul> | ||||
|  | ||||
| </div> | ||||
| </body> | ||||
| </html> | ||||
|   | ||||
| @@ -16,7 +16,7 @@ | ||||
|  | ||||
| <h1>OpenGL ES</h1> | ||||
|  | ||||
| <p>Mesa implements OpenGL ES 1.1 and OpenGL ES 2.0.  More information about | ||||
| <p>Mesa implements OpenGL ES 1.1 and OpenGL ES 2.0.  More informations about | ||||
| OpenGL ES can be found at <a href="http://www.khronos.org/opengles/"> | ||||
| http://www.khronos.org/opengles/</a>.</p> | ||||
|  | ||||
| @@ -48,7 +48,7 @@ EGL drivers for your hardware.</p> | ||||
|  | ||||
| <h3>Dispatch Table</h3> | ||||
|  | ||||
| <p>OpenGL ES has an additional indirection when dispatching functions</p> | ||||
| <p>OpenGL ES has an additional indirection when dispatching fucntions</p> | ||||
|  | ||||
| <pre> | ||||
|   Mesa:       glFoo() --> _mesa_Foo() | ||||
|   | ||||
| @@ -20,7 +20,7 @@ | ||||
| The current version of the OpenVG state tracker implements OpenVG 1.1. | ||||
| </p> | ||||
| <p> | ||||
| More information about OpenVG can be found at | ||||
| More informations about OpenVG can be found at | ||||
| <a href="http://www.khronos.org/openvg/"> | ||||
| http://www.khronos.org/openvg/</a> . | ||||
| </p> | ||||
|   | ||||
| @@ -21,13 +21,7 @@ The release notes summarize what's new or changed in each Mesa release. | ||||
| </p> | ||||
|  | ||||
| <ul> | ||||
| <li><a href="relnotes/10.1.html">10.1 release notes</a> | ||||
| <li><a href="relnotes/10.0.2.html">10.0.2 release notes</a> | ||||
| <li><a href="relnotes/10.0.1.html">10.0.1 release notes</a> | ||||
| <li><a href="relnotes/10.0.html">10.0 release notes</a> | ||||
| <li><a href="relnotes/9.2.5.html">9.2.5 release notes</a> | ||||
| <li><a href="relnotes/9.2.4.html">9.2.4 release notes</a> | ||||
| <li><a href="relnotes/9.2.3.html">9.2.3 release notes</a> | ||||
| <li><a href="relnotes/9.2.2.html">9.2.2 release notes</a> | ||||
| <li><a href="relnotes/9.2.1.html">9.2.1 release notes</a> | ||||
| <li><a href="relnotes/9.2.html">9.2 release notes</a> | ||||
|   | ||||
| @@ -1,150 +0,0 @@ | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||||
| <html lang="en"> | ||||
| <head> | ||||
|   <meta http-equiv="content-type" content="text/html; charset=utf-8"> | ||||
|   <title>Mesa Release Notes</title> | ||||
|   <link rel="stylesheet" type="text/css" href="../mesa.css"> | ||||
| </head> | ||||
| <body> | ||||
|  | ||||
| <div class="header"> | ||||
|   <h1>The Mesa 3D Graphics Library</h1> | ||||
| </div> | ||||
|  | ||||
| <iframe src="../contents.html"></iframe> | ||||
| <div class="content"> | ||||
|  | ||||
| <h1>Mesa 10.0.1 Release Notes / (December 12, 2013)</h1> | ||||
|  | ||||
| <p> | ||||
| Mesa 10.0.1 is a bug fix release which fixes bugs found since the 10.0 release. | ||||
| </p> | ||||
| <p> | ||||
| Mesa 10.0.1 implements the OpenGL 3.3 API, but the version reported by | ||||
| glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / | ||||
| glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. | ||||
| Some drivers don't support all the features required in OpenGL 3.3.  OpenGL | ||||
| 3.3 is <strong>only</strong> available if requested at context creation | ||||
| because compatibility contexts not supported. | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <h2>MD5 checksums</h2> | ||||
| <pre> | ||||
| 0a72ca5b36046a658bf6038326ff32ed  MesaLib-10.0.1.tar.bz2 | ||||
| 01bde35c912e504ba62caf1ef9f7022c  MesaLib-10.0.1.tar.gz | ||||
| 59a174a11a89e6b1b8ee9c3f7e3c388c  MesaLib-10.0.1.zip | ||||
| </pre> | ||||
|  | ||||
|  | ||||
| <h2>New features</h2> | ||||
| <p>None</p> | ||||
|  | ||||
| <h2>Bug fixes</h2> | ||||
|  | ||||
| <p>This list is likely incomplete.</p> | ||||
|  | ||||
| <ul> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64323">Bug 64323</a> - Severe misrendering in Left 4 Dead 2</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68838">Bug 68838</a> - GLSL: struct declarations produce a "empty declaration warning" in 9.2</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69155">Bug 69155</a> - [NV50 gallium] [piglit] bin/varying-packing-simple triggers memory corruption/failures</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70250">Bug 70250</a> - weston-terminal rendering corrupted with output transform 90 and 270</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70601">Bug 70601</a> - [SNB Bisected]Piglit spec/ARB_texture_float/multisample-formats 2 GL_ARB_texture_float fails</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72230">Bug 72230</a> - Unable to extract MesaLib-10.0.0.tar.{gz,bz2} with bsdtar</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72325">Bug 72325</a> - [swrast] piglit glean fbo regression</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72327">Bug 72327</a> - [swrast] piglit glean pointSprite regression</li> | ||||
|  | ||||
| </ul> | ||||
|  | ||||
| <h2>Changes</h2> | ||||
|  | ||||
| <p>The full set of changes can be viewed by using the following git command:</p> | ||||
|  | ||||
| <pre> | ||||
|   git log mesa-10.0..mesa-10.0.1 | ||||
| </pre> | ||||
|  | ||||
| <p>Axel Davy (2):</p> | ||||
| <ul> | ||||
|   <li>egl/wayland: Flush the wl_display at the end of SwapBuffers</li> | ||||
|   <li>Enable throttling in SwapBuffers</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Chad Versace (2):</p> | ||||
| <ul> | ||||
|   <li>i965/hsw: Apply non-msrt fast color clear w/a to all HSW GTs</li> | ||||
|   <li>i965: Add extra-alignment for non-msrt fast color clear for all hw (v2)</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Dave Airlie (1):</p> | ||||
| <ul> | ||||
|   <li>swrast: fix readback regression since inversion fix</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Emil Velikov (1):</p> | ||||
| <ul> | ||||
|   <li>automake: include only one copy VERSION in tarball</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Ian Romanick (3):</p> | ||||
| <ul> | ||||
|   <li>docs: Add 10.0 release md5sums</li> | ||||
|   <li>Remove a057b83 from the pick list</li> | ||||
|   <li>glsl: Don't emit empty declaration warning for a struct specifier</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Ilia Mirkin (8):</p> | ||||
| <ul> | ||||
|   <li>mesa: don't leak performance monitors on context destroy</li> | ||||
|   <li>nv50: Fix GPU_READING/WRITING bit removal</li> | ||||
|   <li>nouveau: avoid leaking fences while waiting</li> | ||||
|   <li>nv50: wait on the buf's fence before sticking it into pushbuf</li> | ||||
|   <li>nv50: enable h264 and mpeg4 for nv98+ (vp3, vp4.0)</li> | ||||
|   <li>nouveau/video: update h264 picparm field names based on usage</li> | ||||
|   <li>nouveau/video: update a few more h264 picparm field names</li> | ||||
|   <li>nv50: report 15 max inputs for fragment programs</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Jordan Justen (1):</p> | ||||
| <ul> | ||||
|   <li>dri megadriver_stub: add compatibility for older DRI loaders</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Kristian Høgsberg (2):</p> | ||||
| <ul> | ||||
|   <li>egl/wayland: Damage INT32_MAX x INT32_MAX region for eglSwapBuffers</li> | ||||
|   <li>egl/wayland: Send commit after flushing the driver context</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Maarten Lankhorst (1):</p> | ||||
| <ul> | ||||
|   <li>nouveau: Fix compiler warning regression</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Paul Berry (1):</p> | ||||
| <ul> | ||||
|   <li>i965/gen6: Fix multisample resolve blits for luminance/intensity 32F formats.</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Thomas Hellstrom (1):</p> | ||||
| <ul> | ||||
|   <li>st/xa: Bump major version number to 2</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Tom Stellard (2):</p> | ||||
| <ul> | ||||
|   <li>r300/compiler/tests: Fix segfault</li> | ||||
|   <li>r300/compiler/tests: Fix line length check in test parser</li> | ||||
| </ul> | ||||
|  | ||||
| </div> | ||||
| </body> | ||||
| </html> | ||||
| @@ -1,161 +0,0 @@ | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||||
| <html lang="en"> | ||||
| <head> | ||||
|   <meta http-equiv="content-type" content="text/html; charset=utf-8"> | ||||
|   <title>Mesa Release Notes</title> | ||||
|   <link rel="stylesheet" type="text/css" href="../mesa.css"> | ||||
| </head> | ||||
| <body> | ||||
|  | ||||
| <div class="header"> | ||||
|   <h1>The Mesa 3D Graphics Library</h1> | ||||
| </div> | ||||
|  | ||||
| <iframe src="../contents.html"></iframe> | ||||
| <div class="content"> | ||||
|  | ||||
| <h1>Mesa 10.0.2 Release Notes / (January 9, 2014)</h1> | ||||
|  | ||||
| <p> | ||||
| Mesa 10.0.2 is a bug fix release which fixes bugs found since the 10.0.1 release. | ||||
| </p> | ||||
| <p> | ||||
| Mesa 10.0.2 implements the OpenGL 3.3 API, but the version reported by | ||||
| glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / | ||||
| glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. | ||||
| Some drivers don't support all the features required in OpenGL 3.3.  OpenGL | ||||
| 3.3 is <strong>only</strong> available if requested at context creation | ||||
| because compatibility contexts not supported. | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <h2>MD5 checksums</h2> | ||||
| <pre> | ||||
| de7d14baf0101b697c140d2f47ef27e9  MesaLib-10.0.2.tar.gz | ||||
| 8544c0ab3e438a08b5103421ea15b6d2  MesaLib-10.0.2.tar.bz2 | ||||
| 181b0d6c1afca38e98a930d0e564ed90  MesaLib-10.0.2.zip | ||||
| </pre> | ||||
|  | ||||
|  | ||||
| <h2>New features</h2> | ||||
| <p>None</p> | ||||
|  | ||||
| <h2>Bug fixes</h2> | ||||
|  | ||||
| <p>This list is likely incomplete.</p> | ||||
|  | ||||
| <ul> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70740">Bug 70740</a> - HiZ on SNB causes GPU hang with WebGL web app</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72026">Bug 72026</a> - SIGSEGV in fs_visitor::visit(ir_dereference_variable*)</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72264">Bug 72264</a> - GLSL error reporting</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72369">Bug 72369</a> - glitches in serious sam 3 with the sb shader backend</li> | ||||
|  | ||||
| </ul> | ||||
|  | ||||
| <h2>Changes</h2> | ||||
|  | ||||
| <p>The full set of changes can be viewed by using the following git command:</p> | ||||
|  | ||||
| <pre> | ||||
|   git log mesa-10.0.1..mesa-10.0.2 | ||||
| </pre> | ||||
|  | ||||
| <p>Aaron Watry (8):</p> | ||||
| <ul> | ||||
|   <li>clover: Remove unused variable</li> | ||||
|   <li>pipe_loader/sw: close dev->lib when initialization fails</li> | ||||
|   <li>radeon/compute: Stop leaking LLVMContexts in radeon_llvm_parse_bitcode</li> | ||||
|   <li>r600/compute: Free compiled kernels when deleting compute state</li> | ||||
|   <li>r600/compute: Use the correct FREE macro when deleting compute state</li> | ||||
|   <li>radeon/llvm: Free target data at end of optimization</li> | ||||
|   <li>st/vdpau: Destroy context when initialization fails</li> | ||||
|   <li>r600/pipe: Stop leaking context->start_compute_cs_cmd.buf on EG/CM</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Alex Deucher (1):</p> | ||||
| <ul> | ||||
|   <li>r600g: fix SUMO2 pci id</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Alexander von Gluck IV (1):</p> | ||||
| <ul> | ||||
|   <li>Haiku: Add in public GL kit headers</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Anuj Phogat (1):</p> | ||||
| <ul> | ||||
|   <li>mesa: Fix error code generation in glBeginConditionalRender()</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Carl Worth (2):</p> | ||||
| <ul> | ||||
|   <li>docs: Add md5sums for the 10.0.1 release.</li> | ||||
|   <li>Update version to 10.0.2</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Chad Versace (1):</p> | ||||
| <ul> | ||||
|   <li>i965/gen6: Fix HiZ hang in WebGL Google Maps</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Erik Faye-Lund (1):</p> | ||||
| <ul> | ||||
|   <li>glcpp: error on multiple #else/#elif directives</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Henri Verbeet (1):</p> | ||||
| <ul> | ||||
|   <li>i915: Add support for gl_FragData[0] reads.</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Ilia Mirkin (1):</p> | ||||
| <ul> | ||||
|   <li>nv50: fix a small leak on context destroy</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Jonathan Liu (2):</p> | ||||
| <ul> | ||||
|   <li>st/mesa: use pipe_sampler_view_release()</li> | ||||
|   <li>llvmpipe: use pipe_sampler_view_release() to avoid segfault</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Kenneth Graunke (2):</p> | ||||
| <ul> | ||||
|   <li>i965: Fix 3DSTATE_PUSH_CONSTANT_ALLOC_PS packet creation.</li> | ||||
|   <li>Revert "mesa: Remove GLXContextID typedef from glx.h."</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Kevin Rogovin (1):</p> | ||||
| <ul> | ||||
|   <li>Use line number information from entire function expression</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Kristian Høgsberg (1):</p> | ||||
| <ul> | ||||
|   <li>dri_util: Don't assume __DRIcontext->driverPrivate is a gl_context</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Marek Olšák (2):</p> | ||||
| <ul> | ||||
|   <li>mesa: fix interpretation of glClearBuffer(drawbuffer)</li> | ||||
|   <li>st/mesa: fix glClear with multiple colorbuffers and different formats</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Paul Berry (2):</p> | ||||
| <ul> | ||||
|   <li>glsl: Teach ir_variable_refcount about ir_loop::counter variables.</li> | ||||
|   <li>glsl: Fix inconsistent assumptions about ir_loop::counter.</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Vadim Girlin (1):</p> | ||||
| <ul> | ||||
|   <li>r600g/sb: fix stack size computation on evergreen</li> | ||||
| </ul> | ||||
|  | ||||
| </div> | ||||
| </body> | ||||
| </html> | ||||
| @@ -14,7 +14,7 @@ | ||||
| <iframe src="../contents.html"></iframe> | ||||
| <div class="content"> | ||||
|  | ||||
| <h1>Mesa 10.0 Release Notes / (November 30th, 2013)</h1> | ||||
| <h1>Mesa 10.0 Release Notes / TBD</h1> | ||||
|  | ||||
| <p> | ||||
| Mesa 10.0 is a new development release. | ||||
| @@ -33,9 +33,7 @@ because compatibility contexts are not supported. | ||||
|  | ||||
| <h2>MD5 checksums</h2> | ||||
| <pre> | ||||
| b38626b96c664db67a534d7859682436  MesaLib-10.0.0.tar.gz | ||||
| f3fe55d9735bea158bbe97ed9a0da819  MesaLib-10.0.0.tar.bz2 | ||||
| c6ee1ce51e3bf35947d2978b872daf51  MesaLib-10.0.0.zip | ||||
| TBD. | ||||
| </pre> | ||||
|  | ||||
|  | ||||
| @@ -57,89 +55,16 @@ Note: some of the new features are only available with certain drivers. | ||||
| <li>GL_ARB_vertex_attrib_binding</li> | ||||
| <li>GL_ARB_vertex_type_10f_11f_11f_rev on i965 and r600g</li> | ||||
| <li>GL_KHR_debug</li> | ||||
| <li>GLX_MESA_query_renderer</li> | ||||
| </ul> | ||||
|  | ||||
|  | ||||
| <h2>Bug fixes</h2> | ||||
|  | ||||
| <p>Attempts have been made to <b>not</b> include bugs fixed in previous 9.2 | ||||
| releases or bugs that were regressions during 10.0 development. This list is | ||||
| likely incomplete.</p> | ||||
|  | ||||
| <ul> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=47755">Bug 47755</a> - [glsl-compiler] no error checking when Interpolation qualifier for built-in variable is different in vertex and fragment shader</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=52171">Bug 52171</a> - [gallium/r600/clover] Simple benchmarks failed to run</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=53077">Bug 53077</a> - [IVB] Output error with msaa when both of framebuffer and source color's alpha are not 1</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=54867">Bug 54867</a> - bug in r300 compiler</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60929">Bug 60929</a> - [r600-llvm] mono games with opengl are blocking on start</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62142">Bug 62142</a> - Mesa/demo mipmap_limits upside down with running by SOFTWARE</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62698">Bug 62698</a> - [bisected] WebGL demo "Consumed": texstate.c:628: update_texture_state: Assertion „__builtin_popcount(enabledTargets) == 1“ failed.</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64225">Bug 64225</a> - bfgminer --scyte generates Segmentation Fault on Northern Island</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64226">Bug 64226</a> - python-opencl package generate segmentation fault at pipe_r600.so</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64261">Bug 64261</a> - [SNB Bisected]Ogles3conform GL3Tests_color_buffer_float_color_buffer_float_clamp_fixed.test fail</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66213">Bug 66213</a> - Certain Mesa Demos Rendering Inverted (vertically)</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66806">Bug 66806</a> - [softpipe] glxgears floating point exception</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=67921">Bug 67921</a> - [bisected commit 883987] crosscompiling fails with util/u_cpu_detect.c:247:4: error: 'asm' undeclared (first use in this function)</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68162">Bug 68162</a> - [radeonsi] texture rendering is broken in Source-Engine games</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68451">Bug 68451</a> - Texture flicker in native Dota2 in mesa 9.2.0rc1</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68503">Bug 68503</a> - Graphical glitches in Serious Sam 3 when SB is enabled</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68792">Bug 68792</a> - Problems during playback of h264 files using UVD and VLC on AMD E-350 CPU</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68845">Bug 68845</a> - VDPAU/UVD regression</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69078">Bug 69078</a> - Modern Warfare (1, 2 and 3) broken in Wine on SNB</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69321">Bug 69321</a> - starting openCL crashes/boots system</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70042">Bug 70042</a> - Major texture flickering in Dota 2 (r600g on HD 6950)</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70088">Bug 70088</a> - Glamor on r600g crashes Xserver</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70123">Bug 70123</a> - Freeze caused by 'winsys/radeon: remove cs_queue_empty' commit</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70327">Bug 70327</a> - Casting floating point variable to integer not working properly while constant gets converted properly</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70891">Bug 70891</a> - CL_INVALID_BUILD_OPTIONS results in CL_INVALID_DEVICE when asking for build log</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70913">Bug 70913</a> - [PIGLIT,radeonsi] crash in "spec/EXT_framebuffer_multisample/sample-alpha-to-coverage 4 depth" (buffer overflow)</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71022">Bug 71022</a> - configure: error: Expat required for DRI.</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71110">Bug 71110</a> - xorg_driver.c:1030:2: error: too many arguments to function ‘DamageUnregister’</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71172">Bug 71172</a> - Segfault when running glxinfo. NV25GL [Quadro4 900 XGL]</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71512">Bug 71512</a> - dlopen.h:54: undefined reference to `dlopen'</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71870">Bug 71870</a> - Metro: Last Light rendering issues</li> | ||||
|  | ||||
| </ul> | ||||
| TBD. | ||||
|  | ||||
| <h2>Changes</h2> | ||||
|  | ||||
| <ul> | ||||
| <li>Removed X.Org state tracker (unmaintained and broken)</li> | ||||
| <li>Removed the video-accel r300 targets</li> | ||||
| <li>Removed the video-accel softpipe targets</li> | ||||
| </ul> | ||||
| TBD. | ||||
|  | ||||
| </div> | ||||
| </body> | ||||
|   | ||||
| @@ -1,251 +0,0 @@ | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||||
| <html lang="en"> | ||||
| <head> | ||||
|   <meta http-equiv="content-type" content="text/html; charset=utf-8"> | ||||
|   <title>Mesa Release Notes</title> | ||||
|   <link rel="stylesheet" type="text/css" href="../mesa.css"> | ||||
| </head> | ||||
| <body> | ||||
|  | ||||
| <div class="header"> | ||||
|   <h1>The Mesa 3D Graphics Library</h1> | ||||
| </div> | ||||
|  | ||||
| <iframe src="../contents.html"></iframe> | ||||
| <div class="content"> | ||||
|  | ||||
| <h1>Mesa 10.1.1 Release Notes / (April 18, 2014)</h1> | ||||
|  | ||||
| <p> | ||||
| Mesa 10.1.1 is a bug fix release which fixes bugs found since the 10.1 release. | ||||
| </p> | ||||
| <p> | ||||
| Mesa 10.1.1 implements the OpenGL 3.3 API, but the version reported by | ||||
| glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / | ||||
| glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. | ||||
| Some drivers don't support all the features required in OpenGL 3.3.  OpenGL | ||||
| 3.3 is <strong>only</strong> available if requested at context creation | ||||
| because compatibility contexts are not supported. | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <h2>MD5 checksums</h2> | ||||
| <pre> | ||||
| </pre> | ||||
|  | ||||
|  | ||||
| <h2>New features</h2> | ||||
| <p>None</p> | ||||
|  | ||||
| <h2>Bug fixes</h2> | ||||
|  | ||||
| <ul> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71547">Bug 71547</a> - compilation failure :#error "SSE4.1 instruction set not enabled"</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74868">Bug 74868</a> - r600g: Diablo III Crashes After a few minutes</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74988">Bug 74988</a> - Buffer overrun (segfault) decompressing ETC2 texture in GLBenchmark 3.0 Manhattan</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75279">Bug 75279</a> - XCloseDisplay() takes one minute around nouveau_dri.so, freezing Firefox startup</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75543">Bug 75543</a> - OSMesa Gallium OSMesaMakeCurrent</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=75660">Bug 75660</a> - u_inlines.h:277:pipe_buffer_map_range: Assertion `length' failed.</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76323">Bug 76323</a> - GLSL compiler ignores layout(binding=N) on uniform blocks</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76377">Bug 76377</a> - DRI3 should only be enabled on Linux due to a udev dependency</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=76749">Bug 76749</a> - [HSW] DOTA world lighting has no effect</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77102">Bug 77102</a> - gallium nouveau has no profile in vdpau and libva</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77207">Bug 77207</a> - [ivb/hsw] batch overwritten with garbage</li> | ||||
|  | ||||
| </ul> | ||||
|  | ||||
| <h2>Changes</h2> | ||||
|  | ||||
| <p>Aaron Watry (1):</p> | ||||
| <ul> | ||||
|   <li>gallium/util: Fix memory leak</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Alexander von Gluck IV (1):</p> | ||||
| <ul> | ||||
|   <li>haiku: Fix build through scons corrections and viewport fixes</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Anuj Phogat (2):</p> | ||||
| <ul> | ||||
|   <li>mesa: Set initial internal format of a texture to GL_RGBA</li> | ||||
|   <li>mesa: Allow GL_DEPTH_COMPONENT and GL_DEPTH_STENCIL combinations in glTexImage{123}D()</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Brian Paul (12):</p> | ||||
| <ul> | ||||
|   <li>softpipe: use 64-bit arithmetic in softpipe_resource_layout()</li> | ||||
|   <li>mesa: don't call ctx->Driver.ClearBufferSubData() if size==0</li> | ||||
|   <li>st/osmesa: check buffer size when searching for buffers</li> | ||||
|   <li>mesa: fix copy & paste bugs in pack_ubyte_SARGB8()</li> | ||||
|   <li>mesa: fix copy & paste bugs in pack_ubyte_SRGB8()</li> | ||||
|   <li>c11/threads: don't include assert.h if the assert macro is already defined</li> | ||||
|   <li>mesa: fix unpack_Z32_FLOAT_X24S8() / unpack_Z32_FLOAT() mix-up</li> | ||||
|   <li>st/mesa: add null pointer checking in query object functions</li> | ||||
|   <li>mesa: fix glMultiDrawArrays inside a display list</li> | ||||
|   <li>cso: fix sampler view count in cso_set_sampler_views()</li> | ||||
|   <li>svga: replace sampler assertion with conditional</li> | ||||
|   <li>svga: move LIST_INITHEAD(dirty_buffers) earlier in svga_context_create()</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Carl Worth (3):</p> | ||||
| <ul> | ||||
|   <li>cherry-ignore: Ignore a few patches</li> | ||||
|   <li>glsl: Allow explicit binding on atomics again</li> | ||||
|   <li>Update VERSION to 10.1.1</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Chia-I Wu (1):</p> | ||||
| <ul> | ||||
|   <li>i965/vec4: fix record clearing in copy propagation</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Christian König (2):</p> | ||||
| <ul> | ||||
|   <li>st/mesa: recreate sampler view on context change v3</li> | ||||
|   <li>st/mesa: fix sampler view handling with shared textures v4</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Courtney Goeltzenleuchter (1):</p> | ||||
| <ul> | ||||
|   <li>mesa: add bounds checking to eliminate buffer overrun</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Emil Velikov (5):</p> | ||||
| <ul> | ||||
|   <li>nv50: add missing brackets when handling the samplers array</li> | ||||
|   <li>mesa: return v.value_int64 when the requested type is TYPE_INT64</li> | ||||
|   <li>configure: enable dri3 only for linux</li> | ||||
|   <li>glx: drop obsolete _XUnlock_Mutex in __glXInitialize error path</li> | ||||
|   <li>configure: cleanup libudev handling</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Eric Anholt (1):</p> | ||||
| <ul> | ||||
|   <li>i965: Fix buffer overruns in MSAA MCS buffer clearing.</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Hans (2):</p> | ||||
| <ul> | ||||
|   <li>util: don't define isfinite(), isnan() for MSVC >= 1800</li> | ||||
|   <li>mesa: don't define c99 math functions for MSVC >= 1800</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Ian Romanick (7):</p> | ||||
| <ul> | ||||
|   <li>linker: Split set_uniform_binding into separate functions for blocks and samplers</li> | ||||
|   <li>linker: Various trivial clean-ups in set_sampler_binding</li> | ||||
|   <li>linker: Fold set_uniform_binding into call site</li> | ||||
|   <li>linker: Clean up "unused parameter" warnings</li> | ||||
|   <li>linker: Set block bindings based on UniformBlocks rather than UniformStorage</li> | ||||
|   <li>linker: Set binding for all elements of UBO array</li> | ||||
|   <li>glsl: Propagate explicit binding information from the AST all the way to the linker</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Ilia Mirkin (8):</p> | ||||
| <ul> | ||||
|   <li>nouveau: fix fence waiting logic in screen destroy</li> | ||||
|   <li>nv50: adjust blit_3d handling of ms output textures</li> | ||||
|   <li>loader: add special logic to distinguish nouveau from nouveau_vieux</li> | ||||
|   <li>mesa/main: condition GL_DEPTH_STENCIL on ARB_depth_texture</li> | ||||
|   <li>nouveau: add forgotten GL_COMPRESSED_INTENSITY to texture format list</li> | ||||
|   <li>nouveau: there may not have been a texture if the fbo was incomplete</li> | ||||
|   <li>nvc0/ir: move sample id to second source arg to fix sampler2DMS</li> | ||||
|   <li>nouveau: fix firmware check on nvd7/nvd9</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Johannes Nixdorf (1):</p> | ||||
| <ul> | ||||
|   <li>configure.ac: fix the detection of expat with pkg-config</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Jonathan Gray (7):</p> | ||||
| <ul> | ||||
|   <li>gallium: add endian detection for OpenBSD</li> | ||||
|   <li>loader: use 0 instead of FALSE which isn't defined</li> | ||||
|   <li>loader: don't limit the non-udev path to only android</li> | ||||
|   <li>megadriver_stub.c: don't use _GNU_SOURCE to gate the compat code</li> | ||||
|   <li>egl/dri2: don't require libudev to build drm/wayland platforms</li> | ||||
|   <li>egl/dri2: use drm macros to construct device name</li> | ||||
|   <li>configure: don't require libudev for gbm or egl drm/wayland</li> | ||||
| </ul> | ||||
|  | ||||
| <p>José Fonseca (4):</p> | ||||
| <ul> | ||||
|   <li>c11/threads: Fix nano to milisecond conversion.</li> | ||||
|   <li>mapi/u_thread: Use GetCurrentThreadId</li> | ||||
|   <li>c11/threads: Don't implement thrd_current on Windows.</li> | ||||
|   <li>draw: Duplicate TGSI tokens in draw_pipe_pstipple module.</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Kenneth Graunke (4):</p> | ||||
| <ul> | ||||
|   <li>i965/fs: Fix register comparisons in saturate propagation.</li> | ||||
|   <li>glsl: Fix lack of i2u in lower_ubo_reference.</li> | ||||
|   <li>i965: Stop advertising GL_MESA_ycbcr_texture.</li> | ||||
|   <li>glsl: Try vectorizing when seeing a repeated assignment to a channel.</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Marek Olšák (13):</p> | ||||
| <ul> | ||||
|   <li>r600g: fix texelFetchOffset GLSL functions</li> | ||||
|   <li>r600g: fix blitting the last 2 mipmap levels for Evergreen</li> | ||||
|   <li>mesa: fix the format of glEdgeFlagPointer</li> | ||||
|   <li>r600g,radeonsi: fix MAX_TEXTURE_3D_LEVELS and MAX_TEXTURE_ARRAY_LAYERS limits</li> | ||||
|   <li>st/mesa: fix per-vertex edge flags and GLSL support (v2)</li> | ||||
|   <li>mesa: mark GL_RGB9_E5 as not color-renderable</li> | ||||
|   <li>mesa: fix texture border handling for cube arrays</li> | ||||
|   <li>mesa: allow generating mipmaps for cube arrays</li> | ||||
|   <li>mesa: fix software fallback for generating mipmaps for cube arrays</li> | ||||
|   <li>mesa: fix software fallback for generating mipmaps for 3D textures</li> | ||||
|   <li>st/mesa: fix generating mipmaps for cube arrays</li> | ||||
|   <li>st/mesa: drop the lowering of quad strips to triangle strips</li> | ||||
|   <li>r600g: implement edge flags</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Matt Turner (4):</p> | ||||
| <ul> | ||||
|   <li>mesa: Wrap SSE4.1 code in #ifdef __SSE4_1__.</li> | ||||
|   <li>i965/fs: Fix off-by-one in saturate propagation.</li> | ||||
|   <li>i965/fs: Don't propagate saturate modifiers into partial writes.</li> | ||||
|   <li>i965/fs: Don't propagate saturation modifiers if there are source modifiers.</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Michel Dänzer (1):</p> | ||||
| <ul> | ||||
|   <li>r600g: Don't leak bytecode on shader compile failure</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Mike Stroyan (1):</p> | ||||
| <ul> | ||||
|   <li>i965: Avoid dependency hints on math opcodes</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Thomas Hellstrom (5):</p> | ||||
| <ul> | ||||
|   <li>winsys/svga: Replace the query mm buffer pool with a slab pool v3</li> | ||||
|   <li>winsys/svga: Update the vmwgfx_drm.h header to latest version from kernel</li> | ||||
|   <li>winsys/svga: Fix prime surface references also for guest-backed surfaces</li> | ||||
|   <li>st/xa: Bind destination before setting new state</li> | ||||
|   <li>st/xa: Make sure unused samplers are set to NULL</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Tom Stellard (1):</p> | ||||
| <ul> | ||||
|   <li>configure: Use LLVM shared libraries by default</li> | ||||
| </ul> | ||||
|  | ||||
| </div> | ||||
| </body> | ||||
| </html> | ||||
| @@ -1,73 +0,0 @@ | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||||
| <html lang="en"> | ||||
| <head> | ||||
|   <meta http-equiv="content-type" content="text/html; charset=utf-8"> | ||||
|   <title>Mesa Release Notes</title> | ||||
|   <link rel="stylesheet" type="text/css" href="../mesa.css"> | ||||
| </head> | ||||
| <body> | ||||
|  | ||||
| <div class="header"> | ||||
|   <h1>The Mesa 3D Graphics Library</h1> | ||||
| </div> | ||||
|  | ||||
| <iframe src="../contents.html"></iframe> | ||||
| <div class="content"> | ||||
|  | ||||
| <h1>Mesa 10.1 Release Notes / TBD</h1> | ||||
|  | ||||
| <p> | ||||
| Mesa 10.1 is a new development release. | ||||
| People who are concerned with stability and reliability should stick | ||||
| with a previous release or wait for Mesa 10.1.1. | ||||
| </p> | ||||
| <p> | ||||
| Mesa 10.1 implements the OpenGL 3.3 API, but the version reported by | ||||
| glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / | ||||
| glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. | ||||
| Some drivers don't support all the features required in OpenGL 3.3.  OpenGL | ||||
| 3.3 is <strong>only</strong> available if requested at context creation | ||||
| because compatibility contexts are not supported. | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <h2>MD5 checksums</h2> | ||||
| <pre> | ||||
| TBD. | ||||
| </pre> | ||||
|  | ||||
|  | ||||
| <h2>New features</h2> | ||||
|  | ||||
| <p> | ||||
| Note: some of the new features are only available with certain drivers. | ||||
| </p> | ||||
|  | ||||
| <ul> | ||||
| <li>GL_ARB_draw_indirect on i965.</li> | ||||
| <li>GL_ARB_clear_buffer_object</li> | ||||
| <li>GL_ARB_viewport_array on i965.</li> | ||||
| <li>GL_ARB_map_buffer_alignment on all drivers that did not previously support | ||||
| it.</li> | ||||
| <li>GL_AMD_shader_trinary_minmax.</li> | ||||
| <li>GL_EXT_framebuffer_blit on r200 and radeon.</li> | ||||
| <li>Reduced memory usage for display lists.</li> | ||||
| <li>OpenGL 3.3 support on nv50, nvc0, r600 and radeonsi</li> | ||||
| </ul> | ||||
|  | ||||
|  | ||||
| <h2>Bug fixes</h2> | ||||
|  | ||||
| TBD. | ||||
|  | ||||
| <h2>Changes</h2> | ||||
|  | ||||
| <ul> | ||||
| <li>Removed support for the GL_MESA_texture_array extension.  This extension | ||||
|   enabled the use of texture array with fixed-function and assembly fragment | ||||
|   shaders.  No applications are known to use this extension.</li> | ||||
| </ul> | ||||
|  | ||||
| </div> | ||||
| </body> | ||||
| </html> | ||||
| @@ -1,115 +0,0 @@ | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||||
| <html lang="en"> | ||||
| <head> | ||||
|   <meta http-equiv="content-type" content="text/html; charset=utf-8"> | ||||
|   <title>Mesa Release Notes</title> | ||||
|   <link rel="stylesheet" type="text/css" href="../mesa.css"> | ||||
| </head> | ||||
| <body> | ||||
|  | ||||
| <div class="header"> | ||||
|   <h1>The Mesa 3D Graphics Library</h1> | ||||
| </div> | ||||
|  | ||||
| <iframe src="../contents.html"></iframe> | ||||
| <div class="content"> | ||||
|  | ||||
| <h1>Mesa 9.2.3 Release Notes / (November 13, 2013)</h1> | ||||
|  | ||||
| <p> | ||||
| Mesa 9.2.3 is a bug fix release which fixes bugs found since the 9.2.2 release. | ||||
| </p> | ||||
| <p> | ||||
| Mesa 9.2 implements the OpenGL 3.1 API, but the version reported by | ||||
| glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / | ||||
| glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. | ||||
| Some drivers don't support all the features required in OpenGL 3.1.  OpenGL | ||||
| 3.1 is <strong>only</strong> available if requested at context creation | ||||
| because GL_ARB_compatibility is not supported. | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <h2>MD5 checksums</h2> | ||||
| <pre> | ||||
| 66e9a33a414f801e1c33398bf627d56b  MesaLib-9.2.3.tar.gz | ||||
| f56b6beb556e4b9072814419f7c554e3  MesaLib-9.2.3.tar.bz2 | ||||
| ed852dab576faac237ac4298bf55d0a1  MesaLib-9.2.3.zip | ||||
| </pre> | ||||
|  | ||||
|  | ||||
| <h2>New features</h2> | ||||
| <p>None</p> | ||||
|  | ||||
| <h2>Bug fixes</h2> | ||||
|  | ||||
| <p>This list is likely incomplete.</p> | ||||
|  | ||||
| <ul> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69437">Bug 69437</a> - Composite Bypass no longer works</li> | ||||
|  | ||||
| </ul> | ||||
|  | ||||
| <h2>Changes</h2> | ||||
|  | ||||
| <p>The full set of changes can be viewed by using the following GIT command:</p> | ||||
|  | ||||
| <pre> | ||||
|   git log mesa-9.2.2..mesa-9.2.3 | ||||
| </pre> | ||||
|  | ||||
| <p>Brian Paul (2):</p> | ||||
| <ul> | ||||
|   <li>st/mesa: move out of memory check in st_draw_vbo()</li> | ||||
|   <li>osmesa: fix broken triangle/line drawing when using float color buffer</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Carl Worth (7):</p> | ||||
| <ul> | ||||
|   <li>Remove error when calling glGenQueries/glDeleteQueries while a query is active</li> | ||||
|   <li>Bump version to 9.2.3</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Daniel Vetter (1):</p> | ||||
| <ul> | ||||
|   <li>i965: CS writes/reads should use I915_GEM_INSTRUCTION</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Eric Anholt (1):</p> | ||||
| <ul> | ||||
|   <li>i965: Fix texture buffer rendering after a whole buffer replacement.</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Kenneth Graunke (6):</p> | ||||
| <ul> | ||||
|   <li>i965: Emit post-sync non-zero flush before 3DSTATE_GS_SVB_INDEX.</li> | ||||
|   <li>i965: Emit post-sync non-zero flush before 3DSTATE_DRAWING_RECTANGLE.</li> | ||||
|   <li>i965: Also guard 3DSTATE_DRAWING_RECTANGLE with a flush in blorp.</li> | ||||
|   <li>i965: Move post-sync non-zero flush for 3DSTATE_MULTISAMPLE.</li> | ||||
|   <li>i965: Also emit HIER_DEPTH and STENCIL packets when disabling depth.</li> | ||||
|   <li>i965: Also emit HiZ and Stencil packets when disabling depth on Gen6.</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Kristian Høgsberg (1):</p> | ||||
| <ul> | ||||
|   <li>wayland: Don't rely on static variable for identifying wl_drm buffers</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Marek Olšák (1):</p> | ||||
| <ul> | ||||
|   <li>radeonsi: fix blitting the last 2 mipmap levels of compressed textures</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Petr Sebor (1):</p> | ||||
| <ul> | ||||
|   <li>meta: enable vertex attributes in the context of the newly created array object</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Scott Graham (1):</p> | ||||
| <ul> | ||||
|   <li>mesa: fixes for MSVC 2013</li> | ||||
| </ul> | ||||
|  | ||||
| </div> | ||||
| </body> | ||||
| </html> | ||||
| @@ -1,102 +0,0 @@ | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||||
| <html lang="en"> | ||||
| <head> | ||||
|   <meta http-equiv="content-type" content="text/html; charset=utf-8"> | ||||
|   <title>Mesa Release Notes</title> | ||||
|   <link rel="stylesheet" type="text/css" href="../mesa.css"> | ||||
| </head> | ||||
| <body> | ||||
|  | ||||
| <div class="header"> | ||||
|   <h1>The Mesa 3D Graphics Library</h1> | ||||
| </div> | ||||
|  | ||||
| <iframe src="../contents.html"></iframe> | ||||
| <div class="content"> | ||||
|  | ||||
| <h1>Mesa 9.2.4 Release Notes / (November 27, 2013)</h1> | ||||
|  | ||||
| <p> | ||||
| Mesa 9.2.4 is a bug fix release which fixes bugs found since the 9.2.3 release. | ||||
| </p> | ||||
| <p> | ||||
| Mesa 9.2 implements the OpenGL 3.1 API, but the version reported by | ||||
| glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / | ||||
| glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. | ||||
| Some drivers don't support all the features required in OpenGL 3.1.  OpenGL | ||||
| 3.1 is <strong>only</strong> available if requested at context creation | ||||
| because GL_ARB_compatibility is not supported. | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <h2>MD5 checksums</h2> | ||||
| <pre> | ||||
| 28190b831b0271d69dbc44b2686eab1c  MesaLib-9.2.4.tar.gz | ||||
| e630c0a307cec4f0f70ddd029d2fe084  MesaLib-9.2.4.tar.bz2 | ||||
| 8ef5e1e92e1d30fbedec31f716a7619e  MesaLib-9.2.4.zip | ||||
| </pre> | ||||
|  | ||||
|  | ||||
| <h2>New features</h2> | ||||
| <p>None</p> | ||||
|  | ||||
| <h2>Bug fixes</h2> | ||||
|  | ||||
| <p>This list is likely incomplete.</p> | ||||
|  | ||||
| <ul> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=53077">Bug 53077</a> - [IVB] Output error with msaa when both of framebuffer and source color's alpha are not 1</li> | ||||
|  | ||||
| <li>Fix freedreno to compile with recent libdrm.</li> | ||||
|  | ||||
| </ul> | ||||
|  | ||||
| <h2>Changes</h2> | ||||
|  | ||||
| <p>The full set of changes can be viewed by using the following GIT command:</p> | ||||
|  | ||||
| <pre> | ||||
|   git log mesa-9.2.3..mesa-9.2.4 | ||||
| </pre> | ||||
|  | ||||
| <p>Brian Paul (1):</p> | ||||
| <ul> | ||||
|   <li>st/mesa: fix GL_FEEDBACK mode inverted Y coordinate bug</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Paul Berry (2):</p> | ||||
| <ul> | ||||
|   <li>i965: Fix vertical alignment for multisampled buffers.</li> | ||||
|   <li>glsl: Fix lowering of direct assignment in lower_clip_distance.</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Rob Clark (17):</p> | ||||
| <ul> | ||||
|   <li>freedreno/a3xx: fix color inversion on mem->gmem restore</li> | ||||
|   <li>freedreno/a3xx: fix viewport on gmem->mem resolve</li> | ||||
|   <li>freedreno: add debug option to disable scissor optimization</li> | ||||
|   <li>freedreno: update register headers</li> | ||||
|   <li>freedreno/a3xx: some texture fixes</li> | ||||
|   <li>freedreno/a3xx/compiler: fix CMP</li> | ||||
|   <li>freedreno/a3xx/compiler: handle saturate on dst</li> | ||||
|   <li>freedreno/a3xx/compiler: use max_reg rather than file_count</li> | ||||
|   <li>freedreno/a3xx/compiler: cat4 cannot use const reg as src</li> | ||||
|   <li>freedreno: fix segfault when no color buffer bound</li> | ||||
|   <li>freedreno/a3xx/compiler: make compiler errors more useful</li> | ||||
|   <li>freedreno/a3xx/compiler: bit of re-arrange/cleanup</li> | ||||
|   <li>freedreno/a3xx/compiler: fix SGT/SLT/etc</li> | ||||
|   <li>freedreno/a3xx: don't leak so much</li> | ||||
|   <li>freedreno/a3xx/compiler: better const handling</li> | ||||
|   <li>freedreno/a3xx/compiler: handle sync flags better</li> | ||||
|   <li>freedreno: updates for msm drm/kms driver</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Tapani Pälli (1):</p> | ||||
| <ul> | ||||
|   <li>mesa: enable GL_TEXTURE_LOD_BIAS set/get</li> | ||||
| </ul> | ||||
|  | ||||
| </div> | ||||
| </body> | ||||
| </html> | ||||
| @@ -1,120 +0,0 @@ | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||||
| <html lang="en"> | ||||
| <head> | ||||
|   <meta http-equiv="content-type" content="text/html; charset=utf-8"> | ||||
|   <title>Mesa Release Notes</title> | ||||
|   <link rel="stylesheet" type="text/css" href="../mesa.css"> | ||||
| </head> | ||||
| <body> | ||||
|  | ||||
| <div class="header"> | ||||
|   <h1>The Mesa 3D Graphics Library</h1> | ||||
| </div> | ||||
|  | ||||
| <iframe src="../contents.html"></iframe> | ||||
| <div class="content"> | ||||
|  | ||||
| <h1>Mesa 9.2.5 Release Notes / (December 12, 2013)</h1> | ||||
|  | ||||
| <p> | ||||
| Mesa 9.2.5 is a bug fix release which fixes bugs found since the 9.2.4 release. | ||||
| </p> | ||||
| <p> | ||||
| Mesa 9.2 implements the OpenGL 3.1 API, but the version reported by | ||||
| glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / | ||||
| glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. | ||||
| Some drivers don't support all the features required in OpenGL 3.1.  OpenGL | ||||
| 3.1 is <strong>only</strong> available if requested at context creation | ||||
| because GL_ARB_compatibility is not supported. | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <h2>MD5 checksums</h2> | ||||
| <pre> | ||||
| 9fb4de29ca1d9cfd03cbdefa123ba336  MesaLib-9.2.5.tar.bz2 | ||||
| 1146c7c332767174f3de782b88d8e8ca  MesaLib-9.2.5.tar.gz | ||||
| a9a6c46dac7ea26fd272bf14894d95f3  MesaLib-9.2.5.zip | ||||
| </pre> | ||||
|  | ||||
|  | ||||
| <h2>New features</h2> | ||||
| <p>None</p> | ||||
|  | ||||
| <h2>Bug fixes</h2> | ||||
|  | ||||
| <p>This list is likely incomplete.</p> | ||||
|  | ||||
| <ul> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62142">Bug 62142</a> - Mesa/demo mipmap_limits upside down with running by SOFTWARE</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64323">Bug 64323</a> - Severe misrendering in Left 4 Dead 2</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66213">Bug 66213</a> - Certain Mesa Demos Rendering Inverted (vertically)</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68838">Bug 68838</a> - GLSL: struct declarations produce a "empty declaration warning" in 9.2</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69155">Bug 69155</a> - [NV50 gallium] [piglit] bin/varying-packing-simple triggers memory corruption/failures</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72325">Bug 72325</a> - [swrast] piglit glean fbo regression</li> | ||||
|  | ||||
| <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72327">Bug 72327</a> - [swrast] piglit glean pointSprite regression</li> | ||||
|  | ||||
| </ul> | ||||
|  | ||||
| <h2>Changes</h2> | ||||
|  | ||||
| <p>The full set of changes can be viewed by using the following GIT command:</p> | ||||
|  | ||||
| <pre> | ||||
|   git log mesa-9.2.4..mesa-9.2.5 | ||||
| </pre> | ||||
|  | ||||
| <p>Chad Versace (2):</p> | ||||
| <ul> | ||||
|   <li>i965/hsw: Apply non-msrt fast color clear w/a to all HSW GTs</li> | ||||
|   <li>i965: Add extra-alignment for non-msrt fast color clear for all hw (v2)</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Chris Forbes (4):</p> | ||||
| <ul> | ||||
|   <li>i965: Gen4-5: Don't enable hardware alpha test with MRT</li> | ||||
|   <li>i965: Gen4-5: Include alpha func/ref in program key</li> | ||||
|   <li>i965/fs: Gen4-5: Setup discard masks for MRT alpha test</li> | ||||
|   <li>i965/fs: Gen4-5: Implement alpha test in shader for MRT</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Chí-Thanh Christopher Nguyễn (1):</p> | ||||
| <ul> | ||||
|   <li>st/xorg: Handle new DamageUnregister API which has only one argument</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Dave Airlie (3):</p> | ||||
| <ul> | ||||
|   <li>mesa/swrast: fix inverted front buffer rendering with old-school swrast</li> | ||||
|   <li>glx: don't fail out when no configs if we have visuals</li> | ||||
|   <li>swrast: fix readback regression since inversion fix</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Ian Romanick (1):</p> | ||||
| <ul> | ||||
|   <li>glsl: Don't emit empty declaration warning for a struct specifier</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Ilia Mirkin (4):</p> | ||||
| <ul> | ||||
|   <li>nv50: Fix GPU_READING/WRITING bit removal</li> | ||||
|   <li>nouveau: avoid leaking fences while waiting</li> | ||||
|   <li>nv50: wait on the buf's fence before sticking it into pushbuf</li> | ||||
|   <li>nv50: report 15 max inputs for fragment programs</li> | ||||
| </ul> | ||||
|  | ||||
| <p>Tom Stellard (2):</p> | ||||
| <ul> | ||||
|   <li>r300/compiler/tests: Fix segfault</li> | ||||
|   <li>r300/compiler/tests: Fix line length check in test parser</li> | ||||
| </ul> | ||||
|  | ||||
| </div> | ||||
| </body> | ||||
| </html> | ||||
| @@ -156,7 +156,7 @@ each time you do a pull. | ||||
| </p> | ||||
| <li>Small changes to master | ||||
| <p> | ||||
| If you are an experienced git user working on substantial modifications, | ||||
| If you are an experienced git user working on substancial modifications, | ||||
| you are probably | ||||
| working on a separate branch and would rebase your branch prior to | ||||
| merging with master. | ||||
|   | ||||
| @@ -67,7 +67,7 @@ Example:  export MESA_GLSL=dump,nopt | ||||
| <h2 id="support">GLSL Version</h2> | ||||
|  | ||||
| <p> | ||||
| The GLSL compiler currently supports version 3.30 of the shading language. | ||||
| The GLSL compiler currently supports version 1.40 of the shading language. | ||||
| </p> | ||||
|  | ||||
| <p> | ||||
| @@ -234,7 +234,7 @@ This option is only relevant if EmitHighLevelInstructions is set. | ||||
|  | ||||
| <dt>EmitComments</dt> | ||||
| <dd> | ||||
| If set, instructions will be annotated with comments to help with debugging. | ||||
| If set, instructions will be annoted with comments to help with debugging. | ||||
| Extra NOP instructions will also be inserted. | ||||
| </dd> | ||||
| </dl> | ||||
|   | ||||
| @@ -123,7 +123,7 @@ each directory. | ||||
|           Currently there's run-time code generation for x86/SSE, PowerPC | ||||
|           and Cell SPU. | ||||
|       <li><b>tgsi</b> - TG Shader Infrastructure.  Code for encoding, | ||||
|           manipulating and interpreting GPU programs. | ||||
|           manipulating and interpretting GPU programs. | ||||
|       <li><b>translate</b> - module for translating vertex data from one format | ||||
|           to another. | ||||
|       <li><b>util</b> - assorted utilities for arithmetic, hashing, surface | ||||
|   | ||||
| @@ -16,7 +16,7 @@ IP Status | ||||
|  | ||||
| Status | ||||
|  | ||||
|     DEPRECATED - Support removed in Mesa 10.1. | ||||
|     Shipping in Mesa 7.1 | ||||
|  | ||||
| Version | ||||
|  | ||||
|   | ||||
| @@ -1,101 +0,0 @@ | ||||
| Name | ||||
|  | ||||
|     WL_create_wayland_buffer_from_image | ||||
|  | ||||
| Name Strings | ||||
|  | ||||
|     EGL_WL_create_wayland_buffer_from_image | ||||
|  | ||||
| Contributors | ||||
|  | ||||
|     Neil Roberts | ||||
|     Axel Davy | ||||
|     Daniel Stone | ||||
|  | ||||
| Contact | ||||
|  | ||||
|     Neil Roberts <neil.s.roberts@intel.com> | ||||
|  | ||||
| Status | ||||
|  | ||||
|     Proposal | ||||
|  | ||||
| Version | ||||
|  | ||||
|     Version 2, October 25, 2013 | ||||
|  | ||||
| Number | ||||
|  | ||||
|     EGL Extension #not assigned | ||||
|  | ||||
| Dependencies | ||||
|  | ||||
|     Requires EGL 1.4 or later.  This extension is written against the | ||||
|     wording of the EGL 1.4 specification. | ||||
|  | ||||
|     EGL_KHR_base_image is required. | ||||
|  | ||||
| Overview | ||||
|  | ||||
|     This extension provides an entry point to create a wl_buffer which shares | ||||
|     its contents with a given EGLImage. The expected use case for this is in a | ||||
|     nested Wayland compositor which is using subsurfaces to present buffers | ||||
|     from its clients. Using this extension it can attach the client buffers | ||||
|     directly to the subsurface without having to blit the contents into an | ||||
|     intermediate buffer. The compositing can then be done in the parent | ||||
|     compositor. | ||||
|  | ||||
|     The nested compositor can create an EGLImage from a client buffer resource | ||||
|     using the existing WL_bind_wayland_display extension. It should also be | ||||
|     possible to create buffers using other types of images although there is | ||||
|     no expected use case for that. | ||||
|  | ||||
| IP Status | ||||
|  | ||||
|     Open-source; freely implementable. | ||||
|  | ||||
| New Procedures and Functions | ||||
|  | ||||
|     struct wl_buffer *eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, | ||||
|                                                         EGLImageKHR image); | ||||
|  | ||||
| New Tokens | ||||
|  | ||||
|     None. | ||||
|  | ||||
| Additions to the EGL 1.4 Specification: | ||||
|  | ||||
|     To create a client-side wl_buffer from an EGLImage call | ||||
|  | ||||
|       struct wl_buffer *eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, | ||||
|                                                           EGLImageKHR image); | ||||
|  | ||||
|     The returned buffer will share the contents with the given EGLImage. Any | ||||
|     updates to the image will also be updated in the wl_buffer. Typically the | ||||
|     EGLImage will be generated in a nested Wayland compositor using a buffer | ||||
|     resource from a client via the EGL_WL_bind_wayland_display extension. | ||||
|  | ||||
|     If there was an error then the function will return NULL. In particular it | ||||
|     will generate EGL_BAD_MATCH if the implementation is not able to represent | ||||
|     the image as a wl_buffer. The possible reasons for this error are | ||||
|     implementation-dependant but may include problems such as an unsupported | ||||
|     format or tiling mode or that the buffer is in memory that is inaccessible | ||||
|     to the GPU that the given EGLDisplay is using. | ||||
|  | ||||
| Issues | ||||
|  | ||||
|     1) Under what circumstances can the EGL_BAD_MATCH error be generated? Does | ||||
|        this include for example unsupported tiling modes? | ||||
|  | ||||
|        RESOLVED: Yes, the EGL_BAD_MATCH error can be generated for any reason | ||||
|        which prevents the implementation from representing the image as a | ||||
|        wl_buffer. For example, these problems can be but are not limited to | ||||
|        unsupported tiling modes, inaccessible memory or an unsupported pixel | ||||
|        format. | ||||
|  | ||||
| Revision History | ||||
|  | ||||
|     Version 1, September 6, 2013 | ||||
|         Initial draft (Neil Roberts) | ||||
|     Version 2, October 25, 2013 | ||||
|         Added a note about more possible reasons for returning EGL_BAD_FORMAT. | ||||
| @@ -14,7 +14,7 @@ | ||||
| <iframe src="contents.html"></iframe> | ||||
| <div class="content"> | ||||
|  | ||||
| <h1>Acknowledgements</h1> | ||||
| <h1>Acknowledgments</h1> | ||||
|  | ||||
|  | ||||
| The following individuals and groups are to be acknowledged for their | ||||
|   | ||||
| @@ -27,10 +27,9 @@ MacOS are all supported. | ||||
| </p> | ||||
|  | ||||
| <p> | ||||
| Most modern Linux distros include the SVGA3D driver so end users shouldn't | ||||
| be concerned with this information. | ||||
| But if your distro lacks the driver or you want to update to the latest code | ||||
| these instructions explain what to do. | ||||
| End users shouldn't have to go through all these steps once the driver is | ||||
| included in newer Linux distributions. | ||||
| Fedora 18 and Ubuntu 12.10 include the VMware guest GL driver, for example. | ||||
| </p> | ||||
|  | ||||
| <p> | ||||
| @@ -54,13 +53,6 @@ The components involved in this include: | ||||
| <li>Mesa/gallium OpenGL driver: "svga" | ||||
| </ul> | ||||
|  | ||||
| <p> | ||||
| All of these components reside in the guest Linux virtual machine. | ||||
| On the host, all you're doing is running VMware | ||||
| <a href="http://www.vmware.com/products/workstation/">Workstation</a> or | ||||
| <a href="http://www.vmware.com/products/fusion/">Fusion</a>. | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <h2>Prerequisites</h2> | ||||
|  | ||||
| @@ -142,7 +134,7 @@ As before, if you're on a 32-bit system, you should skip the --libdir | ||||
| configure option. | ||||
|   <pre> | ||||
|   cd $TOP/mesa | ||||
|   ./autogen.sh --prefix=/usr --libdir=/usr/lib64 --with-gallium-drivers=svga --with-dri-drivers= --enable-xa --disable-dri3 | ||||
|   ./autogen.sh --prefix=/usr --libdir=/usr/lib64 --with-gallium-drivers=svga --with-dri-drivers= --enable-xa | ||||
|   make | ||||
|   sudo make install | ||||
|   </pre> | ||||
|   | ||||
| @@ -107,7 +107,7 @@ for your application. | ||||
| <p> | ||||
| When using Mesa directly or with GLX, it's up to the application | ||||
| writer to create a window with an appropriate colormap.  The GLUT | ||||
| toolkit tries to minimize colormap <em>flashing</em> by sharing | ||||
| toolkit tris to minimize colormap <em>flashing</em> by sharing | ||||
| colormaps when possible.  Specifically, if the visual and depth of the | ||||
| window matches that of the root window, the root window's colormap | ||||
| will be shared by the Mesa window.  Otherwise, a new, private colormap | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * All Rights Reserved. | ||||
|  * | ||||
|  * Permission is hereby granted, free of charge, to any person obtaining a | ||||
| @@ -134,16 +134,6 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, st | ||||
|  | ||||
| #endif | ||||
|  | ||||
| #ifndef EGL_WL_create_wayland_buffer_from_image | ||||
| #define EGL_WL_create_wayland_buffer_from_image 1 | ||||
|  | ||||
| #ifdef EGL_EGLEXT_PROTOTYPES | ||||
| EGLAPI struct wl_buffer * EGLAPIENTRY eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image); | ||||
| #endif | ||||
| typedef struct wl_buffer * (EGLAPIENTRYP PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL) (EGLDisplay dpy, EGLImageKHR image); | ||||
|  | ||||
| #endif | ||||
|  | ||||
| #ifndef EGL_NOK_swap_region | ||||
| #define EGL_NOK_swap_region 1 | ||||
|  | ||||
|   | ||||
| @@ -2078,6 +2078,39 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh | ||||
| #endif /* GL_MESA_packed_depth_stencil */ | ||||
|  | ||||
|  | ||||
| #ifndef GL_MESA_texture_array | ||||
| #define GL_MESA_texture_array 1 | ||||
|  | ||||
| /* GL_MESA_texture_array uses the same enum values as GL_EXT_texture_array. | ||||
|  */ | ||||
| #ifndef GL_EXT_texture_array | ||||
|  | ||||
| #ifdef GL_GLEXT_PROTOTYPES | ||||
| GLAPI void APIENTRY glFramebufferTextureLayerEXT(GLenum target, | ||||
|     GLenum attachment, GLuint texture, GLint level, GLint layer); | ||||
| #endif /* GL_GLEXT_PROTOTYPES */ | ||||
|  | ||||
| #if 0 | ||||
| /* (temporarily) disabled because of collision with typedef in glext.h | ||||
|  * that happens if apps include both gl.h and glext.h | ||||
|  */ | ||||
| typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, | ||||
|     GLenum attachment, GLuint texture, GLint level, GLint layer); | ||||
| #endif | ||||
|  | ||||
| #define GL_TEXTURE_1D_ARRAY_EXT         0x8C18 | ||||
| #define GL_PROXY_TEXTURE_1D_ARRAY_EXT   0x8C19 | ||||
| #define GL_TEXTURE_2D_ARRAY_EXT         0x8C1A | ||||
| #define GL_PROXY_TEXTURE_2D_ARRAY_EXT   0x8C1B | ||||
| #define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C | ||||
| #define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D | ||||
| #define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF | ||||
| #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 | ||||
| #endif | ||||
|  | ||||
| #endif | ||||
|  | ||||
|  | ||||
| #ifndef GL_ATI_blend_equation_separate | ||||
| #define GL_ATI_blend_equation_separate 1 | ||||
|  | ||||
|   | ||||
| @@ -33,7 +33,7 @@ extern "C" { | ||||
| ** used to make the header, and the header can be found at | ||||
| **   http://www.opengl.org/registry/ | ||||
| ** | ||||
| ** Khronos $Revision: 24502 $ on $Date: 2013-12-12 13:14:39 -0800 (Thu, 12 Dec 2013) $ | ||||
| ** Khronos $Revision: 23422 $ on $Date: 2013-10-08 15:40:45 -0700 (Tue, 08 Oct 2013) $ | ||||
| */ | ||||
|  | ||||
| #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) | ||||
| @@ -53,7 +53,7 @@ extern "C" { | ||||
| #define GLAPI extern | ||||
| #endif | ||||
|  | ||||
| #define GL_GLEXT_VERSION 20131212 | ||||
| #define GL_GLEXT_VERSION 20131008 | ||||
|  | ||||
| /* Generated C header for: | ||||
|  * API: gl | ||||
| @@ -1477,7 +1477,7 @@ typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync); | ||||
| typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); | ||||
| typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); | ||||
| typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); | ||||
| typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data); | ||||
| typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *params); | ||||
| typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); | ||||
| typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); | ||||
| typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); | ||||
| @@ -1497,7 +1497,7 @@ GLAPI GLboolean APIENTRY glIsSync (GLsync sync); | ||||
| GLAPI void APIENTRY glDeleteSync (GLsync sync); | ||||
| GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); | ||||
| GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); | ||||
| GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *data); | ||||
| GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *params); | ||||
| GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); | ||||
| GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); | ||||
| GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); | ||||
| @@ -2144,10 +2144,6 @@ GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data) | ||||
| #define GL_MAX_GEOMETRY_IMAGE_UNIFORMS    0x90CD | ||||
| #define GL_MAX_FRAGMENT_IMAGE_UNIFORMS    0x90CE | ||||
| #define GL_MAX_COMBINED_IMAGE_UNIFORMS    0x90CF | ||||
| #define GL_COMPRESSED_RGBA_BPTC_UNORM     0x8E8C | ||||
| #define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D | ||||
| #define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E | ||||
| #define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F | ||||
| #define GL_TEXTURE_IMMUTABLE_FORMAT       0x912F | ||||
| typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); | ||||
| typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); | ||||
| @@ -4840,20 +4836,6 @@ GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name); | ||||
| #endif | ||||
| #endif /* GL_AMD_name_gen_delete */ | ||||
|  | ||||
| #ifndef GL_AMD_occlusion_query_event | ||||
| #define GL_AMD_occlusion_query_event 1 | ||||
| #define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F | ||||
| #define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001 | ||||
| #define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002 | ||||
| #define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004 | ||||
| #define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008 | ||||
| #define GL_QUERY_ALL_EVENT_BITS_AMD       0xFFFFFFFF | ||||
| typedef void (APIENTRYP PFNGLQUERYOBJECTPARAMETERUIAMDPROC) (GLenum target, GLuint id, GLenum pname, GLuint param); | ||||
| #ifdef GL_GLEXT_PROTOTYPES | ||||
| GLAPI void APIENTRY glQueryObjectParameteruiAMD (GLenum target, GLuint id, GLenum pname, GLuint param); | ||||
| #endif | ||||
| #endif /* GL_AMD_occlusion_query_event */ | ||||
|  | ||||
| #ifndef GL_AMD_performance_monitor | ||||
| #define GL_AMD_performance_monitor 1 | ||||
| #define GL_COUNTER_TYPE_AMD               0x8BC0 | ||||
| @@ -5918,34 +5900,6 @@ GLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params); | ||||
| #endif | ||||
| #endif /* GL_EXT_cull_vertex */ | ||||
|  | ||||
| #ifndef GL_EXT_debug_label | ||||
| #define GL_EXT_debug_label 1 | ||||
| #define GL_PROGRAM_PIPELINE_OBJECT_EXT    0x8A4F | ||||
| #define GL_PROGRAM_OBJECT_EXT             0x8B40 | ||||
| #define GL_SHADER_OBJECT_EXT              0x8B48 | ||||
| #define GL_BUFFER_OBJECT_EXT              0x9151 | ||||
| #define GL_QUERY_OBJECT_EXT               0x9153 | ||||
| #define GL_VERTEX_ARRAY_OBJECT_EXT        0x9154 | ||||
| typedef void (APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label); | ||||
| typedef void (APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); | ||||
| #ifdef GL_GLEXT_PROTOTYPES | ||||
| GLAPI void APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label); | ||||
| GLAPI void APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); | ||||
| #endif | ||||
| #endif /* GL_EXT_debug_label */ | ||||
|  | ||||
| #ifndef GL_EXT_debug_marker | ||||
| #define GL_EXT_debug_marker 1 | ||||
| typedef void (APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker); | ||||
| typedef void (APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker); | ||||
| typedef void (APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void); | ||||
| #ifdef GL_GLEXT_PROTOTYPES | ||||
| GLAPI void APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker); | ||||
| GLAPI void APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker); | ||||
| GLAPI void APIENTRY glPopGroupMarkerEXT (void); | ||||
| #endif | ||||
| #endif /* GL_EXT_debug_marker */ | ||||
|  | ||||
| #ifndef GL_EXT_depth_bounds_test | ||||
| #define GL_EXT_depth_bounds_test 1 | ||||
| #define GL_DEPTH_BOUNDS_TEST_EXT          0x8890 | ||||
| @@ -6181,7 +6135,7 @@ typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintp | ||||
| typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); | ||||
| typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); | ||||
| typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); | ||||
| typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); | ||||
| typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const void *data); | ||||
| typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param); | ||||
| typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); | ||||
| typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); | ||||
| @@ -6437,7 +6391,7 @@ GLAPI void *APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, G | ||||
| GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); | ||||
| GLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); | ||||
| GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); | ||||
| GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); | ||||
| GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const void *data); | ||||
| GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param); | ||||
| GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); | ||||
| GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); | ||||
| @@ -8087,10 +8041,6 @@ GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRG | ||||
| #define GL_INTERLACE_READ_INGR            0x8568 | ||||
| #endif /* GL_INGR_interlace_read */ | ||||
|  | ||||
| #ifndef GL_INTEL_fragment_shader_ordering | ||||
| #define GL_INTEL_fragment_shader_ordering 1 | ||||
| #endif /* GL_INTEL_fragment_shader_ordering */ | ||||
|  | ||||
| #ifndef GL_INTEL_map_texture | ||||
| #define GL_INTEL_map_texture 1 | ||||
| #define GL_TEXTURE_MEMORY_LAYOUT_INTEL    0x83FF | ||||
| @@ -8264,9 +8214,9 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); | ||||
|  | ||||
| #ifndef GL_NV_blend_equation_advanced | ||||
| #define GL_NV_blend_equation_advanced 1 | ||||
| #define GL_BLEND_ADVANCED_COHERENT_NV     0x9285 | ||||
| #define GL_BLEND_OVERLAP_NV               0x9281 | ||||
| #define GL_BLEND_PREMULTIPLIED_SRC_NV     0x9280 | ||||
| #define GL_BLUE_NV                        0x1905 | ||||
| #define GL_COLORBURN_NV                   0x929A | ||||
| #define GL_COLORDODGE_NV                  0x9299 | ||||
| #define GL_CONJOINT_NV                    0x9284 | ||||
| @@ -8280,7 +8230,6 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); | ||||
| #define GL_DST_OUT_NV                     0x928D | ||||
| #define GL_DST_OVER_NV                    0x9289 | ||||
| #define GL_EXCLUSION_NV                   0x92A0 | ||||
| #define GL_GREEN_NV                       0x1904 | ||||
| #define GL_HARDLIGHT_NV                   0x929B | ||||
| #define GL_HARDMIX_NV                     0x92A9 | ||||
| #define GL_HSL_COLOR_NV                   0x92AF | ||||
| @@ -8302,7 +8251,6 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); | ||||
| #define GL_PLUS_CLAMPED_NV                0x92B1 | ||||
| #define GL_PLUS_DARKER_NV                 0x9292 | ||||
| #define GL_PLUS_NV                        0x9291 | ||||
| #define GL_RED_NV                         0x1903 | ||||
| #define GL_SCREEN_NV                      0x9295 | ||||
| #define GL_SOFTLIGHT_NV                   0x929C | ||||
| #define GL_SRC_ATOP_NV                    0x928E | ||||
| @@ -8312,7 +8260,6 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); | ||||
| #define GL_SRC_OVER_NV                    0x9288 | ||||
| #define GL_UNCORRELATED_NV                0x9282 | ||||
| #define GL_VIVIDLIGHT_NV                  0x92A6 | ||||
| #define GL_XOR_NV                         0x1506 | ||||
| typedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value); | ||||
| typedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void); | ||||
| #ifdef GL_GLEXT_PROTOTYPES | ||||
| @@ -8323,7 +8270,6 @@ GLAPI void APIENTRY glBlendBarrierNV (void); | ||||
|  | ||||
| #ifndef GL_NV_blend_equation_advanced_coherent | ||||
| #define GL_NV_blend_equation_advanced_coherent 1 | ||||
| #define GL_BLEND_ADVANCED_COHERENT_NV     0x9285 | ||||
| #endif /* GL_NV_blend_equation_advanced_coherent */ | ||||
|  | ||||
| #ifndef GL_NV_blend_square | ||||
|   | ||||
| @@ -168,7 +168,6 @@ typedef XID GLXDrawable; | ||||
| /* GLX 1.3 and later */ | ||||
| typedef struct __GLXFBConfigRec *GLXFBConfig; | ||||
| typedef XID GLXFBConfigID; | ||||
| typedef XID GLXContextID; | ||||
| typedef XID GLXWindow; | ||||
| typedef XID GLXPbuffer; | ||||
|  | ||||
|   | ||||
| @@ -33,10 +33,10 @@ extern "C" { | ||||
| ** used to make the header, and the header can be found at | ||||
| **   http://www.opengl.org/registry/ | ||||
| ** | ||||
| ** Khronos $Revision: 24777 $ on $Date: 2014-01-14 14:02:32 -0800 (Tue, 14 Jan 2014) $ | ||||
| ** Khronos $Revision: 23422 $ on $Date: 2013-10-08 15:40:45 -0700 (Tue, 08 Oct 2013) $ | ||||
| */ | ||||
|  | ||||
| #define GLX_GLXEXT_VERSION 20140114 | ||||
| #define GLX_GLXEXT_VERSION 20131008 | ||||
|  | ||||
| /* Generated C header for: | ||||
|  * API: glx | ||||
| @@ -49,7 +49,6 @@ extern "C" { | ||||
|  | ||||
| #ifndef GLX_VERSION_1_3 | ||||
| #define GLX_VERSION_1_3 1 | ||||
| typedef XID GLXContextID; | ||||
| typedef struct __GLXFBConfigRec *GLXFBConfig; | ||||
| typedef XID GLXWindow; | ||||
| typedef XID GLXPbuffer; | ||||
| @@ -273,6 +272,7 @@ __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName); | ||||
|  | ||||
| #ifndef GLX_EXT_import_context | ||||
| #define GLX_EXT_import_context 1 | ||||
| typedef XID GLXContextID; | ||||
| #define GLX_SHARE_CONTEXT_EXT             0x800A | ||||
| #define GLX_VISUAL_ID_EXT                 0x800B | ||||
| #define GLX_SCREEN_EXT                    0x800C | ||||
| @@ -433,14 +433,6 @@ void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLe | ||||
| #endif | ||||
| #endif /* GLX_NV_copy_image */ | ||||
|  | ||||
| #ifndef GLX_NV_delay_before_swap | ||||
| #define GLX_NV_delay_before_swap 1 | ||||
| typedef Bool ( *PFNGLXDELAYBEFORESWAPNVPROC) (Display *dpy, GLXDrawable drawable, GLfloat seconds); | ||||
| #ifdef GLX_GLXEXT_PROTOTYPES | ||||
| Bool glXDelayBeforeSwapNV (Display *dpy, GLXDrawable drawable, GLfloat seconds); | ||||
| #endif | ||||
| #endif /* GLX_NV_delay_before_swap */ | ||||
|  | ||||
| #ifndef GLX_NV_float_buffer | ||||
| #define GLX_NV_float_buffer 1 | ||||
| #define GLX_FLOAT_COMPONENTS_NV           0x20B0 | ||||
|   | ||||
| @@ -437,7 +437,7 @@ struct __DRIdamageExtensionRec { | ||||
|  * SWRast Loader extension. | ||||
|  */ | ||||
| #define __DRI_SWRAST_LOADER "DRI_SWRastLoader" | ||||
| #define __DRI_SWRAST_LOADER_VERSION 2 | ||||
| #define __DRI_SWRAST_LOADER_VERSION 1 | ||||
| struct __DRIswrastLoaderExtensionRec { | ||||
|     __DRIextension base; | ||||
|  | ||||
| @@ -461,13 +461,6 @@ struct __DRIswrastLoaderExtensionRec { | ||||
|     void (*getImage)(__DRIdrawable *readable, | ||||
| 		     int x, int y, int width, int height, | ||||
| 		     char *data, void *loaderPrivate); | ||||
|  | ||||
|     /** | ||||
|      * Put image to drawable | ||||
|      */ | ||||
|     void (*putImage2)(__DRIdrawable *drawable, int op, | ||||
|                       int x, int y, int width, int height, int stride, | ||||
|                       char *data, void *loaderPrivate); | ||||
| }; | ||||
|  | ||||
| /** | ||||
| @@ -789,6 +782,12 @@ typedef __DRIdrawable * | ||||
|                               const __DRIconfig *config, | ||||
|                               void *loaderPrivate); | ||||
|  | ||||
| typedef __DRIcontext * | ||||
| (*__DRIcreateNewContextFunc)(__DRIscreen *screen, | ||||
|                              const __DRIconfig *config, | ||||
|                              __DRIcontext *shared, | ||||
|                              void *loaderPrivate); | ||||
|  | ||||
| typedef __DRIcontext * | ||||
| (*__DRIcreateContextAttribsFunc)(__DRIscreen *screen, | ||||
|                                  int api, | ||||
| @@ -950,10 +949,7 @@ struct __DRIdri2ExtensionRec { | ||||
| 				    void *loaderPrivate); | ||||
|  | ||||
|    __DRIcreateNewDrawableFunc   createNewDrawable; | ||||
|    __DRIcontext *(*createNewContext)(__DRIscreen *screen, | ||||
|                                      const __DRIconfig *config, | ||||
|                                      __DRIcontext *shared, | ||||
|                                      void *loaderPrivate); | ||||
|    __DRIcreateNewContextFunc    createNewContext; | ||||
|  | ||||
|    /* Since version 2 */ | ||||
|    __DRIgetAPIMaskFunc          getAPIMask; | ||||
| @@ -1041,7 +1037,6 @@ struct __DRIdri2ExtensionRec { | ||||
| #define __DRI_IMAGE_FOURCC_XRGB8888	0x34325258 | ||||
| #define __DRI_IMAGE_FOURCC_ABGR8888	0x34324241 | ||||
| #define __DRI_IMAGE_FOURCC_XBGR8888	0x34324258 | ||||
| #define __DRI_IMAGE_FOURCC_SARGB8888    0x83324258 | ||||
| #define __DRI_IMAGE_FOURCC_YUV410	0x39565559 | ||||
| #define __DRI_IMAGE_FOURCC_YUV411	0x31315559 | ||||
| #define __DRI_IMAGE_FOURCC_YUV420	0x32315559 | ||||
| @@ -1410,6 +1405,7 @@ struct __DRIimageDriverExtensionRec { | ||||
|    /* Common DRI functions, shared with DRI2 */ | ||||
|    __DRIcreateNewScreen2Func            createNewScreen2; | ||||
|    __DRIcreateNewDrawableFunc           createNewDrawable; | ||||
|    __DRIcreateNewContextFunc            createNewContext; | ||||
|    __DRIcreateContextAttribsFunc        createContextAttribs; | ||||
|    __DRIgetAPIMaskFunc                  getAPIMask; | ||||
| }; | ||||
|   | ||||
| @@ -3,7 +3,7 @@ | ||||
|  * SAREA definitions. | ||||
|  *  | ||||
|  * \author Kevin E. Martin <kevin@precisioninsight.com> | ||||
|  * \author Jens Owen <jowen@vmware.com> | ||||
|  * \author Jens Owen <jens@tungstengraphics.com> | ||||
|  * \author Rickard E. (Rik) Faith <faith@valinux.com> | ||||
|  */ | ||||
|  | ||||
|   | ||||
| @@ -60,8 +60,8 @@ extern "C" { | ||||
| #include <GL/gl.h> | ||||
|  | ||||
|  | ||||
| #define OSMESA_MAJOR_VERSION 10 | ||||
| #define OSMESA_MINOR_VERSION 0 | ||||
| #define OSMESA_MAJOR_VERSION 6 | ||||
| #define OSMESA_MINOR_VERSION 5 | ||||
| #define OSMESA_PATCH_VERSION 0 | ||||
|  | ||||
|  | ||||
| @@ -270,21 +270,6 @@ OSMesaGetProcAddress( const char *funcName ); | ||||
| GLAPI void GLAPIENTRY | ||||
| OSMesaColorClamp(GLboolean enable); | ||||
|  | ||||
|  | ||||
| /** | ||||
|  * Enable/disable Gallium post-process filters. | ||||
|  * This should be called after a context is created, but before it is | ||||
|  * made current for the first time.  After a context has been made | ||||
|  * current, this function has no effect. | ||||
|  * If the enable_value param is zero, the filter is disabled.  Otherwise | ||||
|  * the filter is enabled, and the value may control the filter's quality. | ||||
|  * New in Mesa 10.0 | ||||
|  */ | ||||
| GLAPI void GLAPIENTRY | ||||
| OSMesaPostprocess(OSMesaContext osmesa, const char *filter, | ||||
|                   unsigned enable_value); | ||||
|  | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| } | ||||
| #endif | ||||
|   | ||||
| @@ -1,83 +1,56 @@ | ||||
| #ifndef __gl2_h_ | ||||
| #define __gl2_h_ 1 | ||||
| #define __gl2_h_ | ||||
|  | ||||
| /* $Revision: 20555 $ on $Date:: 2013-02-12 14:32:47 -0800 #$ */ | ||||
|  | ||||
| #include <GLES2/gl2platform.h> | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| extern "C" { | ||||
| #endif | ||||
|  | ||||
| /* | ||||
| ** Copyright (c) 2013 The Khronos Group Inc. | ||||
| ** | ||||
| ** Permission is hereby granted, free of charge, to any person obtaining a | ||||
| ** copy of this software and/or associated documentation files (the | ||||
| ** "Materials"), to deal in the Materials without restriction, including | ||||
| ** without limitation the rights to use, copy, modify, merge, publish, | ||||
| ** distribute, sublicense, and/or sell copies of the Materials, and to | ||||
| ** permit persons to whom the Materials are furnished to do so, subject to | ||||
| ** the following conditions: | ||||
| ** | ||||
| ** The above copyright notice and this permission notice shall be included | ||||
| ** in all copies or substantial portions of the Materials. | ||||
| ** | ||||
| ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||||
| ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||||
| ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||||
| ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||||
| ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||||
| ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||||
| ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. | ||||
| */ | ||||
| /* | ||||
| ** This header is generated from the Khronos OpenGL / OpenGL ES XML | ||||
| ** API Registry. The current version of the Registry, generator scripts | ||||
| ** used to make the header, and the header can be found at | ||||
| **   http://www.opengl.org/registry/ | ||||
| ** | ||||
| ** Khronos $Revision: 24614 $ on $Date: 2013-12-30 04:44:46 -0800 (Mon, 30 Dec 2013) $ | ||||
| */ | ||||
|  | ||||
| #include <GLES2/gl2platform.h> | ||||
|  | ||||
| /* Generated on date 20131230 */ | ||||
|  | ||||
| /* Generated C header for: | ||||
|  * API: gles2 | ||||
|  * Profile: common | ||||
|  * Versions considered: 2\.[0-9] | ||||
|  * Versions emitted: .* | ||||
|  * Default extensions included: None | ||||
|  * Additional extensions included: _nomatch_^ | ||||
|  * Extensions removed: _nomatch_^ | ||||
|  * This document is licensed under the SGI Free Software B License Version | ||||
|  * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . | ||||
|  */ | ||||
|  | ||||
| #ifndef GL_ES_VERSION_2_0 | ||||
| #define GL_ES_VERSION_2_0 1 | ||||
| #include <KHR/khrplatform.h> | ||||
| typedef khronos_int8_t GLbyte; | ||||
| typedef khronos_float_t GLclampf; | ||||
| typedef khronos_int32_t GLfixed; | ||||
| typedef short GLshort; | ||||
| typedef unsigned short GLushort; | ||||
| typedef void GLvoid; | ||||
| typedef struct __GLsync *GLsync; | ||||
| typedef khronos_int64_t GLint64; | ||||
| typedef khronos_uint64_t GLuint64; | ||||
| typedef unsigned int GLenum; | ||||
| typedef unsigned int GLuint; | ||||
| typedef char GLchar; | ||||
| typedef khronos_float_t GLfloat; | ||||
| typedef khronos_ssize_t GLsizeiptr; | ||||
| /*------------------------------------------------------------------------- | ||||
|  * Data type definitions | ||||
|  *-----------------------------------------------------------------------*/ | ||||
|  | ||||
| typedef void             GLvoid; | ||||
| typedef char             GLchar; | ||||
| typedef unsigned int     GLenum; | ||||
| typedef unsigned char    GLboolean; | ||||
| typedef unsigned int     GLbitfield; | ||||
| typedef khronos_int8_t   GLbyte; | ||||
| typedef short            GLshort; | ||||
| typedef int              GLint; | ||||
| typedef int              GLsizei; | ||||
| typedef khronos_uint8_t  GLubyte; | ||||
| typedef unsigned short   GLushort; | ||||
| typedef unsigned int     GLuint; | ||||
| typedef khronos_float_t  GLfloat; | ||||
| typedef khronos_float_t  GLclampf; | ||||
| typedef khronos_int32_t  GLfixed; | ||||
|  | ||||
| /* GL types for handling large vertex buffer objects */ | ||||
| typedef khronos_intptr_t GLintptr; | ||||
| typedef unsigned int GLbitfield; | ||||
| typedef int GLint; | ||||
| typedef unsigned char GLboolean; | ||||
| typedef int GLsizei; | ||||
| typedef khronos_uint8_t GLubyte; | ||||
| typedef khronos_ssize_t  GLsizeiptr; | ||||
|  | ||||
| /* OpenGL ES core versions */ | ||||
| #define GL_ES_VERSION_2_0                 1 | ||||
|  | ||||
| /* ClearBufferMask */ | ||||
| #define GL_DEPTH_BUFFER_BIT               0x00000100 | ||||
| #define GL_STENCIL_BUFFER_BIT             0x00000400 | ||||
| #define GL_COLOR_BUFFER_BIT               0x00004000 | ||||
|  | ||||
| /* Boolean */ | ||||
| #define GL_FALSE                          0 | ||||
| #define GL_TRUE                           1 | ||||
|  | ||||
| /* BeginMode */ | ||||
| #define GL_POINTS                         0x0000 | ||||
| #define GL_LINES                          0x0001 | ||||
| #define GL_LINE_LOOP                      0x0002 | ||||
| @@ -85,6 +58,18 @@ typedef khronos_uint8_t GLubyte; | ||||
| #define GL_TRIANGLES                      0x0004 | ||||
| #define GL_TRIANGLE_STRIP                 0x0005 | ||||
| #define GL_TRIANGLE_FAN                   0x0006 | ||||
|  | ||||
| /* AlphaFunction (not supported in ES20) */ | ||||
| /*      GL_NEVER */ | ||||
| /*      GL_LESS */ | ||||
| /*      GL_EQUAL */ | ||||
| /*      GL_LEQUAL */ | ||||
| /*      GL_GREATER */ | ||||
| /*      GL_NOTEQUAL */ | ||||
| /*      GL_GEQUAL */ | ||||
| /*      GL_ALWAYS */ | ||||
|  | ||||
| /* BlendingFactorDest */ | ||||
| #define GL_ZERO                           0 | ||||
| #define GL_ONE                            1 | ||||
| #define GL_SRC_COLOR                      0x0300 | ||||
| @@ -93,15 +78,29 @@ typedef khronos_uint8_t GLubyte; | ||||
| #define GL_ONE_MINUS_SRC_ALPHA            0x0303 | ||||
| #define GL_DST_ALPHA                      0x0304 | ||||
| #define GL_ONE_MINUS_DST_ALPHA            0x0305 | ||||
|  | ||||
| /* BlendingFactorSrc */ | ||||
| /*      GL_ZERO */ | ||||
| /*      GL_ONE */ | ||||
| #define GL_DST_COLOR                      0x0306 | ||||
| #define GL_ONE_MINUS_DST_COLOR            0x0307 | ||||
| #define GL_SRC_ALPHA_SATURATE             0x0308 | ||||
| /*      GL_SRC_ALPHA */ | ||||
| /*      GL_ONE_MINUS_SRC_ALPHA */ | ||||
| /*      GL_DST_ALPHA */ | ||||
| /*      GL_ONE_MINUS_DST_ALPHA */ | ||||
|  | ||||
| /* BlendEquationSeparate */ | ||||
| #define GL_FUNC_ADD                       0x8006 | ||||
| #define GL_BLEND_EQUATION                 0x8009 | ||||
| #define GL_BLEND_EQUATION_RGB             0x8009 | ||||
| #define GL_BLEND_EQUATION_RGB             0x8009    /* same as BLEND_EQUATION */ | ||||
| #define GL_BLEND_EQUATION_ALPHA           0x883D | ||||
|  | ||||
| /* BlendSubtract */ | ||||
| #define GL_FUNC_SUBTRACT                  0x800A | ||||
| #define GL_FUNC_REVERSE_SUBTRACT          0x800B | ||||
|  | ||||
| /* Separate Blend Functions */ | ||||
| #define GL_BLEND_DST_RGB                  0x80C8 | ||||
| #define GL_BLEND_SRC_RGB                  0x80C9 | ||||
| #define GL_BLEND_DST_ALPHA                0x80CA | ||||
| @@ -111,19 +110,38 @@ typedef khronos_uint8_t GLubyte; | ||||
| #define GL_CONSTANT_ALPHA                 0x8003 | ||||
| #define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004 | ||||
| #define GL_BLEND_COLOR                    0x8005 | ||||
|  | ||||
| /* Buffer Objects */ | ||||
| #define GL_ARRAY_BUFFER                   0x8892 | ||||
| #define GL_ELEMENT_ARRAY_BUFFER           0x8893 | ||||
| #define GL_ARRAY_BUFFER_BINDING           0x8894 | ||||
| #define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895 | ||||
|  | ||||
| #define GL_STREAM_DRAW                    0x88E0 | ||||
| #define GL_STATIC_DRAW                    0x88E4 | ||||
| #define GL_DYNAMIC_DRAW                   0x88E8 | ||||
|  | ||||
| #define GL_BUFFER_SIZE                    0x8764 | ||||
| #define GL_BUFFER_USAGE                   0x8765 | ||||
|  | ||||
| #define GL_CURRENT_VERTEX_ATTRIB          0x8626 | ||||
|  | ||||
| /* CullFaceMode */ | ||||
| #define GL_FRONT                          0x0404 | ||||
| #define GL_BACK                           0x0405 | ||||
| #define GL_FRONT_AND_BACK                 0x0408 | ||||
|  | ||||
| /* DepthFunction */ | ||||
| /*      GL_NEVER */ | ||||
| /*      GL_LESS */ | ||||
| /*      GL_EQUAL */ | ||||
| /*      GL_LEQUAL */ | ||||
| /*      GL_GREATER */ | ||||
| /*      GL_NOTEQUAL */ | ||||
| /*      GL_GEQUAL */ | ||||
| /*      GL_ALWAYS */ | ||||
|  | ||||
| /* EnableCap */ | ||||
| #define GL_TEXTURE_2D                     0x0DE1 | ||||
| #define GL_CULL_FACE                      0x0B44 | ||||
| #define GL_BLEND                          0x0BE2 | ||||
| @@ -134,13 +152,19 @@ typedef khronos_uint8_t GLubyte; | ||||
| #define GL_POLYGON_OFFSET_FILL            0x8037 | ||||
| #define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E | ||||
| #define GL_SAMPLE_COVERAGE                0x80A0 | ||||
|  | ||||
| /* ErrorCode */ | ||||
| #define GL_NO_ERROR                       0 | ||||
| #define GL_INVALID_ENUM                   0x0500 | ||||
| #define GL_INVALID_VALUE                  0x0501 | ||||
| #define GL_INVALID_OPERATION              0x0502 | ||||
| #define GL_OUT_OF_MEMORY                  0x0505 | ||||
|  | ||||
| /* FrontFaceDirection */ | ||||
| #define GL_CW                             0x0900 | ||||
| #define GL_CCW                            0x0901 | ||||
|  | ||||
| /* GetPName */ | ||||
| #define GL_LINE_WIDTH                     0x0B21 | ||||
| #define GL_ALIASED_POINT_SIZE_RANGE       0x846D | ||||
| #define GL_ALIASED_LINE_WIDTH_RANGE       0x846E | ||||
| @@ -167,6 +191,7 @@ typedef khronos_uint8_t GLubyte; | ||||
| #define GL_STENCIL_BACK_WRITEMASK         0x8CA5 | ||||
| #define GL_VIEWPORT                       0x0BA2 | ||||
| #define GL_SCISSOR_BOX                    0x0C10 | ||||
| /*      GL_SCISSOR_TEST */ | ||||
| #define GL_COLOR_CLEAR_VALUE              0x0C22 | ||||
| #define GL_COLOR_WRITEMASK                0x0C23 | ||||
| #define GL_UNPACK_ALIGNMENT               0x0CF5 | ||||
| @@ -181,18 +206,32 @@ typedef khronos_uint8_t GLubyte; | ||||
| #define GL_DEPTH_BITS                     0x0D56 | ||||
| #define GL_STENCIL_BITS                   0x0D57 | ||||
| #define GL_POLYGON_OFFSET_UNITS           0x2A00 | ||||
| /*      GL_POLYGON_OFFSET_FILL */ | ||||
| #define GL_POLYGON_OFFSET_FACTOR          0x8038 | ||||
| #define GL_TEXTURE_BINDING_2D             0x8069 | ||||
| #define GL_SAMPLE_BUFFERS                 0x80A8 | ||||
| #define GL_SAMPLES                        0x80A9 | ||||
| #define GL_SAMPLE_COVERAGE_VALUE          0x80AA | ||||
| #define GL_SAMPLE_COVERAGE_INVERT         0x80AB | ||||
|  | ||||
| /* GetTextureParameter */ | ||||
| /*      GL_TEXTURE_MAG_FILTER */ | ||||
| /*      GL_TEXTURE_MIN_FILTER */ | ||||
| /*      GL_TEXTURE_WRAP_S */ | ||||
| /*      GL_TEXTURE_WRAP_T */ | ||||
|  | ||||
| #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 | ||||
| #define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3 | ||||
|  | ||||
| /* HintMode */ | ||||
| #define GL_DONT_CARE                      0x1100 | ||||
| #define GL_FASTEST                        0x1101 | ||||
| #define GL_NICEST                         0x1102 | ||||
| #define GL_GENERATE_MIPMAP_HINT           0x8192 | ||||
|  | ||||
| /* HintTarget */ | ||||
| #define GL_GENERATE_MIPMAP_HINT            0x8192 | ||||
|  | ||||
| /* DataType */ | ||||
| #define GL_BYTE                           0x1400 | ||||
| #define GL_UNSIGNED_BYTE                  0x1401 | ||||
| #define GL_SHORT                          0x1402 | ||||
| @@ -201,35 +240,44 @@ typedef khronos_uint8_t GLubyte; | ||||
| #define GL_UNSIGNED_INT                   0x1405 | ||||
| #define GL_FLOAT                          0x1406 | ||||
| #define GL_FIXED                          0x140C | ||||
|  | ||||
| /* PixelFormat */ | ||||
| #define GL_DEPTH_COMPONENT                0x1902 | ||||
| #define GL_ALPHA                          0x1906 | ||||
| #define GL_RGB                            0x1907 | ||||
| #define GL_RGBA                           0x1908 | ||||
| #define GL_LUMINANCE                      0x1909 | ||||
| #define GL_LUMINANCE_ALPHA                0x190A | ||||
|  | ||||
| /* PixelType */ | ||||
| /*      GL_UNSIGNED_BYTE */ | ||||
| #define GL_UNSIGNED_SHORT_4_4_4_4         0x8033 | ||||
| #define GL_UNSIGNED_SHORT_5_5_5_1         0x8034 | ||||
| #define GL_UNSIGNED_SHORT_5_6_5           0x8363 | ||||
| #define GL_FRAGMENT_SHADER                0x8B30 | ||||
| #define GL_VERTEX_SHADER                  0x8B31 | ||||
| #define GL_MAX_VERTEX_ATTRIBS             0x8869 | ||||
| #define GL_MAX_VERTEX_UNIFORM_VECTORS     0x8DFB | ||||
| #define GL_MAX_VARYING_VECTORS            0x8DFC | ||||
|  | ||||
| /* Shaders */ | ||||
| #define GL_FRAGMENT_SHADER                  0x8B30 | ||||
| #define GL_VERTEX_SHADER                    0x8B31 | ||||
| #define GL_MAX_VERTEX_ATTRIBS               0x8869 | ||||
| #define GL_MAX_VERTEX_UNIFORM_VECTORS       0x8DFB | ||||
| #define GL_MAX_VARYING_VECTORS              0x8DFC | ||||
| #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D | ||||
| #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C | ||||
| #define GL_MAX_TEXTURE_IMAGE_UNITS        0x8872 | ||||
| #define GL_MAX_FRAGMENT_UNIFORM_VECTORS   0x8DFD | ||||
| #define GL_SHADER_TYPE                    0x8B4F | ||||
| #define GL_DELETE_STATUS                  0x8B80 | ||||
| #define GL_LINK_STATUS                    0x8B82 | ||||
| #define GL_VALIDATE_STATUS                0x8B83 | ||||
| #define GL_ATTACHED_SHADERS               0x8B85 | ||||
| #define GL_ACTIVE_UNIFORMS                0x8B86 | ||||
| #define GL_ACTIVE_UNIFORM_MAX_LENGTH      0x8B87 | ||||
| #define GL_ACTIVE_ATTRIBUTES              0x8B89 | ||||
| #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH    0x8B8A | ||||
| #define GL_SHADING_LANGUAGE_VERSION       0x8B8C | ||||
| #define GL_CURRENT_PROGRAM                0x8B8D | ||||
| #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS   0x8B4C | ||||
| #define GL_MAX_TEXTURE_IMAGE_UNITS          0x8872 | ||||
| #define GL_MAX_FRAGMENT_UNIFORM_VECTORS     0x8DFD | ||||
| #define GL_SHADER_TYPE                      0x8B4F | ||||
| #define GL_DELETE_STATUS                    0x8B80 | ||||
| #define GL_LINK_STATUS                      0x8B82 | ||||
| #define GL_VALIDATE_STATUS                  0x8B83 | ||||
| #define GL_ATTACHED_SHADERS                 0x8B85 | ||||
| #define GL_ACTIVE_UNIFORMS                  0x8B86 | ||||
| #define GL_ACTIVE_UNIFORM_MAX_LENGTH        0x8B87 | ||||
| #define GL_ACTIVE_ATTRIBUTES                0x8B89 | ||||
| #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH      0x8B8A | ||||
| #define GL_SHADING_LANGUAGE_VERSION         0x8B8C | ||||
| #define GL_CURRENT_PROGRAM                  0x8B8D | ||||
|  | ||||
| /* StencilFunction */ | ||||
| #define GL_NEVER                          0x0200 | ||||
| #define GL_LESS                           0x0201 | ||||
| #define GL_EQUAL                          0x0202 | ||||
| @@ -238,6 +286,9 @@ typedef khronos_uint8_t GLubyte; | ||||
| #define GL_NOTEQUAL                       0x0205 | ||||
| #define GL_GEQUAL                         0x0206 | ||||
| #define GL_ALWAYS                         0x0207 | ||||
|  | ||||
| /* StencilOp */ | ||||
| /*      GL_ZERO */ | ||||
| #define GL_KEEP                           0x1E00 | ||||
| #define GL_REPLACE                        0x1E01 | ||||
| #define GL_INCR                           0x1E02 | ||||
| @@ -245,21 +296,35 @@ typedef khronos_uint8_t GLubyte; | ||||
| #define GL_INVERT                         0x150A | ||||
| #define GL_INCR_WRAP                      0x8507 | ||||
| #define GL_DECR_WRAP                      0x8508 | ||||
|  | ||||
| /* StringName */ | ||||
| #define GL_VENDOR                         0x1F00 | ||||
| #define GL_RENDERER                       0x1F01 | ||||
| #define GL_VERSION                        0x1F02 | ||||
| #define GL_EXTENSIONS                     0x1F03 | ||||
|  | ||||
| /* TextureMagFilter */ | ||||
| #define GL_NEAREST                        0x2600 | ||||
| #define GL_LINEAR                         0x2601 | ||||
|  | ||||
| /* TextureMinFilter */ | ||||
| /*      GL_NEAREST */ | ||||
| /*      GL_LINEAR */ | ||||
| #define GL_NEAREST_MIPMAP_NEAREST         0x2700 | ||||
| #define GL_LINEAR_MIPMAP_NEAREST          0x2701 | ||||
| #define GL_NEAREST_MIPMAP_LINEAR          0x2702 | ||||
| #define GL_LINEAR_MIPMAP_LINEAR           0x2703 | ||||
|  | ||||
| /* TextureParameterName */ | ||||
| #define GL_TEXTURE_MAG_FILTER             0x2800 | ||||
| #define GL_TEXTURE_MIN_FILTER             0x2801 | ||||
| #define GL_TEXTURE_WRAP_S                 0x2802 | ||||
| #define GL_TEXTURE_WRAP_T                 0x2803 | ||||
|  | ||||
| /* TextureTarget */ | ||||
| /*      GL_TEXTURE_2D */ | ||||
| #define GL_TEXTURE                        0x1702 | ||||
|  | ||||
| #define GL_TEXTURE_CUBE_MAP               0x8513 | ||||
| #define GL_TEXTURE_BINDING_CUBE_MAP       0x8514 | ||||
| #define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515 | ||||
| @@ -269,6 +334,8 @@ typedef khronos_uint8_t GLubyte; | ||||
| #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519 | ||||
| #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A | ||||
| #define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C | ||||
|  | ||||
| /* TextureUnit */ | ||||
| #define GL_TEXTURE0                       0x84C0 | ||||
| #define GL_TEXTURE1                       0x84C1 | ||||
| #define GL_TEXTURE2                       0x84C2 | ||||
| @@ -302,9 +369,13 @@ typedef khronos_uint8_t GLubyte; | ||||
| #define GL_TEXTURE30                      0x84DE | ||||
| #define GL_TEXTURE31                      0x84DF | ||||
| #define GL_ACTIVE_TEXTURE                 0x84E0 | ||||
|  | ||||
| /* TextureWrapMode */ | ||||
| #define GL_REPEAT                         0x2901 | ||||
| #define GL_CLAMP_TO_EDGE                  0x812F | ||||
| #define GL_MIRRORED_REPEAT                0x8370 | ||||
|  | ||||
| /* Uniform Types */ | ||||
| #define GL_FLOAT_VEC2                     0x8B50 | ||||
| #define GL_FLOAT_VEC3                     0x8B51 | ||||
| #define GL_FLOAT_VEC4                     0x8B52 | ||||
| @@ -320,34 +391,48 @@ typedef khronos_uint8_t GLubyte; | ||||
| #define GL_FLOAT_MAT4                     0x8B5C | ||||
| #define GL_SAMPLER_2D                     0x8B5E | ||||
| #define GL_SAMPLER_CUBE                   0x8B60 | ||||
| #define GL_VERTEX_ATTRIB_ARRAY_ENABLED    0x8622 | ||||
| #define GL_VERTEX_ATTRIB_ARRAY_SIZE       0x8623 | ||||
| #define GL_VERTEX_ATTRIB_ARRAY_STRIDE     0x8624 | ||||
| #define GL_VERTEX_ATTRIB_ARRAY_TYPE       0x8625 | ||||
| #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A | ||||
| #define GL_VERTEX_ATTRIB_ARRAY_POINTER    0x8645 | ||||
|  | ||||
| /* Vertex Arrays */ | ||||
| #define GL_VERTEX_ATTRIB_ARRAY_ENABLED        0x8622 | ||||
| #define GL_VERTEX_ATTRIB_ARRAY_SIZE           0x8623 | ||||
| #define GL_VERTEX_ATTRIB_ARRAY_STRIDE         0x8624 | ||||
| #define GL_VERTEX_ATTRIB_ARRAY_TYPE           0x8625 | ||||
| #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED     0x886A | ||||
| #define GL_VERTEX_ATTRIB_ARRAY_POINTER        0x8645 | ||||
| #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F | ||||
| #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A | ||||
|  | ||||
| /* Read Format */ | ||||
| #define GL_IMPLEMENTATION_COLOR_READ_TYPE   0x8B9A | ||||
| #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B | ||||
|  | ||||
| /* Shader Source */ | ||||
| #define GL_COMPILE_STATUS                 0x8B81 | ||||
| #define GL_INFO_LOG_LENGTH                0x8B84 | ||||
| #define GL_SHADER_SOURCE_LENGTH           0x8B88 | ||||
| #define GL_SHADER_COMPILER                0x8DFA | ||||
|  | ||||
| /* Shader Binary */ | ||||
| #define GL_SHADER_BINARY_FORMATS          0x8DF8 | ||||
| #define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9 | ||||
|  | ||||
| /* Shader Precision-Specified Types */ | ||||
| #define GL_LOW_FLOAT                      0x8DF0 | ||||
| #define GL_MEDIUM_FLOAT                   0x8DF1 | ||||
| #define GL_HIGH_FLOAT                     0x8DF2 | ||||
| #define GL_LOW_INT                        0x8DF3 | ||||
| #define GL_MEDIUM_INT                     0x8DF4 | ||||
| #define GL_HIGH_INT                       0x8DF5 | ||||
|  | ||||
| /* Framebuffer Object. */ | ||||
| #define GL_FRAMEBUFFER                    0x8D40 | ||||
| #define GL_RENDERBUFFER                   0x8D41 | ||||
|  | ||||
| #define GL_RGBA4                          0x8056 | ||||
| #define GL_RGB5_A1                        0x8057 | ||||
| #define GL_RGB565                         0x8D62 | ||||
| #define GL_DEPTH_COMPONENT16              0x81A5 | ||||
| #define GL_STENCIL_INDEX8                 0x8D48 | ||||
|  | ||||
| #define GL_RENDERBUFFER_WIDTH             0x8D42 | ||||
| #define GL_RENDERBUFFER_HEIGHT            0x8D43 | ||||
| #define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44 | ||||
| @@ -357,169 +442,179 @@ typedef khronos_uint8_t GLubyte; | ||||
| #define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53 | ||||
| #define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54 | ||||
| #define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55 | ||||
| #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 | ||||
| #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 | ||||
| #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 | ||||
|  | ||||
| #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           0x8CD0 | ||||
| #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           0x8CD1 | ||||
| #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         0x8CD2 | ||||
| #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 | ||||
|  | ||||
| #define GL_COLOR_ATTACHMENT0              0x8CE0 | ||||
| #define GL_DEPTH_ATTACHMENT               0x8D00 | ||||
| #define GL_STENCIL_ATTACHMENT             0x8D20 | ||||
|  | ||||
| #define GL_NONE                           0 | ||||
| #define GL_FRAMEBUFFER_COMPLETE           0x8CD5 | ||||
| #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 | ||||
|  | ||||
| #define GL_FRAMEBUFFER_COMPLETE                      0x8CD5 | ||||
| #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT         0x8CD6 | ||||
| #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 | ||||
| #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 | ||||
| #define GL_FRAMEBUFFER_UNSUPPORTED        0x8CDD | ||||
| #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS         0x8CD9 | ||||
| #define GL_FRAMEBUFFER_UNSUPPORTED                   0x8CDD | ||||
|  | ||||
| #define GL_FRAMEBUFFER_BINDING            0x8CA6 | ||||
| #define GL_RENDERBUFFER_BINDING           0x8CA7 | ||||
| #define GL_MAX_RENDERBUFFER_SIZE          0x84E8 | ||||
|  | ||||
| #define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506 | ||||
| GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); | ||||
| GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); | ||||
| GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); | ||||
| GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); | ||||
| GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); | ||||
| GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); | ||||
| GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); | ||||
| GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); | ||||
| GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); | ||||
| GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); | ||||
| GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); | ||||
| GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); | ||||
| GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); | ||||
| GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); | ||||
| GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); | ||||
| GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); | ||||
| GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); | ||||
| GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d); | ||||
| GL_APICALL void GL_APIENTRY glClearStencil (GLint s); | ||||
| GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); | ||||
| GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); | ||||
| GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); | ||||
| GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); | ||||
| GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); | ||||
| GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); | ||||
| GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); | ||||
| GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); | ||||
| GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); | ||||
| GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); | ||||
| GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); | ||||
| GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); | ||||
| GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); | ||||
| GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); | ||||
| GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); | ||||
| GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); | ||||
| GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); | ||||
| GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); | ||||
| GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); | ||||
| GL_APICALL void GL_APIENTRY glDisable (GLenum cap); | ||||
| GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); | ||||
| GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); | ||||
| GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); | ||||
| GL_APICALL void GL_APIENTRY glEnable (GLenum cap); | ||||
| GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); | ||||
| GL_APICALL void GL_APIENTRY glFinish (void); | ||||
| GL_APICALL void GL_APIENTRY glFlush (void); | ||||
| GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); | ||||
| GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); | ||||
| GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); | ||||
| GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); | ||||
| GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); | ||||
| GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); | ||||
| GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); | ||||
| GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); | ||||
| GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); | ||||
| GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); | ||||
| GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); | ||||
| GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); | ||||
| GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); | ||||
| GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); | ||||
| GL_APICALL GLenum GL_APIENTRY glGetError (void); | ||||
| GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); | ||||
| GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); | ||||
| GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); | ||||
| GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); | ||||
| GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); | ||||
| GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); | ||||
| GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); | ||||
| GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); | ||||
| GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); | ||||
| GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); | ||||
| GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name); | ||||
| GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); | ||||
| GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); | ||||
| GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); | ||||
| GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); | ||||
| GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); | ||||
| GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); | ||||
| GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); | ||||
| GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); | ||||
| GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); | ||||
| GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); | ||||
| GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); | ||||
| GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); | ||||
| GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); | ||||
| GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); | ||||
| GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); | ||||
| GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); | ||||
| GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); | ||||
| GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); | ||||
| GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); | ||||
| GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); | ||||
| GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); | ||||
| GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); | ||||
| GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); | ||||
| GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); | ||||
| GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); | ||||
| GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); | ||||
| GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); | ||||
| GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); | ||||
| GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); | ||||
| GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); | ||||
| GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); | ||||
| GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); | ||||
| GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); | ||||
| GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); | ||||
| GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); | ||||
| GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); | ||||
| GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); | ||||
| GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); | ||||
| GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); | ||||
| GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0); | ||||
| GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); | ||||
| GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0); | ||||
| GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); | ||||
| GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); | ||||
| GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); | ||||
| GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); | ||||
| GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); | ||||
| GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); | ||||
| GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); | ||||
| GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); | ||||
| GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); | ||||
| GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); | ||||
| GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); | ||||
| GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); | ||||
| GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); | ||||
| GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); | ||||
| GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); | ||||
| GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); | ||||
| GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); | ||||
| GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); | ||||
| GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); | ||||
| GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); | ||||
| GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); | ||||
| GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); | ||||
| GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); | ||||
| GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); | ||||
| GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); | ||||
| GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); | ||||
| GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); | ||||
| GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); | ||||
| #endif /* GL_ES_VERSION_2_0 */ | ||||
|  | ||||
| /*------------------------------------------------------------------------- | ||||
|  * GL core functions. | ||||
|  *-----------------------------------------------------------------------*/ | ||||
|  | ||||
| GL_APICALL void         GL_APIENTRY glActiveTexture (GLenum texture); | ||||
| GL_APICALL void         GL_APIENTRY glAttachShader (GLuint program, GLuint shader); | ||||
| GL_APICALL void         GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name); | ||||
| GL_APICALL void         GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); | ||||
| GL_APICALL void         GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); | ||||
| GL_APICALL void         GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); | ||||
| GL_APICALL void         GL_APIENTRY glBindTexture (GLenum target, GLuint texture); | ||||
| GL_APICALL void         GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); | ||||
| GL_APICALL void         GL_APIENTRY glBlendEquation ( GLenum mode ); | ||||
| GL_APICALL void         GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); | ||||
| GL_APICALL void         GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); | ||||
| GL_APICALL void         GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); | ||||
| GL_APICALL void         GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage); | ||||
| GL_APICALL void         GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data); | ||||
| GL_APICALL GLenum       GL_APIENTRY glCheckFramebufferStatus (GLenum target); | ||||
| GL_APICALL void         GL_APIENTRY glClear (GLbitfield mask); | ||||
| GL_APICALL void         GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); | ||||
| GL_APICALL void         GL_APIENTRY glClearDepthf (GLclampf depth); | ||||
| GL_APICALL void         GL_APIENTRY glClearStencil (GLint s); | ||||
| GL_APICALL void         GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); | ||||
| GL_APICALL void         GL_APIENTRY glCompileShader (GLuint shader); | ||||
| GL_APICALL void         GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data); | ||||
| GL_APICALL void         GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data); | ||||
| GL_APICALL void         GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); | ||||
| GL_APICALL void         GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); | ||||
| GL_APICALL GLuint       GL_APIENTRY glCreateProgram (void); | ||||
| GL_APICALL GLuint       GL_APIENTRY glCreateShader (GLenum type); | ||||
| GL_APICALL void         GL_APIENTRY glCullFace (GLenum mode); | ||||
| GL_APICALL void         GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers); | ||||
| GL_APICALL void         GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers); | ||||
| GL_APICALL void         GL_APIENTRY glDeleteProgram (GLuint program); | ||||
| GL_APICALL void         GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers); | ||||
| GL_APICALL void         GL_APIENTRY glDeleteShader (GLuint shader); | ||||
| GL_APICALL void         GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures); | ||||
| GL_APICALL void         GL_APIENTRY glDepthFunc (GLenum func); | ||||
| GL_APICALL void         GL_APIENTRY glDepthMask (GLboolean flag); | ||||
| GL_APICALL void         GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar); | ||||
| GL_APICALL void         GL_APIENTRY glDetachShader (GLuint program, GLuint shader); | ||||
| GL_APICALL void         GL_APIENTRY glDisable (GLenum cap); | ||||
| GL_APICALL void         GL_APIENTRY glDisableVertexAttribArray (GLuint index); | ||||
| GL_APICALL void         GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); | ||||
| GL_APICALL void         GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices); | ||||
| GL_APICALL void         GL_APIENTRY glEnable (GLenum cap); | ||||
| GL_APICALL void         GL_APIENTRY glEnableVertexAttribArray (GLuint index); | ||||
| GL_APICALL void         GL_APIENTRY glFinish (void); | ||||
| GL_APICALL void         GL_APIENTRY glFlush (void); | ||||
| GL_APICALL void         GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); | ||||
| GL_APICALL void         GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); | ||||
| GL_APICALL void         GL_APIENTRY glFrontFace (GLenum mode); | ||||
| GL_APICALL void         GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers); | ||||
| GL_APICALL void         GL_APIENTRY glGenerateMipmap (GLenum target); | ||||
| GL_APICALL void         GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers); | ||||
| GL_APICALL void         GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers); | ||||
| GL_APICALL void         GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures); | ||||
| GL_APICALL void         GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); | ||||
| GL_APICALL void         GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); | ||||
| GL_APICALL void         GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); | ||||
| GL_APICALL GLint        GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name); | ||||
| GL_APICALL void         GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params); | ||||
| GL_APICALL void         GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params); | ||||
| GL_APICALL GLenum       GL_APIENTRY glGetError (void); | ||||
| GL_APICALL void         GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params); | ||||
| GL_APICALL void         GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params); | ||||
| GL_APICALL void         GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params); | ||||
| GL_APICALL void         GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params); | ||||
| GL_APICALL void         GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog); | ||||
| GL_APICALL void         GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params); | ||||
| GL_APICALL void         GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params); | ||||
| GL_APICALL void         GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog); | ||||
| GL_APICALL void         GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); | ||||
| GL_APICALL void         GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source); | ||||
| GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name); | ||||
| GL_APICALL void         GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params); | ||||
| GL_APICALL void         GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params); | ||||
| GL_APICALL void         GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params); | ||||
| GL_APICALL void         GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params); | ||||
| GL_APICALL GLint        GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name); | ||||
| GL_APICALL void         GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params); | ||||
| GL_APICALL void         GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params); | ||||
| GL_APICALL void         GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer); | ||||
| GL_APICALL void         GL_APIENTRY glHint (GLenum target, GLenum mode); | ||||
| GL_APICALL GLboolean    GL_APIENTRY glIsBuffer (GLuint buffer); | ||||
| GL_APICALL GLboolean    GL_APIENTRY glIsEnabled (GLenum cap); | ||||
| GL_APICALL GLboolean    GL_APIENTRY glIsFramebuffer (GLuint framebuffer); | ||||
| GL_APICALL GLboolean    GL_APIENTRY glIsProgram (GLuint program); | ||||
| GL_APICALL GLboolean    GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); | ||||
| GL_APICALL GLboolean    GL_APIENTRY glIsShader (GLuint shader); | ||||
| GL_APICALL GLboolean    GL_APIENTRY glIsTexture (GLuint texture); | ||||
| GL_APICALL void         GL_APIENTRY glLineWidth (GLfloat width); | ||||
| GL_APICALL void         GL_APIENTRY glLinkProgram (GLuint program); | ||||
| GL_APICALL void         GL_APIENTRY glPixelStorei (GLenum pname, GLint param); | ||||
| GL_APICALL void         GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); | ||||
| GL_APICALL void         GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels); | ||||
| GL_APICALL void         GL_APIENTRY glReleaseShaderCompiler (void); | ||||
| GL_APICALL void         GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); | ||||
| GL_APICALL void         GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); | ||||
| GL_APICALL void         GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); | ||||
| GL_APICALL void         GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); | ||||
| GL_APICALL void         GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length); | ||||
| GL_APICALL void         GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); | ||||
| GL_APICALL void         GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); | ||||
| GL_APICALL void         GL_APIENTRY glStencilMask (GLuint mask); | ||||
| GL_APICALL void         GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); | ||||
| GL_APICALL void         GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); | ||||
| GL_APICALL void         GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass); | ||||
| GL_APICALL void         GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels); | ||||
| GL_APICALL void         GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); | ||||
| GL_APICALL void         GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params); | ||||
| GL_APICALL void         GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); | ||||
| GL_APICALL void         GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params); | ||||
| GL_APICALL void         GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels); | ||||
| GL_APICALL void         GL_APIENTRY glUniform1f (GLint location, GLfloat x); | ||||
| GL_APICALL void         GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v); | ||||
| GL_APICALL void         GL_APIENTRY glUniform1i (GLint location, GLint x); | ||||
| GL_APICALL void         GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v); | ||||
| GL_APICALL void         GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y); | ||||
| GL_APICALL void         GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v); | ||||
| GL_APICALL void         GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y); | ||||
| GL_APICALL void         GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v); | ||||
| GL_APICALL void         GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z); | ||||
| GL_APICALL void         GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v); | ||||
| GL_APICALL void         GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z); | ||||
| GL_APICALL void         GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v); | ||||
| GL_APICALL void         GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); | ||||
| GL_APICALL void         GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v); | ||||
| GL_APICALL void         GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w); | ||||
| GL_APICALL void         GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v); | ||||
| GL_APICALL void         GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); | ||||
| GL_APICALL void         GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); | ||||
| GL_APICALL void         GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); | ||||
| GL_APICALL void         GL_APIENTRY glUseProgram (GLuint program); | ||||
| GL_APICALL void         GL_APIENTRY glValidateProgram (GLuint program); | ||||
| GL_APICALL void         GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x); | ||||
| GL_APICALL void         GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values); | ||||
| GL_APICALL void         GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y); | ||||
| GL_APICALL void         GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values); | ||||
| GL_APICALL void         GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z); | ||||
| GL_APICALL void         GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values); | ||||
| GL_APICALL void         GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); | ||||
| GL_APICALL void         GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values); | ||||
| GL_APICALL void         GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr); | ||||
| GL_APICALL void         GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| } | ||||
| #endif | ||||
|  | ||||
| #endif | ||||
| #endif /* __gl2_h_ */ | ||||
|   | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -27,4 +27,6 @@ | ||||
| #define GL_APIENTRY KHRONOS_APIENTRY | ||||
| #endif | ||||
|  | ||||
| #define GL_STENCIL_INDEX 0x1901 | ||||
|  | ||||
| #endif /* __gl2platform_h_ */ | ||||
|   | ||||
							
								
								
									
										1922
									
								
								include/GLES3/gl3.h
									
									
									
									
									
								
							
							
						
						
									
										1922
									
								
								include/GLES3/gl3.h
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -1,76 +0,0 @@ | ||||
| /* | ||||
|  * Copyright 2006, Philippe Houdoin. All rights reserved. | ||||
|  * Distributed under the terms of the MIT License. | ||||
|  | ||||
|  * This header defines BGLRenderer, the base class making up | ||||
|  * the Haiku GL renderer add-ons (essentially selfcontained C++ | ||||
|  * shared libraries that do the actual rendering such as | ||||
|  * libswpipe.so and libswrast.so) | ||||
|  */ | ||||
| #ifndef GLRENDERER_H | ||||
| #define GLRENDERER_H | ||||
|  | ||||
|  | ||||
| #include <BeBuild.h> | ||||
| #include <GLView.h> | ||||
|  | ||||
|  | ||||
| class BGLDispatcher; | ||||
| class GLRendererRoster; | ||||
|  | ||||
| typedef unsigned long renderer_id; | ||||
|  | ||||
| class BGLRenderer | ||||
| { | ||||
| 							// Private unimplemented copy constructors | ||||
| 							BGLRenderer(const BGLRenderer &); | ||||
| 							BGLRenderer & operator=(const BGLRenderer &); | ||||
|  | ||||
| public: | ||||
| 							BGLRenderer(BGLView *view, ulong bgl_options, | ||||
| 								BGLDispatcher *dispatcher); | ||||
| 	virtual					~BGLRenderer(); | ||||
|  | ||||
| 	void 					Acquire(); | ||||
| 	void					Release(); | ||||
|  | ||||
| 	virtual void			LockGL(); | ||||
| 	virtual void 			UnlockGL(); | ||||
|  | ||||
| 	virtual	void 			SwapBuffers(bool VSync = false); | ||||
| 	virtual	void			Draw(BRect updateRect); | ||||
| 	virtual status_t		CopyPixelsOut(BPoint source, BBitmap *dest); | ||||
| 	virtual status_t    	CopyPixelsIn(BBitmap *source, BPoint dest); | ||||
|  | ||||
| 	virtual void			FrameResized(float width, float height); | ||||
|  | ||||
| 	virtual void			DirectConnected(direct_buffer_info *info); | ||||
| 	virtual void			EnableDirectMode(bool enabled); | ||||
|  | ||||
| 	inline	int32			ReferenceCount() const { return fRefCount; }; | ||||
| 	inline	ulong			Options() const { return fOptions; }; | ||||
| 	inline	BGLView*		GLView() { return fView; }; | ||||
| 	inline	BGLDispatcher*	GLDispatcher() { return fDispatcher; }; | ||||
|  | ||||
| private: | ||||
| 	friend class GLRendererRoster; | ||||
|  | ||||
| 	virtual status_t		_Reserved_Renderer_0(int32, void *); | ||||
| 	virtual status_t		_Reserved_Renderer_1(int32, void *); | ||||
| 	virtual status_t		_Reserved_Renderer_2(int32, void *); | ||||
| 	virtual status_t		_Reserved_Renderer_3(int32, void *); | ||||
| 	virtual status_t		_Reserved_Renderer_4(int32, void *); | ||||
|  | ||||
| 	int32					fRefCount;	// How much we're still useful | ||||
| 	BGLView*				fView;		// Never forget who is the boss! | ||||
| 	ulong					fOptions;	// Keep that tune in memory | ||||
| 	BGLDispatcher*			fDispatcher;// Our personal GL API call dispatcher | ||||
|  | ||||
| 	GLRendererRoster*		fOwningRoster; | ||||
| 	renderer_id				fID; | ||||
| }; | ||||
|  | ||||
| extern "C" _EXPORT BGLRenderer* instantiate_gl_renderer(BGLView *view, ulong options, BGLDispatcher *dispatcher); | ||||
|  | ||||
|  | ||||
| #endif	// GLRENDERER_H | ||||
| @@ -1,193 +0,0 @@ | ||||
| /* | ||||
|  * Copyright 2008-2013, Haiku, Inc. All Rights Reserved. | ||||
|  * Distributed under the terms of the MIT License. | ||||
|  * | ||||
|  * This header defines BGLView, the base class making up | ||||
|  * the Haiku GL Kit. | ||||
|  * | ||||
|  */ | ||||
| #ifndef BGLVIEW_H | ||||
| #define BGLVIEW_H | ||||
|  | ||||
|  | ||||
| #include <GL/gl.h> | ||||
|  | ||||
| #define BGL_RGB			0 | ||||
| #define BGL_INDEX		1 | ||||
| #define BGL_SINGLE		0 | ||||
| #define BGL_DOUBLE		2 | ||||
| #define BGL_DIRECT		0 | ||||
| #define BGL_INDIRECT	4 | ||||
| #define BGL_ACCUM		8 | ||||
| #define BGL_ALPHA		16 | ||||
| #define BGL_DEPTH		32 | ||||
| #define BGL_OVERLAY		64 | ||||
| #define BGL_UNDERLAY	128 | ||||
| #define BGL_STENCIL		512 | ||||
|  | ||||
| #ifdef __cplusplus | ||||
|  | ||||
| #include <AppKit.h> | ||||
| #include <Bitmap.h> | ||||
| #include <DirectWindow.h> | ||||
| #include <View.h> | ||||
| #include <Window.h> | ||||
| #include <WindowScreen.h> | ||||
|  | ||||
|  | ||||
| struct glview_direct_info; | ||||
| class BGLRenderer; | ||||
| class GLRendererRoster; | ||||
|  | ||||
| class BGLView : public BView { | ||||
| public: | ||||
| 							BGLView(BRect rect, const char* name, | ||||
| 								ulong resizingMode, ulong mode, | ||||
| 								ulong options); | ||||
| 	virtual					~BGLView(); | ||||
|  | ||||
| 			void			LockGL(); | ||||
| 			void			UnlockGL(); | ||||
| 			void			SwapBuffers(); | ||||
| 			void			SwapBuffers(bool vSync); | ||||
|  | ||||
| 			BView*			EmbeddedView(); // deprecated, returns NULL | ||||
| 			void*			GetGLProcAddress(const char* procName); | ||||
|  | ||||
| 			status_t		CopyPixelsOut(BPoint source, BBitmap *dest); | ||||
| 			status_t		CopyPixelsIn(BBitmap *source, BPoint dest); | ||||
|  | ||||
| 	// Mesa's GLenum is uint where Be's ones was ulong! | ||||
| 	virtual	void			ErrorCallback(unsigned long errorCode); | ||||
|  | ||||
| 	virtual void			Draw(BRect updateRect); | ||||
| 	virtual void			AttachedToWindow(); | ||||
| 	virtual void			AllAttached(); | ||||
| 	virtual void			DetachedFromWindow(); | ||||
| 	virtual void			AllDetached(); | ||||
|  | ||||
| 	virtual void			FrameResized(float newWidth, float newHeight); | ||||
| 	virtual status_t		Perform(perform_code d, void *arg); | ||||
|  | ||||
| 	virtual status_t		Archive(BMessage *data, bool deep = true) const; | ||||
|  | ||||
| 	virtual void			MessageReceived(BMessage *message); | ||||
| 	virtual void			SetResizingMode(uint32 mode); | ||||
|  | ||||
| 	virtual void			Show(); | ||||
| 	virtual void			Hide(); | ||||
|  | ||||
| 	virtual BHandler*		ResolveSpecifier(BMessage *msg, int32 index, | ||||
| 								BMessage *specifier, int32 form, | ||||
| 								const char *property); | ||||
| 	virtual status_t		GetSupportedSuites(BMessage *data); | ||||
|  | ||||
| 			void			DirectConnected(direct_buffer_info *info); | ||||
| 			void			EnableDirectMode(bool enabled); | ||||
|  | ||||
| 			void*			getGC()	{ return fGc; } // ??? | ||||
|  | ||||
| 	virtual void			GetPreferredSize(float* width, float* height); | ||||
|  | ||||
| private: | ||||
|  | ||||
| 	virtual void			_ReservedGLView1(); | ||||
| 	virtual void			_ReservedGLView2(); | ||||
| 	virtual void			_ReservedGLView3(); | ||||
| 	virtual void			_ReservedGLView4(); | ||||
| 	virtual void			_ReservedGLView5(); | ||||
| 	virtual void			_ReservedGLView6(); | ||||
| 	virtual void			_ReservedGLView7(); | ||||
| 	virtual void			_ReservedGLView8(); | ||||
|  | ||||
| 							BGLView(const BGLView &); | ||||
| 							BGLView &operator=(const BGLView &); | ||||
|  | ||||
| 			void			_DitherFront(); | ||||
| 			bool			_ConfirmDither(); | ||||
| 			void			_Draw(BRect rect); | ||||
| 			void			_CallDirectConnected(); | ||||
|  | ||||
| 			void*			fGc; | ||||
| 			uint32			fOptions; | ||||
| 			uint32			fDitherCount; | ||||
| 			BLocker			fDrawLock; | ||||
| 			BLocker			fDisplayLock; | ||||
| 			glview_direct_info* fClipInfo; | ||||
|  | ||||
| 			BGLRenderer*	fRenderer; | ||||
| 			GLRendererRoster* fRoster; | ||||
|  | ||||
| 			BBitmap*		fDitherMap; | ||||
| 			BRect			fBounds; | ||||
| 			int16*			fErrorBuffer[2]; | ||||
| 			uint64			_reserved[8]; | ||||
|  | ||||
| 			void			_LockDraw(); | ||||
| 			void			_UnlockDraw(); | ||||
|  | ||||
| // BeOS compatibility | ||||
| private: | ||||
| 							BGLView(BRect rect, char* name, | ||||
| 								ulong resizingMode, ulong mode, | ||||
| 								ulong options); | ||||
| }; | ||||
|  | ||||
|  | ||||
| class BGLScreen : public BWindowScreen { | ||||
| public: | ||||
| 							BGLScreen(char* name, | ||||
| 								ulong screenMode, ulong options, | ||||
| 								status_t *error, bool debug=false); | ||||
| 							~BGLScreen(); | ||||
|  | ||||
| 			void			LockGL(); | ||||
| 			void			UnlockGL(); | ||||
| 			void			SwapBuffers(); | ||||
| 							// Mesa's GLenum is uint where Be's ones was ulong! | ||||
| 	virtual	void			ErrorCallback(unsigned long errorCode); | ||||
|  | ||||
| 	virtual void			ScreenConnected(bool connected); | ||||
| 	virtual void			FrameResized(float width, float height); | ||||
| 	virtual status_t		Perform(perform_code code, void *arg); | ||||
|  | ||||
| 	virtual status_t		Archive(BMessage *data, bool deep = true) const; | ||||
| 	virtual void			MessageReceived(BMessage *message); | ||||
|  | ||||
| 	virtual void			Show(); | ||||
| 	virtual void			Hide(); | ||||
|  | ||||
| 	virtual BHandler*		ResolveSpecifier(BMessage *message, | ||||
| 								int32 index, | ||||
| 								BMessage *specifier, | ||||
| 								int32 form, | ||||
| 								const char *property); | ||||
| 	virtual status_t		GetSupportedSuites(BMessage *data); | ||||
|  | ||||
| private: | ||||
|  | ||||
| 	virtual void			_ReservedGLScreen1(); | ||||
| 	virtual void			_ReservedGLScreen2(); | ||||
| 	virtual void			_ReservedGLScreen3(); | ||||
| 	virtual void			_ReservedGLScreen4(); | ||||
| 	virtual void			_ReservedGLScreen5(); | ||||
| 	virtual void			_ReservedGLScreen6(); | ||||
| 	virtual void			_ReservedGLScreen7(); | ||||
| 	virtual void			_ReservedGLScreen8(); | ||||
|  | ||||
| 							BGLScreen(const BGLScreen &); | ||||
| 							BGLScreen &operator=(const BGLScreen &); | ||||
|  | ||||
| 			void*			fGc; | ||||
| 			long			fOptions; | ||||
| 			BLocker			fDrawLock; | ||||
|  | ||||
| 			int32			fColorSpace; | ||||
| 			uint32			fScreenMode; | ||||
|  | ||||
| 			uint64			_reserved[7]; | ||||
| }; | ||||
|  | ||||
| #endif // __cplusplus | ||||
|  | ||||
| #endif // BGLVIEW_H | ||||
| @@ -1,10 +0,0 @@ | ||||
| /* | ||||
|  * Master include file for the Haiku OpenGL Kit. | ||||
|  */ | ||||
|  | ||||
| #include <GL/gl.h> | ||||
| #include <GLView.h> | ||||
|  | ||||
| // Projects needing GL/glu.h and GL/glut.h should now | ||||
| // include these headers independently as glu and glut | ||||
| // are no longe core parts of mesa | ||||
| @@ -1,28 +0,0 @@ | ||||
| These headers make up the Haiku Op*nGL kit. | ||||
|  | ||||
| Headers in this directory preserve some BeOS™ compatibility | ||||
| compatibility, so changes should be mentioned to the Haiku | ||||
| project mailing list. | ||||
|  | ||||
| http://haiku-os.org | ||||
|  | ||||
| Normal Haiku Op*enGL layout: | ||||
|  | ||||
|   * headers/os/OpenGLKit.h | ||||
|   * headers/os/opengl/GLView.h | ||||
|   * headers/os/opengl/GLRenderer.h | ||||
|   * headers/os/opengl/GL/gl.h | ||||
|   * headers/os/opengl/GL/gl_mangle.h | ||||
|   * headers/os/opengl/GL/glext.h | ||||
|   * headers/os/opengl/GL/osmesa.h (needed?) | ||||
|  | ||||
| Extras: | ||||
|  | ||||
|   * headers/os/opengl/GL/glu.h | ||||
|   * headers/os/opengl/GL/glut.h | ||||
|  | ||||
| OpenGL™ is a trademark of SGI. The usage of this trademark | ||||
| in the Haiku GL Kit is not a sign of any certification or | ||||
| endorsement by SGI or its affiliates. Usage is purely to | ||||
| allow legacy compatibility with the BeOS™ and its 3D GL | ||||
| rendering subsystem. | ||||
| @@ -1,79 +0,0 @@ | ||||
| /* | ||||
|  * C11 <threads.h> emulation library | ||||
|  * | ||||
|  * (C) Copyright yohhoy 2012. | ||||
|  * Distributed under the Boost Software License, Version 1.0. | ||||
|  * | ||||
|  * Permission is hereby granted, free of charge, to any person or organization | ||||
|  * obtaining a copy of the software and accompanying documentation covered by | ||||
|  * this license (the "Software") to use, reproduce, display, distribute, | ||||
|  * execute, and transmit the Software, and to prepare [[derivative work]]s of the | ||||
|  * Software, and to permit third-parties to whom the Software is furnished to | ||||
|  * do so, all subject to the following: | ||||
|  * | ||||
|  * The copyright notices in the Software and this entire statement, including | ||||
|  * the above license grant, this restriction and the following disclaimer, | ||||
|  * must be included in all copies of the Software, in whole or in part, and | ||||
|  * all derivative works of the Software, unless such copies or derivative | ||||
|  * works are solely in the form of machine-executable object code generated by | ||||
|  * a source language processor. | ||||
|  * | ||||
|  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
|  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
|  * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT | ||||
|  * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE | ||||
|  * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, | ||||
|  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||||
|  * DEALINGS IN THE SOFTWARE. | ||||
|  */ | ||||
| #ifndef EMULATED_THREADS_H_INCLUDED_ | ||||
| #define EMULATED_THREADS_H_INCLUDED_ | ||||
|  | ||||
| #include <time.h> | ||||
|  | ||||
| #ifndef TIME_UTC | ||||
| #define TIME_UTC 1 | ||||
| #endif | ||||
|  | ||||
| #include "c99_compat.h" /* for `inline` */ | ||||
|  | ||||
| /*---------------------------- types ----------------------------*/ | ||||
| typedef void (*tss_dtor_t)(void*); | ||||
| typedef int (*thrd_start_t)(void*); | ||||
|  | ||||
| struct xtime { | ||||
|     time_t sec; | ||||
|     long nsec; | ||||
| }; | ||||
| typedef struct xtime xtime; | ||||
|  | ||||
|  | ||||
| /*-------------------- enumeration constants --------------------*/ | ||||
| enum { | ||||
|     mtx_plain     = 0, | ||||
|     mtx_try       = 1, | ||||
|     mtx_timed     = 2, | ||||
|     mtx_recursive = 4 | ||||
| }; | ||||
|  | ||||
| enum { | ||||
|     thrd_success = 0, // succeeded | ||||
|     thrd_timeout,     // timeout | ||||
|     thrd_error,       // failed | ||||
|     thrd_busy,        // resource busy | ||||
|     thrd_nomem        // out of memory | ||||
| }; | ||||
|  | ||||
| /*-------------------------- functions --------------------------*/ | ||||
|  | ||||
| #if defined(_WIN32) && !defined(__CYGWIN__) | ||||
| #include "threads_win32.h" | ||||
| #elif defined(HAVE_PTHREAD) | ||||
| #include "threads_posix.h" | ||||
| #else | ||||
| #error Not supported on this platform. | ||||
| #endif | ||||
|  | ||||
|  | ||||
|  | ||||
| #endif /* EMULATED_THREADS_H_INCLUDED_ */ | ||||
| @@ -1,375 +0,0 @@ | ||||
| /* | ||||
|  * C11 <threads.h> emulation library | ||||
|  * | ||||
|  * (C) Copyright yohhoy 2012. | ||||
|  * Distributed under the Boost Software License, Version 1.0. | ||||
|  * | ||||
|  * Permission is hereby granted, free of charge, to any person or organization | ||||
|  * obtaining a copy of the software and accompanying documentation covered by | ||||
|  * this license (the "Software") to use, reproduce, display, distribute, | ||||
|  * execute, and transmit the Software, and to prepare [[derivative work]]s of the | ||||
|  * Software, and to permit third-parties to whom the Software is furnished to | ||||
|  * do so, all subject to the following: | ||||
|  * | ||||
|  * The copyright notices in the Software and this entire statement, including | ||||
|  * the above license grant, this restriction and the following disclaimer, | ||||
|  * must be included in all copies of the Software, in whole or in part, and | ||||
|  * all derivative works of the Software, unless such copies or derivative | ||||
|  * works are solely in the form of machine-executable object code generated by | ||||
|  * a source language processor. | ||||
|  * | ||||
|  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
|  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
|  * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT | ||||
|  * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE | ||||
|  * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, | ||||
|  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||||
|  * DEALINGS IN THE SOFTWARE. | ||||
|  */ | ||||
| #include <stdlib.h> | ||||
| #ifndef assert | ||||
| #include <assert.h> | ||||
| #endif | ||||
| #include <limits.h> | ||||
| #include <errno.h> | ||||
| #include <unistd.h> | ||||
| #include <sched.h> | ||||
| #include <stdint.h> /* for intptr_t */ | ||||
|  | ||||
| /* | ||||
| Configuration macro: | ||||
|  | ||||
|   EMULATED_THREADS_USE_NATIVE_TIMEDLOCK | ||||
|     Use pthread_mutex_timedlock() for `mtx_timedlock()' | ||||
|     Otherwise use mtx_trylock() + *busy loop* emulation. | ||||
| */ | ||||
| #if !defined(__CYGWIN__) && !defined(__APPLE__) && !defined(__NetBSD__) | ||||
| #define EMULATED_THREADS_USE_NATIVE_TIMEDLOCK | ||||
| #endif | ||||
|  | ||||
|  | ||||
| #include <pthread.h> | ||||
|  | ||||
| /*---------------------------- macros ----------------------------*/ | ||||
| #define ONCE_FLAG_INIT PTHREAD_ONCE_INIT | ||||
| #ifdef INIT_ONCE_STATIC_INIT | ||||
| #define TSS_DTOR_ITERATIONS PTHREAD_DESTRUCTOR_ITERATIONS | ||||
| #else | ||||
| #define TSS_DTOR_ITERATIONS 1  // assume TSS dtor MAY be called at least once. | ||||
| #endif | ||||
|  | ||||
| // FIXME: temporary non-standard hack to ease transition | ||||
| #define _MTX_INITIALIZER_NP PTHREAD_MUTEX_INITIALIZER | ||||
|  | ||||
| /*---------------------------- types ----------------------------*/ | ||||
| typedef pthread_cond_t  cnd_t; | ||||
| typedef pthread_t       thrd_t; | ||||
| typedef pthread_key_t   tss_t; | ||||
| typedef pthread_mutex_t mtx_t; | ||||
| typedef pthread_once_t  once_flag; | ||||
|  | ||||
|  | ||||
| /* | ||||
| Implementation limits: | ||||
|   - Conditionally emulation for "mutex with timeout" | ||||
|     (see EMULATED_THREADS_USE_NATIVE_TIMEDLOCK macro) | ||||
| */ | ||||
| struct impl_thrd_param { | ||||
|     thrd_start_t func; | ||||
|     void *arg; | ||||
| }; | ||||
|  | ||||
| static inline void * | ||||
| impl_thrd_routine(void *p) | ||||
| { | ||||
|     struct impl_thrd_param pack = *((struct impl_thrd_param *)p); | ||||
|     free(p); | ||||
|     return (void*)(intptr_t)pack.func(pack.arg); | ||||
| } | ||||
|  | ||||
|  | ||||
| /*--------------- 7.25.2 Initialization functions ---------------*/ | ||||
| // 7.25.2.1 | ||||
| static inline void | ||||
| call_once(once_flag *flag, void (*func)(void)) | ||||
| { | ||||
|     pthread_once(flag, func); | ||||
| } | ||||
|  | ||||
|  | ||||
| /*------------- 7.25.3 Condition variable functions -------------*/ | ||||
| // 7.25.3.1 | ||||
| static inline int | ||||
| cnd_broadcast(cnd_t *cond) | ||||
| { | ||||
|     if (!cond) return thrd_error; | ||||
|     pthread_cond_broadcast(cond); | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
| // 7.25.3.2 | ||||
| static inline void | ||||
| cnd_destroy(cnd_t *cond) | ||||
| { | ||||
|     assert(cond); | ||||
|     pthread_cond_destroy(cond); | ||||
| } | ||||
|  | ||||
| // 7.25.3.3 | ||||
| static inline int | ||||
| cnd_init(cnd_t *cond) | ||||
| { | ||||
|     if (!cond) return thrd_error; | ||||
|     pthread_cond_init(cond, NULL); | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
| // 7.25.3.4 | ||||
| static inline int | ||||
| cnd_signal(cnd_t *cond) | ||||
| { | ||||
|     if (!cond) return thrd_error; | ||||
|     pthread_cond_signal(cond); | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
| // 7.25.3.5 | ||||
| static inline int | ||||
| cnd_timedwait(cnd_t *cond, mtx_t *mtx, const xtime *xt) | ||||
| { | ||||
|     struct timespec abs_time; | ||||
|     int rt; | ||||
|     if (!cond || !mtx || !xt) return thrd_error; | ||||
|     rt = pthread_cond_timedwait(cond, mtx, &abs_time); | ||||
|     if (rt == ETIMEDOUT) | ||||
|         return thrd_busy; | ||||
|     return (rt == 0) ? thrd_success : thrd_error; | ||||
| } | ||||
|  | ||||
| // 7.25.3.6 | ||||
| static inline int | ||||
| cnd_wait(cnd_t *cond, mtx_t *mtx) | ||||
| { | ||||
|     if (!cond || !mtx) return thrd_error; | ||||
|     pthread_cond_wait(cond, mtx); | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
|  | ||||
| /*-------------------- 7.25.4 Mutex functions --------------------*/ | ||||
| // 7.25.4.1 | ||||
| static inline void | ||||
| mtx_destroy(mtx_t *mtx) | ||||
| { | ||||
|     assert(mtx); | ||||
|     pthread_mutex_destroy(mtx); | ||||
| } | ||||
|  | ||||
| // 7.25.4.2 | ||||
| static inline int | ||||
| mtx_init(mtx_t *mtx, int type) | ||||
| { | ||||
|     pthread_mutexattr_t attr; | ||||
|     if (!mtx) return thrd_error; | ||||
|     if (type != mtx_plain && type != mtx_timed && type != mtx_try | ||||
|       && type != (mtx_plain|mtx_recursive) | ||||
|       && type != (mtx_timed|mtx_recursive) | ||||
|       && type != (mtx_try|mtx_recursive)) | ||||
|         return thrd_error; | ||||
|     pthread_mutexattr_init(&attr); | ||||
|     if ((type & mtx_recursive) != 0) { | ||||
| #if defined(__linux__) || defined(__linux) | ||||
|         pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); | ||||
| #else | ||||
|         pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); | ||||
| #endif | ||||
|     } | ||||
|     pthread_mutex_init(mtx, &attr); | ||||
|     pthread_mutexattr_destroy(&attr); | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
| // 7.25.4.3 | ||||
| static inline int | ||||
| mtx_lock(mtx_t *mtx) | ||||
| { | ||||
|     if (!mtx) return thrd_error; | ||||
|     pthread_mutex_lock(mtx); | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
| static inline int | ||||
| mtx_trylock(mtx_t *mtx); | ||||
|  | ||||
| static inline void | ||||
| thrd_yield(void); | ||||
|  | ||||
| // 7.25.4.4 | ||||
| static inline int | ||||
| mtx_timedlock(mtx_t *mtx, const xtime *xt) | ||||
| { | ||||
|     if (!mtx || !xt) return thrd_error; | ||||
|     { | ||||
| #ifdef EMULATED_THREADS_USE_NATIVE_TIMEDLOCK | ||||
|     struct timespec ts; | ||||
|     int rt; | ||||
|     ts.tv_sec = xt->sec; | ||||
|     ts.tv_nsec = xt->nsec; | ||||
|     rt = pthread_mutex_timedlock(mtx, &ts); | ||||
|     if (rt == 0) | ||||
|         return thrd_success; | ||||
|     return (rt == ETIMEDOUT) ? thrd_busy : thrd_error; | ||||
| #else | ||||
|     time_t expire = time(NULL); | ||||
|     expire += xt->sec; | ||||
|     while (mtx_trylock(mtx) != thrd_success) { | ||||
|         time_t now = time(NULL); | ||||
|         if (expire < now) | ||||
|             return thrd_busy; | ||||
|         // busy loop! | ||||
|         thrd_yield(); | ||||
|     } | ||||
|     return thrd_success; | ||||
| #endif | ||||
|     } | ||||
| } | ||||
|  | ||||
| // 7.25.4.5 | ||||
| static inline int | ||||
| mtx_trylock(mtx_t *mtx) | ||||
| { | ||||
|     if (!mtx) return thrd_error; | ||||
|     return (pthread_mutex_trylock(mtx) == 0) ? thrd_success : thrd_busy; | ||||
| } | ||||
|  | ||||
| // 7.25.4.6 | ||||
| static inline int | ||||
| mtx_unlock(mtx_t *mtx) | ||||
| { | ||||
|     if (!mtx) return thrd_error; | ||||
|     pthread_mutex_unlock(mtx); | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
|  | ||||
| /*------------------- 7.25.5 Thread functions -------------------*/ | ||||
| // 7.25.5.1 | ||||
| static inline int | ||||
| thrd_create(thrd_t *thr, thrd_start_t func, void *arg) | ||||
| { | ||||
|     struct impl_thrd_param *pack; | ||||
|     if (!thr) return thrd_error; | ||||
|     pack = (struct impl_thrd_param *)malloc(sizeof(struct impl_thrd_param)); | ||||
|     if (!pack) return thrd_nomem; | ||||
|     pack->func = func; | ||||
|     pack->arg = arg; | ||||
|     if (pthread_create(thr, NULL, impl_thrd_routine, pack) != 0) { | ||||
|         free(pack); | ||||
|         return thrd_error; | ||||
|     } | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
| // 7.25.5.2 | ||||
| static inline thrd_t | ||||
| thrd_current(void) | ||||
| { | ||||
|     return pthread_self(); | ||||
| } | ||||
|  | ||||
| // 7.25.5.3 | ||||
| static inline int | ||||
| thrd_detach(thrd_t thr) | ||||
| { | ||||
|     return (pthread_detach(thr) == 0) ? thrd_success : thrd_error; | ||||
| } | ||||
|  | ||||
| // 7.25.5.4 | ||||
| static inline int | ||||
| thrd_equal(thrd_t thr0, thrd_t thr1) | ||||
| { | ||||
|     return pthread_equal(thr0, thr1); | ||||
| } | ||||
|  | ||||
| // 7.25.5.5 | ||||
| static inline void | ||||
| thrd_exit(int res) | ||||
| { | ||||
|     pthread_exit((void*)(intptr_t)res); | ||||
| } | ||||
|  | ||||
| // 7.25.5.6 | ||||
| static inline int | ||||
| thrd_join(thrd_t thr, int *res) | ||||
| { | ||||
|     void *code; | ||||
|     if (pthread_join(thr, &code) != 0) | ||||
|         return thrd_error; | ||||
|     if (res) | ||||
|         *res = (int)(intptr_t)code; | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
| // 7.25.5.7 | ||||
| static inline void | ||||
| thrd_sleep(const xtime *xt) | ||||
| { | ||||
|     struct timespec req; | ||||
|     assert(xt); | ||||
|     req.tv_sec = xt->sec; | ||||
|     req.tv_nsec = xt->nsec; | ||||
|     nanosleep(&req, NULL); | ||||
| } | ||||
|  | ||||
| // 7.25.5.8 | ||||
| static inline void | ||||
| thrd_yield(void) | ||||
| { | ||||
|     sched_yield(); | ||||
| } | ||||
|  | ||||
|  | ||||
| /*----------- 7.25.6 Thread-specific storage functions -----------*/ | ||||
| // 7.25.6.1 | ||||
| static inline int | ||||
| tss_create(tss_t *key, tss_dtor_t dtor) | ||||
| { | ||||
|     if (!key) return thrd_error; | ||||
|     return (pthread_key_create(key, dtor) == 0) ? thrd_success : thrd_error; | ||||
| } | ||||
|  | ||||
| // 7.25.6.2 | ||||
| static inline void | ||||
| tss_delete(tss_t key) | ||||
| { | ||||
|     pthread_key_delete(key); | ||||
| } | ||||
|  | ||||
| // 7.25.6.3 | ||||
| static inline void * | ||||
| tss_get(tss_t key) | ||||
| { | ||||
|     return pthread_getspecific(key); | ||||
| } | ||||
|  | ||||
| // 7.25.6.4 | ||||
| static inline int | ||||
| tss_set(tss_t key, void *val) | ||||
| { | ||||
|     return (pthread_setspecific(key, val) == 0) ? thrd_success : thrd_error; | ||||
| } | ||||
|  | ||||
|  | ||||
| /*-------------------- 7.25.7 Time functions --------------------*/ | ||||
| // 7.25.6.1 | ||||
| static inline int | ||||
| xtime_get(xtime *xt, int base) | ||||
| { | ||||
|     if (!xt) return 0; | ||||
|     if (base == TIME_UTC) { | ||||
|         xt->sec = time(NULL); | ||||
|         xt->nsec = 0; | ||||
|         return base; | ||||
|     } | ||||
|     return 0; | ||||
| } | ||||
| @@ -1,642 +0,0 @@ | ||||
| /* | ||||
|  * C11 <threads.h> emulation library | ||||
|  * | ||||
|  * (C) Copyright yohhoy 2012. | ||||
|  * Distributed under the Boost Software License, Version 1.0. | ||||
|  * | ||||
|  * Permission is hereby granted, free of charge, to any person or organization | ||||
|  * obtaining a copy of the software and accompanying documentation covered by | ||||
|  * this license (the "Software") to use, reproduce, display, distribute, | ||||
|  * execute, and transmit the Software, and to prepare [[derivative work]]s of the | ||||
|  * Software, and to permit third-parties to whom the Software is furnished to | ||||
|  * do so, all subject to the following: | ||||
|  * | ||||
|  * The copyright notices in the Software and this entire statement, including | ||||
|  * the above license grant, this restriction and the following disclaimer, | ||||
|  * must be included in all copies of the Software, in whole or in part, and | ||||
|  * all derivative works of the Software, unless such copies or derivative | ||||
|  * works are solely in the form of machine-executable object code generated by | ||||
|  * a source language processor. | ||||
|  * | ||||
|  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
|  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||
|  * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT | ||||
|  * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE | ||||
|  * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, | ||||
|  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||||
|  * DEALINGS IN THE SOFTWARE. | ||||
|  */ | ||||
| #ifndef assert | ||||
| #include <assert.h> | ||||
| #endif | ||||
| #include <limits.h> | ||||
| #include <errno.h> | ||||
| #include <process.h>  // MSVCRT | ||||
| #include <stdlib.h> | ||||
|  | ||||
| /* | ||||
| Configuration macro: | ||||
|  | ||||
|   EMULATED_THREADS_USE_NATIVE_CALL_ONCE | ||||
|     Use native WindowsAPI one-time initialization function. | ||||
|     (requires WinVista or later) | ||||
|     Otherwise emulate by mtx_trylock() + *busy loop* for WinXP. | ||||
|  | ||||
|   EMULATED_THREADS_USE_NATIVE_CV | ||||
|     Use native WindowsAPI condition variable object. | ||||
|     (requires WinVista or later) | ||||
|     Otherwise use emulated implementation for WinXP. | ||||
|  | ||||
|   EMULATED_THREADS_TSS_DTOR_SLOTNUM | ||||
|     Max registerable TSS dtor number. | ||||
| */ | ||||
|  | ||||
| // XXX: Retain XP compatability | ||||
| #if 0 | ||||
| #if _WIN32_WINNT >= 0x0600 | ||||
| // Prefer native WindowsAPI on newer environment. | ||||
| #if !defined(__MINGW32__) | ||||
| #define EMULATED_THREADS_USE_NATIVE_CALL_ONCE  | ||||
| #endif | ||||
| #define EMULATED_THREADS_USE_NATIVE_CV | ||||
| #endif | ||||
| #endif | ||||
| #define EMULATED_THREADS_TSS_DTOR_SLOTNUM 64  // see TLS_MINIMUM_AVAILABLE | ||||
|  | ||||
|  | ||||
| #include <windows.h> | ||||
|  | ||||
| // check configuration | ||||
| #if defined(EMULATED_THREADS_USE_NATIVE_CALL_ONCE) && (_WIN32_WINNT < 0x0600) | ||||
| #error EMULATED_THREADS_USE_NATIVE_CALL_ONCE requires _WIN32_WINNT>=0x0600 | ||||
| #endif | ||||
|  | ||||
| #if defined(EMULATED_THREADS_USE_NATIVE_CV) && (_WIN32_WINNT < 0x0600) | ||||
| #error EMULATED_THREADS_USE_NATIVE_CV requires _WIN32_WINNT>=0x0600 | ||||
| #endif | ||||
|  | ||||
|  | ||||
| /*---------------------------- macros ----------------------------*/ | ||||
| #ifdef EMULATED_THREADS_USE_NATIVE_CALL_ONCE | ||||
| #define ONCE_FLAG_INIT INIT_ONCE_STATIC_INIT | ||||
| #else | ||||
| #define ONCE_FLAG_INIT {0} | ||||
| #endif | ||||
| #define TSS_DTOR_ITERATIONS 1 | ||||
|  | ||||
| // FIXME: temporary non-standard hack to ease transition | ||||
| #define _MTX_INITIALIZER_NP {(PCRITICAL_SECTION_DEBUG)-1, -1, 0, 0, 0, 0} | ||||
|  | ||||
| /*---------------------------- types ----------------------------*/ | ||||
| typedef struct cnd_t { | ||||
| #ifdef EMULATED_THREADS_USE_NATIVE_CV | ||||
|     CONDITION_VARIABLE condvar; | ||||
| #else | ||||
|     int blocked; | ||||
|     int gone; | ||||
|     int to_unblock; | ||||
|     HANDLE sem_queue; | ||||
|     HANDLE sem_gate; | ||||
|     CRITICAL_SECTION monitor; | ||||
| #endif | ||||
| } cnd_t; | ||||
|  | ||||
| typedef HANDLE thrd_t; | ||||
|  | ||||
| typedef DWORD tss_t; | ||||
|  | ||||
| typedef CRITICAL_SECTION mtx_t; | ||||
|  | ||||
| #ifdef EMULATED_THREADS_USE_NATIVE_CALL_ONCE | ||||
| typedef INIT_ONCE once_flag; | ||||
| #else | ||||
| typedef struct once_flag_t { | ||||
|     volatile LONG status; | ||||
| } once_flag; | ||||
| #endif | ||||
|  | ||||
|  | ||||
| static inline void * tss_get(tss_t key); | ||||
| static inline void thrd_yield(void); | ||||
| static inline int mtx_trylock(mtx_t *mtx); | ||||
| static inline int mtx_lock(mtx_t *mtx); | ||||
| static inline int mtx_unlock(mtx_t *mtx); | ||||
|  | ||||
| /* | ||||
| Implementation limits: | ||||
|   - Conditionally emulation for "Initialization functions" | ||||
|     (see EMULATED_THREADS_USE_NATIVE_CALL_ONCE macro) | ||||
|   - Emulated `mtx_timelock()' with mtx_trylock() + *busy loop* | ||||
| */ | ||||
| static void impl_tss_dtor_invoke(void);  // forward decl. | ||||
|  | ||||
| struct impl_thrd_param { | ||||
|     thrd_start_t func; | ||||
|     void *arg; | ||||
| }; | ||||
|  | ||||
| static unsigned __stdcall impl_thrd_routine(void *p) | ||||
| { | ||||
|     struct impl_thrd_param pack; | ||||
|     int code; | ||||
|     memcpy(&pack, p, sizeof(struct impl_thrd_param)); | ||||
|     free(p); | ||||
|     code = pack.func(pack.arg); | ||||
|     impl_tss_dtor_invoke(); | ||||
|     return (unsigned)code; | ||||
| } | ||||
|  | ||||
| static DWORD impl_xtime2msec(const xtime *xt) | ||||
| { | ||||
|     return (DWORD)((xt->sec * 1000U) + (xt->nsec / 1000000L)); | ||||
| } | ||||
|  | ||||
| #ifdef EMULATED_THREADS_USE_NATIVE_CALL_ONCE | ||||
| struct impl_call_once_param { void (*func)(void); }; | ||||
| static BOOL CALLBACK impl_call_once_callback(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context) | ||||
| { | ||||
|     struct impl_call_once_param *param = (struct impl_call_once_param*)Parameter; | ||||
|     (param->func)(); | ||||
|     ((void)InitOnce); ((void)Context);  // suppress warning | ||||
|     return TRUE; | ||||
| } | ||||
| #endif  // ifdef EMULATED_THREADS_USE_NATIVE_CALL_ONCE | ||||
|  | ||||
| #ifndef EMULATED_THREADS_USE_NATIVE_CV | ||||
| /* | ||||
| Note: | ||||
|   The implementation of condition variable is ported from Boost.Interprocess | ||||
|   See http://www.boost.org/boost/interprocess/sync/windows/condition.hpp | ||||
| */ | ||||
| static void impl_cond_do_signal(cnd_t *cond, int broadcast) | ||||
| { | ||||
|     int nsignal = 0; | ||||
|  | ||||
|     EnterCriticalSection(&cond->monitor); | ||||
|     if (cond->to_unblock != 0) { | ||||
|         if (cond->blocked == 0) { | ||||
|             LeaveCriticalSection(&cond->monitor); | ||||
|             return; | ||||
|         } | ||||
|         if (broadcast) { | ||||
|             cond->to_unblock += nsignal = cond->blocked; | ||||
|             cond->blocked = 0; | ||||
|         } else { | ||||
|             nsignal = 1; | ||||
|             cond->to_unblock++; | ||||
|             cond->blocked--; | ||||
|         } | ||||
|     } else if (cond->blocked > cond->gone) { | ||||
|         WaitForSingleObject(cond->sem_gate, INFINITE); | ||||
|         if (cond->gone != 0) { | ||||
|             cond->blocked -= cond->gone; | ||||
|             cond->gone = 0; | ||||
|         } | ||||
|         if (broadcast) { | ||||
|             nsignal = cond->to_unblock = cond->blocked; | ||||
|             cond->blocked = 0; | ||||
|         } else { | ||||
|             nsignal = cond->to_unblock = 1; | ||||
|             cond->blocked--; | ||||
|         } | ||||
|     } | ||||
|     LeaveCriticalSection(&cond->monitor); | ||||
|  | ||||
|     if (0 < nsignal) | ||||
|         ReleaseSemaphore(cond->sem_queue, nsignal, NULL); | ||||
| } | ||||
|  | ||||
| static int impl_cond_do_wait(cnd_t *cond, mtx_t *mtx, const xtime *xt) | ||||
| { | ||||
|     int nleft = 0; | ||||
|     int ngone = 0; | ||||
|     int timeout = 0; | ||||
|     DWORD w; | ||||
|  | ||||
|     WaitForSingleObject(cond->sem_gate, INFINITE); | ||||
|     cond->blocked++; | ||||
|     ReleaseSemaphore(cond->sem_gate, 1, NULL); | ||||
|  | ||||
|     mtx_unlock(mtx); | ||||
|  | ||||
|     w = WaitForSingleObject(cond->sem_queue, xt ? impl_xtime2msec(xt) : INFINITE); | ||||
|     timeout = (w == WAIT_TIMEOUT); | ||||
|   | ||||
|     EnterCriticalSection(&cond->monitor); | ||||
|     if ((nleft = cond->to_unblock) != 0) { | ||||
|         if (timeout) { | ||||
|             if (cond->blocked != 0) { | ||||
|                 cond->blocked--; | ||||
|             } else { | ||||
|                 cond->gone++; | ||||
|             } | ||||
|         } | ||||
|         if (--cond->to_unblock == 0) { | ||||
|             if (cond->blocked != 0) { | ||||
|                 ReleaseSemaphore(cond->sem_gate, 1, NULL); | ||||
|                 nleft = 0; | ||||
|             } | ||||
|             else if ((ngone = cond->gone) != 0) { | ||||
|                 cond->gone = 0; | ||||
|             } | ||||
|         } | ||||
|     } else if (++cond->gone == INT_MAX/2) { | ||||
|         WaitForSingleObject(cond->sem_gate, INFINITE); | ||||
|         cond->blocked -= cond->gone; | ||||
|         ReleaseSemaphore(cond->sem_gate, 1, NULL); | ||||
|         cond->gone = 0; | ||||
|     } | ||||
|     LeaveCriticalSection(&cond->monitor); | ||||
|  | ||||
|     if (nleft == 1) { | ||||
|         while (ngone--) | ||||
|             WaitForSingleObject(cond->sem_queue, INFINITE); | ||||
|         ReleaseSemaphore(cond->sem_gate, 1, NULL); | ||||
|     } | ||||
|  | ||||
|     mtx_lock(mtx); | ||||
|     return timeout ? thrd_busy : thrd_success; | ||||
| } | ||||
| #endif  // ifndef EMULATED_THREADS_USE_NATIVE_CV | ||||
|  | ||||
| static struct impl_tss_dtor_entry { | ||||
|     tss_t key; | ||||
|     tss_dtor_t dtor; | ||||
| } impl_tss_dtor_tbl[EMULATED_THREADS_TSS_DTOR_SLOTNUM]; | ||||
|  | ||||
| static int impl_tss_dtor_register(tss_t key, tss_dtor_t dtor) | ||||
| { | ||||
|     int i; | ||||
|     for (i = 0; i < EMULATED_THREADS_TSS_DTOR_SLOTNUM; i++) { | ||||
|         if (!impl_tss_dtor_tbl[i].dtor) | ||||
|             break; | ||||
|     } | ||||
|     if (i == EMULATED_THREADS_TSS_DTOR_SLOTNUM) | ||||
|         return 1; | ||||
|     impl_tss_dtor_tbl[i].key = key; | ||||
|     impl_tss_dtor_tbl[i].dtor = dtor; | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
| static void impl_tss_dtor_invoke() | ||||
| { | ||||
|     int i; | ||||
|     for (i = 0; i < EMULATED_THREADS_TSS_DTOR_SLOTNUM; i++) { | ||||
|         if (impl_tss_dtor_tbl[i].dtor) { | ||||
|             void* val = tss_get(impl_tss_dtor_tbl[i].key); | ||||
|             if (val) | ||||
|                 (impl_tss_dtor_tbl[i].dtor)(val); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
|  | ||||
| /*--------------- 7.25.2 Initialization functions ---------------*/ | ||||
| // 7.25.2.1 | ||||
| static inline void | ||||
| call_once(once_flag *flag, void (*func)(void)) | ||||
| { | ||||
|     assert(!flag && !func); | ||||
| #ifdef EMULATED_THREADS_USE_NATIVE_CALL_ONCE | ||||
|     { | ||||
|     struct impl_call_once_param param; | ||||
|     param.func = func; | ||||
|     InitOnceExecuteOnce(flag, impl_call_once_callback, (PVOID)¶m, NULL); | ||||
|     } | ||||
| #else | ||||
|     if (InterlockedCompareExchange(&flag->status, 1, 0) == 0) { | ||||
|         (func)(); | ||||
|         InterlockedExchange(&flag->status, 2); | ||||
|     } else { | ||||
|         while (flag->status == 1) { | ||||
|             // busy loop! | ||||
|             thrd_yield(); | ||||
|         } | ||||
|     } | ||||
| #endif | ||||
| } | ||||
|  | ||||
|  | ||||
| /*------------- 7.25.3 Condition variable functions -------------*/ | ||||
| // 7.25.3.1 | ||||
| static inline int | ||||
| cnd_broadcast(cnd_t *cond) | ||||
| { | ||||
|     if (!cond) return thrd_error; | ||||
| #ifdef EMULATED_THREADS_USE_NATIVE_CV | ||||
|     WakeAllConditionVariable(&cond->condvar); | ||||
| #else | ||||
|     impl_cond_do_signal(cond, 1); | ||||
| #endif | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
| // 7.25.3.2 | ||||
| static inline void | ||||
| cnd_destroy(cnd_t *cond) | ||||
| { | ||||
|     assert(cond); | ||||
| #ifdef EMULATED_THREADS_USE_NATIVE_CV | ||||
|     // do nothing | ||||
| #else | ||||
|     CloseHandle(cond->sem_queue); | ||||
|     CloseHandle(cond->sem_gate); | ||||
|     DeleteCriticalSection(&cond->monitor); | ||||
| #endif | ||||
| } | ||||
|  | ||||
| // 7.25.3.3 | ||||
| static inline int | ||||
| cnd_init(cnd_t *cond) | ||||
| { | ||||
|     if (!cond) return thrd_error; | ||||
| #ifdef EMULATED_THREADS_USE_NATIVE_CV | ||||
|     InitializeConditionVariable(&cond->condvar); | ||||
| #else | ||||
|     cond->blocked = 0; | ||||
|     cond->gone = 0; | ||||
|     cond->to_unblock = 0; | ||||
|     cond->sem_queue = CreateSemaphore(NULL, 0, LONG_MAX, NULL); | ||||
|     cond->sem_gate = CreateSemaphore(NULL, 1, 1, NULL); | ||||
|     InitializeCriticalSection(&cond->monitor); | ||||
| #endif | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
| // 7.25.3.4 | ||||
| static inline int | ||||
| cnd_signal(cnd_t *cond) | ||||
| { | ||||
|     if (!cond) return thrd_error; | ||||
| #ifdef EMULATED_THREADS_USE_NATIVE_CV | ||||
|     WakeConditionVariable(&cond->condvar); | ||||
| #else | ||||
|     impl_cond_do_signal(cond, 0); | ||||
| #endif | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
| // 7.25.3.5 | ||||
| static inline int | ||||
| cnd_timedwait(cnd_t *cond, mtx_t *mtx, const xtime *xt) | ||||
| { | ||||
|     if (!cond || !mtx || !xt) return thrd_error; | ||||
| #ifdef EMULATED_THREADS_USE_NATIVE_CV | ||||
|     if (SleepConditionVariableCS(&cond->condvar, mtx, impl_xtime2msec(xt))) | ||||
|         return thrd_success; | ||||
|     return (GetLastError() == ERROR_TIMEOUT) ? thrd_busy : thrd_error; | ||||
| #else | ||||
|     return impl_cond_do_wait(cond, mtx, xt); | ||||
| #endif | ||||
| } | ||||
|  | ||||
| // 7.25.3.6 | ||||
| static inline int | ||||
| cnd_wait(cnd_t *cond, mtx_t *mtx) | ||||
| { | ||||
|     if (!cond || !mtx) return thrd_error; | ||||
| #ifdef EMULATED_THREADS_USE_NATIVE_CV | ||||
|     SleepConditionVariableCS(&cond->condvar, mtx, INFINITE); | ||||
| #else | ||||
|     impl_cond_do_wait(cond, mtx, NULL); | ||||
| #endif | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
|  | ||||
| /*-------------------- 7.25.4 Mutex functions --------------------*/ | ||||
| // 7.25.4.1 | ||||
| static inline void | ||||
| mtx_destroy(mtx_t *mtx) | ||||
| { | ||||
|     assert(mtx); | ||||
|     DeleteCriticalSection(mtx); | ||||
| } | ||||
|  | ||||
| // 7.25.4.2 | ||||
| static inline int | ||||
| mtx_init(mtx_t *mtx, int type) | ||||
| { | ||||
|     if (!mtx) return thrd_error; | ||||
|     if (type != mtx_plain && type != mtx_timed && type != mtx_try | ||||
|       && type != (mtx_plain|mtx_recursive) | ||||
|       && type != (mtx_timed|mtx_recursive) | ||||
|       && type != (mtx_try|mtx_recursive)) | ||||
|         return thrd_error; | ||||
|     InitializeCriticalSection(mtx); | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
| // 7.25.4.3 | ||||
| static inline int | ||||
| mtx_lock(mtx_t *mtx) | ||||
| { | ||||
|     if (!mtx) return thrd_error; | ||||
|     EnterCriticalSection(mtx); | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
| // 7.25.4.4 | ||||
| static inline int | ||||
| mtx_timedlock(mtx_t *mtx, const xtime *xt) | ||||
| { | ||||
|     time_t expire, now; | ||||
|     if (!mtx || !xt) return thrd_error; | ||||
|     expire = time(NULL); | ||||
|     expire += xt->sec; | ||||
|     while (mtx_trylock(mtx) != thrd_success) { | ||||
|         now = time(NULL); | ||||
|         if (expire < now) | ||||
|             return thrd_busy; | ||||
|         // busy loop! | ||||
|         thrd_yield(); | ||||
|     } | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
| // 7.25.4.5 | ||||
| static inline int | ||||
| mtx_trylock(mtx_t *mtx) | ||||
| { | ||||
|     if (!mtx) return thrd_error; | ||||
|     return TryEnterCriticalSection(mtx) ? thrd_success : thrd_busy; | ||||
| } | ||||
|  | ||||
| // 7.25.4.6 | ||||
| static inline int | ||||
| mtx_unlock(mtx_t *mtx) | ||||
| { | ||||
|     if (!mtx) return thrd_error; | ||||
|     LeaveCriticalSection(mtx); | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
|  | ||||
| /*------------------- 7.25.5 Thread functions -------------------*/ | ||||
| // 7.25.5.1 | ||||
| static inline int | ||||
| thrd_create(thrd_t *thr, thrd_start_t func, void *arg) | ||||
| { | ||||
|     struct impl_thrd_param *pack; | ||||
|     uintptr_t handle; | ||||
|     if (!thr) return thrd_error; | ||||
|     pack = (struct impl_thrd_param *)malloc(sizeof(struct impl_thrd_param)); | ||||
|     if (!pack) return thrd_nomem; | ||||
|     pack->func = func; | ||||
|     pack->arg = arg; | ||||
|     handle = _beginthreadex(NULL, 0, impl_thrd_routine, pack, 0, NULL); | ||||
|     if (handle == 0) { | ||||
|         if (errno == EAGAIN || errno == EACCES) | ||||
|             return thrd_nomem; | ||||
|         return thrd_error; | ||||
|     } | ||||
|     *thr = (thrd_t)handle; | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
| #if 0 | ||||
| // 7.25.5.2 | ||||
| static inline thrd_t | ||||
| thrd_current(void) | ||||
| { | ||||
|     HANDLE hCurrentThread; | ||||
|     BOOL bRet; | ||||
|  | ||||
|     /* GetCurrentThread() returns a pseudo-handle, which is useless.  We need | ||||
|      * to call DuplicateHandle to get a real handle.  However the handle value | ||||
|      * will not match the one returned by thread_create. | ||||
|      * | ||||
|      * Other potential solutions would be: | ||||
|      * - define thrd_t as a thread Ids, but this would mean we'd need to OpenThread for many operations | ||||
|      * - use malloc'ed memory for thrd_t. This would imply using TLS for current thread. | ||||
|      * | ||||
|      * Neither is particularly nice. | ||||
|      * | ||||
|      * Life would be much easier if C11 threads had different abstractions for | ||||
|      * threads and thread IDs, just like C++11 threads does... | ||||
|      */ | ||||
|  | ||||
|     bRet = DuplicateHandle(GetCurrentProcess(), // source process (pseudo) handle | ||||
|                            GetCurrentThread(), // source (pseudo) handle | ||||
|                            GetCurrentProcess(), // target process | ||||
|                            &hCurrentThread, // target handle | ||||
|                            0, | ||||
|                            FALSE, | ||||
|                            DUPLICATE_SAME_ACCESS); | ||||
|     assert(bRet); | ||||
|     if (!bRet) { | ||||
| 	hCurrentThread = GetCurrentThread(); | ||||
|     } | ||||
|     return hCurrentThread; | ||||
| } | ||||
| #endif | ||||
|  | ||||
| // 7.25.5.3 | ||||
| static inline int | ||||
| thrd_detach(thrd_t thr) | ||||
| { | ||||
|     CloseHandle(thr); | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
| // 7.25.5.4 | ||||
| static inline int | ||||
| thrd_equal(thrd_t thr0, thrd_t thr1) | ||||
| { | ||||
|     return GetThreadId(thr0) == GetThreadId(thr1); | ||||
| } | ||||
|  | ||||
| // 7.25.5.5 | ||||
| static inline void | ||||
| thrd_exit(int res) | ||||
| { | ||||
|     impl_tss_dtor_invoke(); | ||||
|     _endthreadex((unsigned)res); | ||||
| } | ||||
|  | ||||
| // 7.25.5.6 | ||||
| static inline int | ||||
| thrd_join(thrd_t thr, int *res) | ||||
| { | ||||
|     DWORD w, code; | ||||
|     w = WaitForSingleObject(thr, INFINITE); | ||||
|     if (w != WAIT_OBJECT_0) | ||||
|         return thrd_error; | ||||
|     if (res) { | ||||
|         if (!GetExitCodeThread(thr, &code)) { | ||||
|             CloseHandle(thr); | ||||
|             return thrd_error; | ||||
|         } | ||||
|         *res = (int)code; | ||||
|     } | ||||
|     CloseHandle(thr); | ||||
|     return thrd_success; | ||||
| } | ||||
|  | ||||
| // 7.25.5.7 | ||||
| static inline void | ||||
| thrd_sleep(const xtime *xt) | ||||
| { | ||||
|     assert(xt); | ||||
|     Sleep(impl_xtime2msec(xt)); | ||||
| } | ||||
|  | ||||
| // 7.25.5.8 | ||||
| static inline void | ||||
| thrd_yield(void) | ||||
| { | ||||
|     SwitchToThread(); | ||||
| } | ||||
|  | ||||
|  | ||||
| /*----------- 7.25.6 Thread-specific storage functions -----------*/ | ||||
| // 7.25.6.1 | ||||
| static inline int | ||||
| tss_create(tss_t *key, tss_dtor_t dtor) | ||||
| { | ||||
|     if (!key) return thrd_error; | ||||
|     *key = TlsAlloc(); | ||||
|     if (dtor) { | ||||
|         if (impl_tss_dtor_register(*key, dtor)) { | ||||
|             TlsFree(*key); | ||||
|             return thrd_error; | ||||
|         } | ||||
|     } | ||||
|     return (*key != 0xFFFFFFFF) ? thrd_success : thrd_error; | ||||
| } | ||||
|  | ||||
| // 7.25.6.2 | ||||
| static inline void | ||||
| tss_delete(tss_t key) | ||||
| { | ||||
|     TlsFree(key); | ||||
| } | ||||
|  | ||||
| // 7.25.6.3 | ||||
| static inline void * | ||||
| tss_get(tss_t key) | ||||
| { | ||||
|     return TlsGetValue(key); | ||||
| } | ||||
|  | ||||
| // 7.25.6.4 | ||||
| static inline int | ||||
| tss_set(tss_t key, void *val) | ||||
| { | ||||
|     return TlsSetValue(key, val) ? thrd_success : thrd_error; | ||||
| } | ||||
|  | ||||
|  | ||||
| /*-------------------- 7.25.7 Time functions --------------------*/ | ||||
| // 7.25.6.1 | ||||
| static inline int | ||||
| xtime_get(xtime *xt, int base) | ||||
| { | ||||
|     if (!xt) return 0; | ||||
|     if (base == TIME_UTC) { | ||||
|         xt->sec = time(NULL); | ||||
|         xt->nsec = 0; | ||||
|         return base; | ||||
|     } | ||||
|     return 0; | ||||
| } | ||||
| @@ -91,23 +91,3 @@ CHIPSET(0x0F32, byt,     "Intel(R) Bay Trail") | ||||
| CHIPSET(0x0F33, byt,     "Intel(R) Bay Trail") | ||||
| CHIPSET(0x0157, byt,     "Intel(R) Bay Trail") | ||||
| CHIPSET(0x0155, byt,     "Intel(R) Bay Trail") | ||||
| #ifdef INTEL_PRELIMINARY_HW_SUPPORT | ||||
| CHIPSET(0x1602, bdw_gt1, "Intel(R) Broadwell") | ||||
| CHIPSET(0x1606, bdw_gt1, "Intel(R) Broadwell") | ||||
| CHIPSET(0x160A, bdw_gt1, "Intel(R) Broadwell") | ||||
| CHIPSET(0x160B, bdw_gt1, "Intel(R) Broadwell") | ||||
| CHIPSET(0x160D, bdw_gt1, "Intel(R) Broadwell") | ||||
| CHIPSET(0x160E, bdw_gt1, "Intel(R) Broadwell") | ||||
| CHIPSET(0x1612, bdw_gt2, "Intel(R) Broadwell") | ||||
| CHIPSET(0x1616, bdw_gt2, "Intel(R) Broadwell") | ||||
| CHIPSET(0x161A, bdw_gt2, "Intel(R) Broadwell") | ||||
| CHIPSET(0x161B, bdw_gt2, "Intel(R) Broadwell") | ||||
| CHIPSET(0x161D, bdw_gt2, "Intel(R) Broadwell") | ||||
| CHIPSET(0x161E, bdw_gt2, "Intel(R) Broadwell") | ||||
| CHIPSET(0x1622, bdw_gt3, "Intel(R) Broadwell") | ||||
| CHIPSET(0x1626, bdw_gt3, "Intel(R) Broadwell") | ||||
| CHIPSET(0x162A, bdw_gt3, "Intel(R) Broadwell") | ||||
| CHIPSET(0x162B, bdw_gt3, "Intel(R) Broadwell") | ||||
| CHIPSET(0x162D, bdw_gt3, "Intel(R) Broadwell") | ||||
| CHIPSET(0x162E, bdw_gt3, "Intel(R) Broadwell") | ||||
| #endif | ||||
|   | ||||
| @@ -7,10 +7,6 @@ | ||||
| #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) | ||||
| #endif | ||||
| 
 | ||||
| #ifndef __IS_LOADER | ||||
| #  error "Only include from loader.c" | ||||
| #endif | ||||
| 
 | ||||
| static const int i915_chip_ids[] = { | ||||
| #define CHIPSET(chip, desc, name) chip, | ||||
| #include "pci_ids/i915_pci_ids.h" | ||||
| @@ -23,6 +19,7 @@ static const int i965_chip_ids[] = { | ||||
| #undef CHIPSET | ||||
| }; | ||||
| 
 | ||||
| #ifndef DRIVER_MAP_GALLIUM_ONLY | ||||
| static const int r100_chip_ids[] = { | ||||
| #define CHIPSET(chip, name, family) chip, | ||||
| #include "pci_ids/radeon_pci_ids.h" | ||||
| @@ -34,6 +31,7 @@ static const int r200_chip_ids[] = { | ||||
| #include "pci_ids/r200_pci_ids.h" | ||||
| #undef CHIPSET | ||||
| }; | ||||
| #endif | ||||
| 
 | ||||
| static const int r300_chip_ids[] = { | ||||
| #define CHIPSET(chip, name, family) chip, | ||||
| @@ -59,26 +57,23 @@ static const int vmwgfx_chip_ids[] = { | ||||
| #undef CHIPSET | ||||
| }; | ||||
| 
 | ||||
| int is_nouveau_vieux(int fd); | ||||
| 
 | ||||
| static const struct { | ||||
|    int vendor_id; | ||||
|    const char *driver; | ||||
|    const int *chip_ids; | ||||
|    int num_chips_ids; | ||||
|    unsigned driver_types; | ||||
|    int (*predicate)(int fd); | ||||
| } driver_map[] = { | ||||
|    { 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids), _LOADER_DRI | _LOADER_GALLIUM }, | ||||
|    { 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids), _LOADER_DRI | _LOADER_GALLIUM }, | ||||
|    { 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids), _LOADER_DRI }, | ||||
|    { 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids), _LOADER_DRI }, | ||||
|    { 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids), _LOADER_GALLIUM }, | ||||
|    { 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids), _LOADER_GALLIUM }, | ||||
|    { 0x1002, "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids), _LOADER_GALLIUM}, | ||||
|    { 0x10de, "nouveau_vieux", NULL, -1,  _LOADER_DRI, is_nouveau_vieux }, | ||||
|    { 0x10de, "nouveau", NULL, -1,  _LOADER_GALLIUM }, | ||||
|    { 0x15ad, "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids), _LOADER_GALLIUM }, | ||||
|    { 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) }, | ||||
|    { 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) }, | ||||
| #ifndef DRIVER_MAP_GALLIUM_ONLY | ||||
|    { 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) }, | ||||
|    { 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) }, | ||||
| #endif | ||||
|    { 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) }, | ||||
|    { 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) }, | ||||
|    { 0x1002, "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids) }, | ||||
|    { 0x10de, "nouveau", NULL, -1 }, | ||||
|    { 0x15ad, "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids) }, | ||||
|    { 0x0000, NULL, NULL, 0 }, | ||||
| }; | ||||
| 
 | ||||
| @@ -208,7 +208,7 @@ CHIPSET(0x9644, SUMO2_9644, SUMO2) | ||||
| CHIPSET(0x9645, SUMO2_9645, SUMO2) | ||||
| CHIPSET(0x9647, SUMO_9647,  SUMO) | ||||
| CHIPSET(0x9648, SUMO_9648,  SUMO) | ||||
| CHIPSET(0x9649, SUMO2_9649, SUMO2) | ||||
| CHIPSET(0x9649, SUMO_9649,  SUMO) | ||||
| CHIPSET(0x964a, SUMO_964A,  SUMO) | ||||
| CHIPSET(0x964b, SUMO_964B,  SUMO) | ||||
| CHIPSET(0x964c, SUMO_964C,  SUMO) | ||||
|   | ||||
| @@ -118,16 +118,3 @@ CHIPSET(0x1317, KAVERI_1317, KAVERI) | ||||
| CHIPSET(0x131B, KAVERI_131B, KAVERI) | ||||
| CHIPSET(0x131C, KAVERI_131C, KAVERI) | ||||
| CHIPSET(0x131D, KAVERI_131D, KAVERI) | ||||
|  | ||||
| CHIPSET(0x67A0, HAWAII_67A0, HAWAII) | ||||
| CHIPSET(0x67A1, HAWAII_67A1, HAWAII) | ||||
| CHIPSET(0x67A2, HAWAII_67A2, HAWAII) | ||||
| CHIPSET(0x67A8, HAWAII_67A8, HAWAII) | ||||
| CHIPSET(0x67A9, HAWAII_67A9, HAWAII) | ||||
| CHIPSET(0x67AA, HAWAII_67AA, HAWAII) | ||||
| CHIPSET(0x67B0, HAWAII_67B0, HAWAII) | ||||
| CHIPSET(0x67B1, HAWAII_67B1, HAWAII) | ||||
| CHIPSET(0x67B8, HAWAII_67B8, HAWAII) | ||||
| CHIPSET(0x67B9, HAWAII_67B9, HAWAII) | ||||
| CHIPSET(0x67BA, HAWAII_67BA, HAWAII) | ||||
| CHIPSET(0x67BE, HAWAII_67BE, HAWAII) | ||||
|   | ||||
| @@ -1,14 +0,0 @@ | ||||
| # Provide compatibility with scripts for the old Mesa build system for | ||||
| # a while by putting a link to the driver into /lib of the build tree. | ||||
|  | ||||
| all-local : .libs/install-mesa-links | ||||
|  | ||||
| .libs/install-mesa-links : $(lib_LTLIBRARIES) | ||||
| 	$(MKDIR_P) $(top_builddir)/$(LIB_DIR) | ||||
| 	for f in $(lib_LTLIBRARIES:%.la=.libs/%.so*); do	\ | ||||
| 		if test -h .libs/$$f; then			\ | ||||
| 			cp -d $$f $(top_builddir)/$(LIB_DIR);	\ | ||||
| 		else						\ | ||||
| 			ln -f $$f $(top_builddir)/$(LIB_DIR);	\ | ||||
| 		fi;						\ | ||||
| 	done && touch $@ | ||||
| @@ -1,72 +0,0 @@ | ||||
| # =========================================================================== | ||||
| #   http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html | ||||
| # =========================================================================== | ||||
| # | ||||
| # SYNOPSIS | ||||
| # | ||||
| #   AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) | ||||
| # | ||||
| # DESCRIPTION | ||||
| # | ||||
| #   Check whether the given FLAG works with the current language's compiler | ||||
| #   or gives an error.  (Warnings, however, are ignored) | ||||
| # | ||||
| #   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on | ||||
| #   success/failure. | ||||
| # | ||||
| #   If EXTRA-FLAGS is defined, it is added to the current language's default | ||||
| #   flags (e.g. CFLAGS) when the check is done.  The check is thus made with | ||||
| #   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to | ||||
| #   force the compiler to issue an error when a bad flag is given. | ||||
| # | ||||
| #   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this | ||||
| #   macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. | ||||
| # | ||||
| # LICENSE | ||||
| # | ||||
| #   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> | ||||
| #   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> | ||||
| # | ||||
| #   This program is free software: you can redistribute it and/or modify it | ||||
| #   under the terms of the GNU General Public License as published by the | ||||
| #   Free Software Foundation, either version 3 of the License, or (at your | ||||
| #   option) any later version. | ||||
| # | ||||
| #   This program is distributed in the hope that it will be useful, but | ||||
| #   WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
| #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | ||||
| #   Public License for more details. | ||||
| # | ||||
| #   You should have received a copy of the GNU General Public License along | ||||
| #   with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
| # | ||||
| #   As a special exception, the respective Autoconf Macro's copyright owner | ||||
| #   gives unlimited permission to copy, distribute and modify the configure | ||||
| #   scripts that are the output of Autoconf when processing the Macro. You | ||||
| #   need not follow the terms of the GNU General Public License when using | ||||
| #   or distributing such scripts, even though portions of the text of the | ||||
| #   Macro appear in them. The GNU General Public License (GPL) does govern | ||||
| #   all other use of the material that constitutes the Autoconf Macro. | ||||
| # | ||||
| #   This special exception to the GPL applies to versions of the Autoconf | ||||
| #   Macro released by the Autoconf Archive. When you make and distribute a | ||||
| #   modified version of the Autoconf Macro, you may extend this special | ||||
| #   exception to the GPL to apply to your modified version as well. | ||||
|  | ||||
| #serial 2 | ||||
|  | ||||
| AC_DEFUN([AX_CHECK_COMPILE_FLAG], | ||||
| [AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX | ||||
| AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl | ||||
| AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ | ||||
|   ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS | ||||
|   _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" | ||||
|   AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], | ||||
|     [AS_VAR_SET(CACHEVAR,[yes])], | ||||
|     [AS_VAR_SET(CACHEVAR,[no])]) | ||||
|   _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) | ||||
| AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], | ||||
|   [m4_default([$2], :)], | ||||
|   [m4_default([$3], :)]) | ||||
| AS_VAR_POPDEF([CACHEVAR])dnl | ||||
| ])dnl AX_CHECK_COMPILE_FLAGS | ||||
| @@ -5,7 +5,7 @@ Custom builders and methods. | ||||
| """ | ||||
|  | ||||
| # | ||||
| # Copyright 2008 VMware, Inc. | ||||
| # Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
| # All Rights Reserved. | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a | ||||
| @@ -23,7 +23,7 @@ Custom builders and methods. | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||||
| # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||||
| # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. | ||||
| # IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR | ||||
| # IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR | ||||
| # ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||||
| # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||||
| # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||
|   | ||||
| @@ -5,7 +5,7 @@ Frontend-tool for Gallium3D architecture. | ||||
| """ | ||||
|  | ||||
| # | ||||
| # Copyright 2008 VMware, Inc. | ||||
| # Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
| # All Rights Reserved. | ||||
| # | ||||
| # Permission is hereby granted, free of charge, to any person obtaining a | ||||
| @@ -23,7 +23,7 @@ Frontend-tool for Gallium3D architecture. | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||||
| # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||||
| # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. | ||||
| # IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR | ||||
| # IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR | ||||
| # ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||||
| # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||||
| # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||
| @@ -269,11 +269,6 @@ def generate(env): | ||||
|             cppdefines += ['HAVE_ALIAS'] | ||||
|         else: | ||||
|             cppdefines += ['GLX_ALIAS_UNSUPPORTED'] | ||||
|     if env['platform'] == 'haiku': | ||||
|         cppdefines += [ | ||||
|             'HAVE_PTHREAD', | ||||
|             'HAVE_POSIX_MEMALIGN' | ||||
|         ] | ||||
|     if platform == 'windows': | ||||
|         cppdefines += [ | ||||
|             'WIN32', | ||||
|   | ||||
| @@ -202,8 +202,6 @@ def generate(env): | ||||
|  | ||||
|             env.ParseConfig('llvm-config --libs ' + ' '.join(components)) | ||||
|             env.ParseConfig('llvm-config --ldflags') | ||||
|             if llvm_version >= distutils.version.LooseVersion('3.5'): | ||||
|                 env.ParseConfig('llvm-config --system-libs') | ||||
|         except OSError: | ||||
|             print 'scons: llvm-config version %s failed' % llvm_version | ||||
|             return | ||||
|   | ||||
| @@ -19,7 +19,7 @@ | ||||
| # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||||
| # IN THE SOFTWARE. | ||||
|  | ||||
| SUBDIRS = gtest loader mapi | ||||
| SUBDIRS = gtest mapi | ||||
|  | ||||
| if NEED_OPENGL_COMMON | ||||
| SUBDIRS += glsl mesa | ||||
|   | ||||
| @@ -11,7 +11,6 @@ if env['hostonly']: | ||||
|     # compilation | ||||
|     Return() | ||||
|  | ||||
| SConscript('loader/SConscript') | ||||
|  | ||||
| # When env['gles'] is set, the targets defined in mapi/glapi/SConscript are not | ||||
| # used.  libgl-xlib and libgl-gdi adapt themselves to use the targets defined | ||||
| @@ -19,11 +18,6 @@ SConscript('loader/SConscript') | ||||
| # enable OpenGL ES support. | ||||
| SConscript('mapi/glapi/gen/SConscript') | ||||
| SConscript('mapi/glapi/SConscript') | ||||
|  | ||||
| # Haiku C++ libGL dispatch (renderers depend on libgl) | ||||
| if env['platform'] in ['haiku']: | ||||
|     SConscript('hgl/SConscript') | ||||
|  | ||||
| SConscript('mesa/SConscript') | ||||
|  | ||||
| SConscript('mapi/vgapi/SConscript') | ||||
|   | ||||
| @@ -39,8 +39,9 @@ LOCAL_CFLAGS := \ | ||||
| LOCAL_C_INCLUDES := \ | ||||
| 	$(MESA_TOP)/src/mapi \ | ||||
| 	$(MESA_TOP)/src/egl/main \ | ||||
| 	$(MESA_TOP)/src/loader \ | ||||
| 	$(DRM_GRALLOC_TOP) | ||||
| 	$(DRM_GRALLOC_TOP) \ | ||||
| 	$(DRM_TOP) \ | ||||
| 	$(DRM_TOP)/include/drm | ||||
|  | ||||
| LOCAL_MODULE := libmesa_egl_dri2 | ||||
|  | ||||
|   | ||||
| @@ -22,7 +22,6 @@ | ||||
| AM_CFLAGS = \ | ||||
| 	-I$(top_srcdir)/include \ | ||||
| 	-I$(top_srcdir)/src/egl/main \ | ||||
| 	-I$(top_srcdir)/src/loader \ | ||||
| 	-I$(top_srcdir)/src/gbm/main \ | ||||
| 	-I$(top_srcdir)/src/gbm/backends/dri \ | ||||
| 	-I$(top_srcdir)/src/egl/wayland/wayland-egl \ | ||||
| @@ -38,10 +37,10 @@ AM_CFLAGS = \ | ||||
| noinst_LTLIBRARIES = libegl_dri2.la | ||||
|  | ||||
| libegl_dri2_la_SOURCES = \ | ||||
| 	egl_dri2.c | ||||
| 	egl_dri2.c \ | ||||
| 	common.c | ||||
|  | ||||
| libegl_dri2_la_LIBADD = \ | ||||
| 	$(top_builddir)/src/loader/libloader.la \ | ||||
| 	$(EGL_LIB_DEPS) | ||||
|  | ||||
| if HAVE_SHARED_GLAPI | ||||
|   | ||||
							
								
								
									
										144
									
								
								src/egl/drivers/dri2/common.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										144
									
								
								src/egl/drivers/dri2/common.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,144 @@ | ||||
| /* | ||||
|  * Copyright © 2011 Intel Corporation | ||||
|  * | ||||
|  * Permission is hereby granted, free of charge, to any person obtaining a | ||||
|  * copy of this software and associated documentation files (the "Software"), | ||||
|  * to deal in the Software without restriction, including without limitation | ||||
|  * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||||
|  * and/or sell copies of the Software, and to permit persons to whom the | ||||
|  * Software is furnished to do so, subject to the following conditions: | ||||
|  * | ||||
|  * The above copyright notice and this permission notice (including the next | ||||
|  * paragraph) shall be included in all copies or substantial portions of the | ||||
|  * Software. | ||||
|  * | ||||
|  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||||
|  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||||
|  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||||
|  * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||||
|  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||||
|  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
|  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||||
|  * DEALINGS IN THE SOFTWARE. | ||||
|  * | ||||
|  * Authors: | ||||
|  *    Kristian Høgsberg <krh@bitplanet.net> | ||||
|  *    Benjamin Franzke <benjaminfranzke@googlemail.com> | ||||
|  */ | ||||
|  | ||||
| #include <stdio.h> | ||||
| #include <string.h> | ||||
|  | ||||
| #include <sys/types.h> | ||||
| #include <sys/stat.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include "egl_dri2.h" | ||||
|  | ||||
| #ifdef HAVE_LIBUDEV | ||||
|  | ||||
| #define DRIVER_MAP_DRI2_ONLY | ||||
| #include "pci_ids/pci_id_driver_map.h" | ||||
|  | ||||
| #include <libudev.h> | ||||
|  | ||||
| static struct udev_device * | ||||
| dri2_udev_device_new_from_fd(struct udev *udev, int fd) | ||||
| { | ||||
|    struct udev_device *device; | ||||
|    struct stat buf; | ||||
|  | ||||
|    if (fstat(fd, &buf) < 0) { | ||||
|       _eglLog(_EGL_WARNING, "EGL-DRI2: failed to stat fd %d", fd); | ||||
|       return NULL; | ||||
|    } | ||||
|  | ||||
|    device = udev_device_new_from_devnum(udev, 'c', buf.st_rdev); | ||||
|    if (device == NULL) { | ||||
|       _eglLog(_EGL_WARNING, | ||||
|               "EGL-DRI2: could not create udev device for fd %d", fd); | ||||
|       return NULL; | ||||
|    } | ||||
|  | ||||
|    return device; | ||||
| } | ||||
|  | ||||
| char * | ||||
| dri2_get_device_name_for_fd(int fd) | ||||
| { | ||||
|    struct udev *udev; | ||||
|    struct udev_device *device; | ||||
|    const char *const_device_name; | ||||
|    char *device_name = NULL; | ||||
|  | ||||
|    udev = udev_new(); | ||||
|    device = dri2_udev_device_new_from_fd(udev, fd); | ||||
|    if (device == NULL) | ||||
|       return NULL; | ||||
|  | ||||
|    const_device_name = udev_device_get_devnode(device); | ||||
|    if (!const_device_name) | ||||
|       goto out; | ||||
|    device_name = strdup(const_device_name); | ||||
|  | ||||
| out: | ||||
|    udev_device_unref(device); | ||||
|    udev_unref(udev); | ||||
|  | ||||
|    return device_name; | ||||
| } | ||||
|  | ||||
| char * | ||||
| dri2_get_driver_for_fd(int fd) | ||||
| { | ||||
|    struct udev *udev; | ||||
|    struct udev_device *device, *parent; | ||||
|    const char *pci_id; | ||||
|    char *driver = NULL; | ||||
|    int vendor_id, chip_id, i, j; | ||||
|  | ||||
|    udev = udev_new(); | ||||
|    device = dri2_udev_device_new_from_fd(udev, fd); | ||||
|    if (device == NULL) | ||||
|       return NULL; | ||||
|  | ||||
|    parent = udev_device_get_parent(device); | ||||
|    if (parent == NULL) { | ||||
|       _eglLog(_EGL_WARNING, "DRI2: could not get parent device"); | ||||
|       goto out; | ||||
|    } | ||||
|  | ||||
|    pci_id = udev_device_get_property_value(parent, "PCI_ID"); | ||||
|    if (pci_id == NULL || | ||||
|        sscanf(pci_id, "%x:%x", &vendor_id, &chip_id) != 2) { | ||||
|       _eglLog(_EGL_WARNING, "EGL-DRI2: malformed or no PCI ID"); | ||||
|       goto out; | ||||
|    } | ||||
|  | ||||
|    for (i = 0; driver_map[i].driver; i++) { | ||||
|       if (vendor_id != driver_map[i].vendor_id) | ||||
|          continue; | ||||
|       if (driver_map[i].num_chips_ids == -1) { | ||||
|          driver = strdup(driver_map[i].driver); | ||||
|          _eglLog(_EGL_DEBUG, "pci id for %d: %04x:%04x, driver %s", | ||||
|                  fd, vendor_id, chip_id, driver); | ||||
|          goto out; | ||||
|       } | ||||
|  | ||||
|       for (j = 0; j < driver_map[i].num_chips_ids; j++) | ||||
|          if (driver_map[i].chip_ids[j] == chip_id) { | ||||
|             driver = strdup(driver_map[i].driver); | ||||
|             _eglLog(_EGL_DEBUG, "pci id for %d: %04x:%04x, driver %s", | ||||
|                     fd, vendor_id, chip_id, driver); | ||||
|             goto out; | ||||
|          } | ||||
|    } | ||||
|  | ||||
| out: | ||||
|    udev_device_unref(device); | ||||
|    udev_unref(udev); | ||||
|  | ||||
|    return driver; | ||||
| } | ||||
|  | ||||
| #endif /* HAVE_LIBUDEV */ | ||||
| @@ -33,10 +33,8 @@ | ||||
| #include <fcntl.h> | ||||
| #include <errno.h> | ||||
| #include <unistd.h> | ||||
| #ifdef HAVE_DRM_PLATFORM | ||||
| #include <xf86drm.h> | ||||
| #include <drm_fourcc.h> | ||||
| #endif | ||||
| #include <GL/gl.h> | ||||
| #include <GL/internal/dri_interface.h> | ||||
| #include <sys/types.h> | ||||
| @@ -403,9 +401,6 @@ dri2_open_driver(_EGLDisplay *disp) | ||||
| 	 if (dri2_dpy->driver == NULL) | ||||
| 	    _eglLog(_EGL_DEBUG, "failed to open %s: %s\n", path, dlerror()); | ||||
|       } | ||||
|       /* not need continue to loop all paths once the driver is found */ | ||||
|       if (dri2_dpy->driver != NULL) | ||||
|          break; | ||||
|    } | ||||
|  | ||||
|    if (dri2_dpy->driver == NULL) { | ||||
| @@ -525,12 +520,10 @@ dri2_setup_screen(_EGLDisplay *disp) | ||||
|          disp->Extensions.KHR_gl_texture_2D_image = EGL_TRUE; | ||||
|          disp->Extensions.KHR_gl_texture_cubemap_image = EGL_TRUE; | ||||
|       } | ||||
| #ifdef HAVE_DRM_PLATFORM | ||||
|       if (dri2_dpy->image->base.version >= 8 && | ||||
|           dri2_dpy->image->createImageFromDmaBufs) { | ||||
|          disp->Extensions.EXT_image_dma_buf_import = EGL_TRUE; | ||||
|       } | ||||
| #endif | ||||
|    } | ||||
| } | ||||
|  | ||||
| @@ -626,6 +619,7 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp) | ||||
|       return dri2_initialize_x11(drv, disp); | ||||
| #endif | ||||
|  | ||||
| #ifdef HAVE_LIBUDEV | ||||
| #ifdef HAVE_DRM_PLATFORM | ||||
|    case _EGL_PLATFORM_DRM: | ||||
|       if (disp->Options.TestOnly) | ||||
| @@ -638,6 +632,7 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp) | ||||
|          return EGL_TRUE; | ||||
|       return dri2_initialize_wayland(drv, disp); | ||||
| #endif | ||||
| #endif | ||||
| #ifdef HAVE_ANDROID_PLATFORM | ||||
|    case _EGL_PLATFORM_ANDROID: | ||||
|       if (disp->Options.TestOnly) | ||||
| @@ -1163,7 +1158,6 @@ dri2_create_image_khr_renderbuffer(_EGLDisplay *disp, _EGLContext *ctx, | ||||
|    return dri2_create_image(disp, dri_image); | ||||
| } | ||||
|  | ||||
| #ifdef HAVE_DRM_PLATFORM | ||||
| static _EGLImage * | ||||
| dri2_create_image_mesa_drm_buffer(_EGLDisplay *disp, _EGLContext *ctx, | ||||
| 				  EGLClientBuffer buffer, const EGLint *attr_list) | ||||
| @@ -1208,7 +1202,6 @@ dri2_create_image_mesa_drm_buffer(_EGLDisplay *disp, _EGLContext *ctx, | ||||
|  | ||||
|    return dri2_create_image(disp, dri_image); | ||||
| } | ||||
| #endif | ||||
|  | ||||
| #ifdef HAVE_WAYLAND_PLATFORM | ||||
|  | ||||
| @@ -1382,7 +1375,6 @@ dri2_create_image_khr_texture(_EGLDisplay *disp, _EGLContext *ctx, | ||||
|    return &dri2_img->base; | ||||
| } | ||||
|  | ||||
| #ifdef HAVE_DRM_PLATFORM | ||||
| static EGLBoolean | ||||
| dri2_check_dma_buf_attribs(const _EGLImageAttribs *attrs) | ||||
| { | ||||
| @@ -1637,7 +1629,6 @@ dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx, | ||||
|  | ||||
|    return res; | ||||
| } | ||||
| #endif | ||||
|  | ||||
| _EGLImage * | ||||
| dri2_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp, | ||||
| @@ -1657,18 +1648,14 @@ dri2_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp, | ||||
|       return dri2_create_image_khr_texture(disp, ctx, target, buffer, attr_list); | ||||
|    case EGL_GL_RENDERBUFFER_KHR: | ||||
|       return dri2_create_image_khr_renderbuffer(disp, ctx, buffer, attr_list); | ||||
| #ifdef HAVE_DRM_PLATFORM | ||||
|    case EGL_DRM_BUFFER_MESA: | ||||
|       return dri2_create_image_mesa_drm_buffer(disp, ctx, buffer, attr_list); | ||||
| #endif | ||||
| #ifdef HAVE_WAYLAND_PLATFORM | ||||
|    case EGL_WAYLAND_BUFFER_WL: | ||||
|       return dri2_create_image_wayland_wl_buffer(disp, ctx, buffer, attr_list); | ||||
| #endif | ||||
| #ifdef HAVE_DRM_PLATFORM | ||||
|    case EGL_LINUX_DMA_BUF_EXT: | ||||
|       return dri2_create_image_dma_buf(disp, ctx, buffer, attr_list); | ||||
| #endif | ||||
|    default: | ||||
|       _eglError(EGL_BAD_PARAMETER, "dri2_create_image_khr"); | ||||
|       return EGL_NO_IMAGE_KHR; | ||||
| @@ -1689,7 +1676,6 @@ dri2_destroy_image_khr(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *image) | ||||
|    return EGL_TRUE; | ||||
| } | ||||
|  | ||||
| #ifdef HAVE_DRM_PLATFORM | ||||
| static _EGLImage * | ||||
| dri2_create_drm_image_mesa(_EGLDriver *drv, _EGLDisplay *disp, | ||||
| 			   const EGLint *attr_list) | ||||
| @@ -1800,7 +1786,6 @@ dri2_export_drm_image_mesa(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img, | ||||
|  | ||||
|    return EGL_TRUE; | ||||
| } | ||||
| #endif | ||||
|  | ||||
| #ifdef HAVE_WAYLAND_PLATFORM | ||||
|  | ||||
| @@ -2035,10 +2020,8 @@ _eglBuiltInDriverDRI2(const char *args) | ||||
|    dri2_drv->base.API.ReleaseTexImage = dri2_release_tex_image; | ||||
|    dri2_drv->base.API.CreateImageKHR = dri2_create_image_khr; | ||||
|    dri2_drv->base.API.DestroyImageKHR = dri2_destroy_image_khr; | ||||
| #ifdef HAVE_DRM_PLATFORM | ||||
|    dri2_drv->base.API.CreateDRMImageMESA = dri2_create_drm_image_mesa; | ||||
|    dri2_drv->base.API.ExportDRMImageMESA = dri2_export_drm_image_mesa; | ||||
| #endif | ||||
| #ifdef HAVE_WAYLAND_PLATFORM | ||||
|    dri2_drv->base.API.BindWaylandDisplayWL = dri2_bind_wayland_display_wl; | ||||
|    dri2_drv->base.API.UnbindWaylandDisplayWL = dri2_unbind_wayland_display_wl; | ||||
|   | ||||
| @@ -117,7 +117,7 @@ struct dri2_egl_display | ||||
|  | ||||
|    __DRIdri2LoaderExtension    dri2_loader_extension; | ||||
|    __DRIswrastLoaderExtension  swrast_loader_extension; | ||||
|    const __DRIextension     *extensions[5]; | ||||
|    const __DRIextension     *extensions[4]; | ||||
|    const __DRIextension    **driver_extensions; | ||||
|  | ||||
| #ifdef HAVE_X11_PLATFORM | ||||
| @@ -160,6 +160,7 @@ struct dri2_egl_surface | ||||
|    __DRIbuffer          buffers[5]; | ||||
|    int                  buffer_count; | ||||
|    int                  have_fake_front; | ||||
|    int                  swap_interval; | ||||
|  | ||||
| #ifdef HAVE_X11_PLATFORM | ||||
|    xcb_drawable_t       drawable; | ||||
| @@ -174,7 +175,7 @@ struct dri2_egl_surface | ||||
|    struct wl_egl_window  *wl_win; | ||||
|    int                    dx; | ||||
|    int                    dy; | ||||
|    struct wl_callback    *throttle_callback; | ||||
|    struct wl_callback    *frame_callback; | ||||
|    int			  format; | ||||
| #endif | ||||
|  | ||||
| @@ -188,13 +189,14 @@ struct dri2_egl_surface | ||||
| #ifdef HAVE_WAYLAND_PLATFORM | ||||
|       struct wl_buffer   *wl_buffer; | ||||
|       __DRIimage         *dri_image; | ||||
|       int                 pitch, name; | ||||
| #endif | ||||
| #ifdef HAVE_DRM_PLATFORM | ||||
|       struct gbm_bo       *bo; | ||||
| #endif | ||||
|       int                 locked; | ||||
|       int                 age; | ||||
|    } color_buffers[4], *back, *current; | ||||
|    } color_buffers[3], *back, *current; | ||||
| #endif | ||||
|  | ||||
| #ifdef HAVE_ANDROID_PLATFORM | ||||
| @@ -220,12 +222,6 @@ struct dri2_egl_image | ||||
|    __DRIimage *dri_image; | ||||
| }; | ||||
|  | ||||
| /* From xmlpool/options.h, user exposed so should be stable */ | ||||
| #define DRI_CONF_VBLANK_NEVER 0 | ||||
| #define DRI_CONF_VBLANK_DEF_INTERVAL_0 1 | ||||
| #define DRI_CONF_VBLANK_DEF_INTERVAL_1 2 | ||||
| #define DRI_CONF_VBLANK_ALWAYS_SYNC 3 | ||||
|  | ||||
| /* standard typecasts */ | ||||
| _EGL_DRIVER_STANDARD_TYPECASTS(dri2_egl) | ||||
| _EGL_DRIVER_TYPECAST(dri2_egl_image, _EGLImage, obj) | ||||
| @@ -271,4 +267,9 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp); | ||||
| EGLBoolean | ||||
| dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *disp); | ||||
|  | ||||
| char * | ||||
| dri2_get_driver_for_fd(int fd); | ||||
| char * | ||||
| dri2_get_device_name_for_fd(int fd); | ||||
|  | ||||
| #endif /* EGL_DRI2_INCLUDED */ | ||||
|   | ||||
| @@ -34,7 +34,11 @@ | ||||
| #include <sync/sync.h> | ||||
| #endif | ||||
|  | ||||
| #include "loader.h" | ||||
| /* for droid_get_pci_id */ | ||||
| #include <xf86drm.h> | ||||
| #include <i915_drm.h> | ||||
| #include <radeon_drm.h> | ||||
|  | ||||
| #include "egl_dri2.h" | ||||
| #include "gralloc_drm.h" | ||||
|  | ||||
| @@ -598,6 +602,103 @@ droid_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy) | ||||
|    return (count != 0); | ||||
| } | ||||
|  | ||||
| static EGLBoolean | ||||
| droid_get_pci_id(int fd, int *vendor_id, int *chip_id) | ||||
| { | ||||
|    drmVersionPtr version; | ||||
|  | ||||
|    *chip_id = -1; | ||||
|  | ||||
|    version = drmGetVersion(fd); | ||||
|    if (!version) { | ||||
|       _eglLog(_EGL_WARNING, "invalid drm fd"); | ||||
|       return EGL_FALSE; | ||||
|    } | ||||
|    if (!version->name) { | ||||
|       _eglLog(_EGL_WARNING, "unable to determine the driver name"); | ||||
|       drmFreeVersion(version); | ||||
|       return EGL_FALSE; | ||||
|    } | ||||
|  | ||||
|    if (strcmp(version->name, "i915") == 0) { | ||||
|       struct drm_i915_getparam gp; | ||||
|       int ret; | ||||
|  | ||||
|       *vendor_id = 0x8086; | ||||
|  | ||||
|       memset(&gp, 0, sizeof(gp)); | ||||
|       gp.param = I915_PARAM_CHIPSET_ID; | ||||
|       gp.value = chip_id; | ||||
|       ret = drmCommandWriteRead(fd, DRM_I915_GETPARAM, &gp, sizeof(gp)); | ||||
|       if (ret) { | ||||
|          _eglLog(_EGL_WARNING, "failed to get param for i915"); | ||||
| 	 *chip_id = -1; | ||||
|       } | ||||
|    } | ||||
|    else if (strcmp(version->name, "radeon") == 0) { | ||||
|       struct drm_radeon_info info; | ||||
|       int ret; | ||||
|  | ||||
|       *vendor_id = 0x1002; | ||||
|  | ||||
|       memset(&info, 0, sizeof(info)); | ||||
|       info.request = RADEON_INFO_DEVICE_ID; | ||||
|       info.value = (unsigned long) chip_id; | ||||
|       ret = drmCommandWriteRead(fd, DRM_RADEON_INFO, &info, sizeof(info)); | ||||
|       if (ret) { | ||||
|          _eglLog(_EGL_WARNING, "failed to get info for radeon"); | ||||
| 	 *chip_id = -1; | ||||
|       } | ||||
|    } | ||||
|    else if (strcmp(version->name, "nouveau") == 0) { | ||||
|       *vendor_id = 0x10de; | ||||
|       /* not used */ | ||||
|       *chip_id = 0; | ||||
|    } | ||||
|    else if (strcmp(version->name, "vmwgfx") == 0) { | ||||
|       *vendor_id = 0x15ad; | ||||
|       /* assume SVGA II */ | ||||
|       *chip_id = 0x0405; | ||||
|    } | ||||
|  | ||||
|    drmFreeVersion(version); | ||||
|  | ||||
|    return (*chip_id >= 0); | ||||
| } | ||||
|  | ||||
| #define DRIVER_MAP_DRI2_ONLY | ||||
| #include "pci_ids/pci_id_driver_map.h" | ||||
| static const char * | ||||
| droid_get_driver_name(int fd) | ||||
| { | ||||
|    int vendor_id = -1, chip_id = -1; | ||||
|    int idx, i; | ||||
|    char *name; | ||||
|  | ||||
|    if (!droid_get_pci_id(fd, &vendor_id, &chip_id)) | ||||
|       return NULL; | ||||
|  | ||||
|    for (idx = 0; driver_map[idx].driver; idx++) { | ||||
|       if (vendor_id != driver_map[idx].vendor_id) | ||||
|          continue; | ||||
|  | ||||
|       if (driver_map[idx].num_chips_ids == -1) | ||||
|          break; | ||||
|  | ||||
|       for (i = 0; i < driver_map[idx].num_chips_ids; i++) { | ||||
|          if (driver_map[idx].chip_ids[i] == chip_id) | ||||
|             break; | ||||
|       } | ||||
|       if (i < driver_map[idx].num_chips_ids) | ||||
| 	      break; | ||||
|    } | ||||
|  | ||||
|    _eglLog(_EGL_INFO, "pci id for fd %d: %04x:%04x, driver %s", | ||||
|          fd, vendor_id, chip_id, driver_map[idx].driver); | ||||
|  | ||||
|    return driver_map[idx].driver; | ||||
| } | ||||
|  | ||||
| static int | ||||
| droid_open_device(void) | ||||
| { | ||||
| @@ -660,8 +761,6 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy) | ||||
|  | ||||
|    _eglSetLogProc(droid_log); | ||||
|  | ||||
|    loader_set_logger(_eglLog); | ||||
|  | ||||
|    dri2_dpy = calloc(1, sizeof(*dri2_dpy)); | ||||
|    if (!dri2_dpy) | ||||
|       return _eglError(EGL_BAD_ALLOC, "eglInitialize"); | ||||
| @@ -674,7 +773,7 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy) | ||||
|       goto cleanup_display; | ||||
|    } | ||||
|  | ||||
|    dri2_dpy->driver_name = loader_get_driver_for_fd(dri2_dpy->fd, 0); | ||||
|    dri2_dpy->driver_name = (char *) droid_get_driver_name(dri2_dpy->fd); | ||||
|    if (dri2_dpy->driver_name == NULL) { | ||||
|       err = "DRI2: failed to get driver name"; | ||||
|       goto cleanup_device; | ||||
|   | ||||
| @@ -36,7 +36,6 @@ | ||||
| #include <unistd.h> | ||||
|  | ||||
| #include "egl_dri2.h" | ||||
| #include "loader.h" | ||||
|  | ||||
| static struct gbm_bo * | ||||
| lock_front_buffer(struct gbm_surface *_surf) | ||||
| @@ -176,12 +175,13 @@ dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf) | ||||
| } | ||||
|  | ||||
| static int | ||||
| get_back_bo(struct dri2_egl_surface *dri2_surf) | ||||
| get_back_bo(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer) | ||||
| { | ||||
|    struct dri2_egl_display *dri2_dpy = | ||||
|       dri2_egl_display(dri2_surf->base.Resource.Display); | ||||
|    struct gbm_dri_bo *bo; | ||||
|    struct gbm_dri_surface *surf = dri2_surf->gbm_surf; | ||||
|    int i; | ||||
|    int i, name, pitch; | ||||
|  | ||||
|    if (dri2_surf->back == NULL) { | ||||
|       for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) { | ||||
| @@ -201,17 +201,6 @@ get_back_bo(struct dri2_egl_surface *dri2_surf) | ||||
|    if (dri2_surf->back->bo == NULL) | ||||
|       return -1; | ||||
|  | ||||
|    return 0; | ||||
| } | ||||
|  | ||||
| static void | ||||
| back_bo_to_dri_buffer(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer) | ||||
| { | ||||
|    struct dri2_egl_display *dri2_dpy = | ||||
|       dri2_egl_display(dri2_surf->base.Resource.Display); | ||||
|    struct gbm_dri_bo *bo; | ||||
|    int name, pitch; | ||||
|  | ||||
|    bo = (struct gbm_dri_bo *) dri2_surf->back->bo; | ||||
|  | ||||
|    dri2_dpy->image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_NAME, &name); | ||||
| @@ -222,6 +211,8 @@ back_bo_to_dri_buffer(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer) | ||||
|    buffer->pitch = pitch; | ||||
|    buffer->cpp = 4; | ||||
|    buffer->flags = 0; | ||||
|  | ||||
|    return 0; | ||||
| } | ||||
|  | ||||
| static int | ||||
| @@ -263,11 +254,10 @@ dri2_get_buffers_with_format(__DRIdrawable *driDrawable, | ||||
|  | ||||
|       switch (attachments[i]) { | ||||
|       case __DRI_BUFFER_BACK_LEFT: | ||||
| 	 if (get_back_bo(dri2_surf) < 0) { | ||||
| 	 if (get_back_bo(dri2_surf, &dri2_surf->buffers[j]) < 0) { | ||||
| 	    _eglError(EGL_BAD_ALLOC, "failed to allocate color buffer"); | ||||
| 	    return NULL; | ||||
| 	 } | ||||
|          back_bo_to_dri_buffer(dri2_surf, &dri2_surf->buffers[j]); | ||||
| 	 break; | ||||
|       default: | ||||
| 	 if (get_aux_bo(dri2_surf, attachments[i], attachments[i + 1], | ||||
| @@ -322,27 +312,6 @@ dri2_get_buffers(__DRIdrawable * driDrawable, | ||||
|    return buffer; | ||||
| } | ||||
|  | ||||
| static int | ||||
| dri_image_get_buffers(__DRIdrawable *driDrawable, | ||||
|                       unsigned int format, | ||||
|                       uint32_t *stamp, | ||||
|                       void *loaderPrivate, | ||||
|                       uint32_t buffer_mask, | ||||
|                       struct __DRIimageList *buffers) | ||||
| { | ||||
|    struct dri2_egl_surface *dri2_surf = loaderPrivate; | ||||
|    struct gbm_dri_bo *bo; | ||||
|  | ||||
|    if (get_back_bo(dri2_surf) < 0) | ||||
|       return 0; | ||||
|  | ||||
|    bo = (struct gbm_dri_bo *) dri2_surf->back->bo; | ||||
|    buffers->image_mask = __DRI_IMAGE_BUFFER_BACK; | ||||
|    buffers->back = bo->image; | ||||
|  | ||||
|    return 1; | ||||
| } | ||||
|  | ||||
| static void | ||||
| dri2_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate) | ||||
| { | ||||
| @@ -379,8 +348,9 @@ dri2_query_buffer_age(_EGLDriver *drv, | ||||
|                       _EGLDisplay *disp, _EGLSurface *surface) | ||||
| { | ||||
|    struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surface); | ||||
|    __DRIbuffer buffer; | ||||
|  | ||||
|    if (get_back_bo(dri2_surf) < 0) { | ||||
|    if (get_back_bo(dri2_surf, &buffer) < 0) { | ||||
|       _eglError(EGL_BAD_ALLOC, "dri2_query_buffer_age"); | ||||
|       return 0; | ||||
|    } | ||||
| @@ -448,8 +418,6 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp) | ||||
|    int fd = -1; | ||||
|    int i; | ||||
|  | ||||
|    loader_set_logger(_eglLog); | ||||
|  | ||||
|    dri2_dpy = calloc(1, sizeof *dri2_dpy); | ||||
|    if (!dri2_dpy) | ||||
|       return _eglError(EGL_BAD_ALLOC, "eglInitialize"); | ||||
| @@ -458,12 +426,7 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp) | ||||
|  | ||||
|    gbm = disp->PlatformDisplay; | ||||
|    if (gbm == NULL) { | ||||
|       char buf[64]; | ||||
|       int n = snprintf(buf, sizeof(buf), DRM_DEV_NAME, DRM_DIR_NAME, 0); | ||||
|       if (n != -1 && n < sizeof(buf)) | ||||
|          fd = open(buf, O_RDWR); | ||||
|       if (fd < 0) | ||||
|          fd = open("/dev/dri/card0", O_RDWR); | ||||
|       fd = open("/dev/dri/card0", O_RDWR); | ||||
|       dri2_dpy->own_device = 1; | ||||
|       gbm = gbm_create_device(fd); | ||||
|       if (gbm == NULL) | ||||
| @@ -490,7 +453,7 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp) | ||||
|    } | ||||
|  | ||||
|    dri2_dpy->fd = fd; | ||||
|    dri2_dpy->device_name = loader_get_device_name_for_fd(dri2_dpy->fd); | ||||
|    dri2_dpy->device_name = dri2_get_device_name_for_fd(dri2_dpy->fd); | ||||
|    dri2_dpy->driver_name = dri2_dpy->gbm_dri->base.driver_name; | ||||
|  | ||||
|    dri2_dpy->dri_screen = dri2_dpy->gbm_dri->screen; | ||||
| @@ -506,7 +469,6 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp) | ||||
|    dri2_dpy->gbm_dri->get_buffers = dri2_get_buffers; | ||||
|    dri2_dpy->gbm_dri->flush_front_buffer = dri2_flush_front_buffer; | ||||
|    dri2_dpy->gbm_dri->get_buffers_with_format = dri2_get_buffers_with_format; | ||||
|    dri2_dpy->gbm_dri->image_get_buffers = dri_image_get_buffers; | ||||
|  | ||||
|    dri2_dpy->gbm_dri->base.base.surface_lock_front_buffer = lock_front_buffer; | ||||
|    dri2_dpy->gbm_dri->base.base.surface_release_buffer = release_buffer; | ||||
|   | ||||
| @@ -36,7 +36,6 @@ | ||||
| #include <xf86drm.h> | ||||
|  | ||||
| #include "egl_dri2.h" | ||||
| #include "loader.h" | ||||
|  | ||||
| #include <wayland-client.h> | ||||
| #include "wayland-drm-client-protocol.h" | ||||
| @@ -184,16 +183,8 @@ dri2_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp, | ||||
| 			   _EGLConfig *conf, EGLNativeWindowType window, | ||||
| 			   const EGLint *attrib_list) | ||||
| { | ||||
|    struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); | ||||
|    _EGLSurface *surf; | ||||
|  | ||||
|    surf = dri2_create_surface(drv, disp, EGL_WINDOW_BIT, conf, | ||||
|    return dri2_create_surface(drv, disp, EGL_WINDOW_BIT, conf, | ||||
| 			      window, attrib_list); | ||||
|  | ||||
|    if (surf != NULL) | ||||
|       drv->API.SwapInterval(drv, disp, surf, dri2_dpy->default_swap_interval); | ||||
|  | ||||
|    return surf; | ||||
| } | ||||
|  | ||||
| /** | ||||
| @@ -226,8 +217,8 @@ dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf) | ||||
|          dri2_dpy->dri2->releaseBuffer(dri2_dpy->dri_screen, | ||||
|                                        dri2_surf->dri_buffers[i]); | ||||
|  | ||||
|    if (dri2_surf->throttle_callback) | ||||
|       wl_callback_destroy(dri2_surf->throttle_callback); | ||||
|    if (dri2_surf->frame_callback) | ||||
|       wl_callback_destroy(dri2_surf->frame_callback); | ||||
|  | ||||
|    if (dri2_surf->base.Type == EGL_WINDOW_BIT) { | ||||
|       dri2_surf->wl_win->private = NULL; | ||||
| @@ -266,31 +257,26 @@ dri2_release_buffers(struct dri2_egl_surface *dri2_surf) | ||||
| } | ||||
|  | ||||
| static int | ||||
| get_back_bo(struct dri2_egl_surface *dri2_surf) | ||||
| get_back_bo(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer) | ||||
| { | ||||
|    struct dri2_egl_display *dri2_dpy = | ||||
|       dri2_egl_display(dri2_surf->base.Resource.Display); | ||||
|    int i; | ||||
|    __DRIimage *image; | ||||
|    int i, name, pitch; | ||||
|  | ||||
|    /* We always want to throttle to some event (either a frame callback or | ||||
|     * a sync request) after the commit so that we can be sure the | ||||
|     * compositor has had a chance to handle it and send us a release event | ||||
|     * before we look for a free buffer */ | ||||
|    while (dri2_surf->throttle_callback != NULL) | ||||
|       if (wl_display_dispatch_queue(dri2_dpy->wl_dpy, | ||||
|                                     dri2_dpy->wl_queue) == -1) | ||||
|          return -1; | ||||
|    /* There might be a buffer release already queued that wasn't processed */ | ||||
|    wl_display_dispatch_queue_pending(dri2_dpy->wl_dpy, dri2_dpy->wl_queue); | ||||
|  | ||||
|    if (dri2_surf->back == NULL) { | ||||
|       for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) { | ||||
|          /* Get an unlocked buffer, preferrably one with a dri_buffer | ||||
|           * already allocated. */ | ||||
|          if (dri2_surf->color_buffers[i].locked) | ||||
|          /* Get an unlocked buffer, preferrably one with a dri_buffer already | ||||
|           * allocated. */ | ||||
| 	 if (dri2_surf->color_buffers[i].locked) | ||||
|             continue; | ||||
|          if (dri2_surf->back == NULL) | ||||
|             dri2_surf->back = &dri2_surf->color_buffers[i]; | ||||
| 	    dri2_surf->back = &dri2_surf->color_buffers[i]; | ||||
|          else if (dri2_surf->back->dri_image == NULL) | ||||
|             dri2_surf->back = &dri2_surf->color_buffers[i]; | ||||
| 	    dri2_surf->back = &dri2_surf->color_buffers[i]; | ||||
|       } | ||||
|    } | ||||
|  | ||||
| @@ -309,30 +295,23 @@ get_back_bo(struct dri2_egl_surface *dri2_surf) | ||||
|    if (dri2_surf->back->dri_image == NULL) | ||||
|       return -1; | ||||
|  | ||||
|    dri2_surf->back->locked = 1; | ||||
|  | ||||
|    return 0; | ||||
| } | ||||
|  | ||||
|  | ||||
| static void | ||||
| back_bo_to_dri_buffer(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer) | ||||
| { | ||||
|    struct dri2_egl_display *dri2_dpy = | ||||
|       dri2_egl_display(dri2_surf->base.Resource.Display); | ||||
|    __DRIimage *image; | ||||
|    int name, pitch; | ||||
|  | ||||
|    image = dri2_surf->back->dri_image; | ||||
|  | ||||
|    dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_NAME, &name); | ||||
|    dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_STRIDE, &pitch); | ||||
|  | ||||
|    dri2_surf->back->name = name; | ||||
|    dri2_surf->back->pitch = pitch; | ||||
|  | ||||
|    buffer->attachment = __DRI_BUFFER_BACK_LEFT; | ||||
|    buffer->name = name; | ||||
|    buffer->pitch = pitch; | ||||
|    buffer->cpp = 4; | ||||
|    buffer->flags = 0; | ||||
|  | ||||
|    dri2_surf->back->locked = 1; | ||||
|  | ||||
|    return 0; | ||||
| } | ||||
|  | ||||
| static int | ||||
| @@ -358,12 +337,16 @@ get_aux_bo(struct dri2_egl_surface *dri2_surf, | ||||
|    return 0; | ||||
| } | ||||
|  | ||||
| static int | ||||
| update_buffers(struct dri2_egl_surface *dri2_surf) | ||||
| static __DRIbuffer * | ||||
| dri2_get_buffers_with_format(__DRIdrawable * driDrawable, | ||||
| 			     int *width, int *height, | ||||
| 			     unsigned int *attachments, int count, | ||||
| 			     int *out_count, void *loaderPrivate) | ||||
| { | ||||
|    struct dri2_egl_surface *dri2_surf = loaderPrivate; | ||||
|    struct dri2_egl_display *dri2_dpy = | ||||
|       dri2_egl_display(dri2_surf->base.Resource.Display); | ||||
|    int i; | ||||
|    int i, j; | ||||
|  | ||||
|    if (dri2_surf->base.Type == EGL_WINDOW_BIT && | ||||
|        (dri2_surf->base.Width != dri2_surf->wl_win->width ||  | ||||
| @@ -377,9 +360,22 @@ update_buffers(struct dri2_egl_surface *dri2_surf) | ||||
|       dri2_surf->dy = dri2_surf->wl_win->dy; | ||||
|    } | ||||
|  | ||||
|    if (get_back_bo(dri2_surf) < 0) { | ||||
|       _eglError(EGL_BAD_ALLOC, "failed to allocate color buffer"); | ||||
|       return -1; | ||||
|    for (i = 0, j = 0; i < 2 * count; i += 2, j++) { | ||||
|       switch (attachments[i]) { | ||||
|       case __DRI_BUFFER_BACK_LEFT: | ||||
| 	 if (get_back_bo(dri2_surf, &dri2_surf->buffers[j]) < 0) { | ||||
| 	    _eglError(EGL_BAD_ALLOC, "failed to allocate color buffer"); | ||||
| 	    return NULL; | ||||
| 	 } | ||||
| 	 break; | ||||
|       default: | ||||
| 	 if (get_aux_bo(dri2_surf, attachments[i], attachments[i + 1], | ||||
| 			&dri2_surf->buffers[j]) < 0) { | ||||
| 	    _eglError(EGL_BAD_ALLOC, "failed to allocate aux buffer"); | ||||
| 	    return NULL; | ||||
| 	 } | ||||
| 	 break; | ||||
|       } | ||||
|    } | ||||
|  | ||||
|    /* If we have an extra unlocked buffer at this point, we had to do triple | ||||
| @@ -395,36 +391,6 @@ update_buffers(struct dri2_egl_surface *dri2_surf) | ||||
|       } | ||||
|    } | ||||
|  | ||||
|    return 0; | ||||
| } | ||||
|  | ||||
| static __DRIbuffer * | ||||
| dri2_get_buffers_with_format(__DRIdrawable * driDrawable, | ||||
| 			     int *width, int *height, | ||||
| 			     unsigned int *attachments, int count, | ||||
| 			     int *out_count, void *loaderPrivate) | ||||
| { | ||||
|    struct dri2_egl_surface *dri2_surf = loaderPrivate; | ||||
|    int i, j; | ||||
|  | ||||
|    if (update_buffers(dri2_surf) < 0) | ||||
|       return NULL; | ||||
|  | ||||
|    for (i = 0, j = 0; i < 2 * count; i += 2, j++) { | ||||
|       switch (attachments[i]) { | ||||
|       case __DRI_BUFFER_BACK_LEFT: | ||||
|          back_bo_to_dri_buffer(dri2_surf, &dri2_surf->buffers[j]); | ||||
| 	 break; | ||||
|       default: | ||||
| 	 if (get_aux_bo(dri2_surf, attachments[i], attachments[i + 1], | ||||
| 			&dri2_surf->buffers[j]) < 0) { | ||||
| 	    _eglError(EGL_BAD_ALLOC, "failed to allocate aux buffer"); | ||||
| 	    return NULL; | ||||
| 	 } | ||||
| 	 break; | ||||
|       } | ||||
|    } | ||||
|  | ||||
|    *out_count = j; | ||||
|    if (j == 0) | ||||
| 	   return NULL; | ||||
| @@ -468,25 +434,6 @@ dri2_get_buffers(__DRIdrawable * driDrawable, | ||||
|    return buffer; | ||||
| } | ||||
|  | ||||
| static int | ||||
| image_get_buffers(__DRIdrawable *driDrawable, | ||||
|                   unsigned int format, | ||||
|                   uint32_t *stamp, | ||||
|                   void *loaderPrivate, | ||||
|                   uint32_t buffer_mask, | ||||
|                   struct __DRIimageList *buffers) | ||||
| { | ||||
|    struct dri2_egl_surface *dri2_surf = loaderPrivate; | ||||
|  | ||||
|    if (update_buffers(dri2_surf) < 0) | ||||
|       return 0; | ||||
|  | ||||
|    buffers->image_mask = __DRI_IMAGE_BUFFER_BACK; | ||||
|    buffers->back = dri2_surf->back->dri_image; | ||||
|  | ||||
|    return 1; | ||||
| } | ||||
|  | ||||
| static void | ||||
| dri2_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate) | ||||
| { | ||||
| @@ -494,25 +441,17 @@ dri2_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate) | ||||
|    (void) loaderPrivate; | ||||
| } | ||||
|  | ||||
| static const __DRIimageLoaderExtension image_loader_extension = { | ||||
|    { __DRI_IMAGE_LOADER, 1 }, | ||||
|    image_get_buffers, | ||||
|    dri2_flush_front_buffer | ||||
| }; | ||||
|  | ||||
| static void | ||||
| wayland_throttle_callback(void *data, | ||||
|                           struct wl_callback *callback, | ||||
|                           uint32_t time) | ||||
| wayland_frame_callback(void *data, struct wl_callback *callback, uint32_t time) | ||||
| { | ||||
|    struct dri2_egl_surface *dri2_surf = data; | ||||
|  | ||||
|    dri2_surf->throttle_callback = NULL; | ||||
|    dri2_surf->frame_callback = NULL; | ||||
|    wl_callback_destroy(callback); | ||||
| } | ||||
|  | ||||
| static const struct wl_callback_listener throttle_listener = { | ||||
|    wayland_throttle_callback | ||||
| static const struct wl_callback_listener frame_listener = { | ||||
| 	wayland_frame_callback | ||||
| }; | ||||
|  | ||||
| static void | ||||
| @@ -520,7 +459,7 @@ create_wl_buffer(struct dri2_egl_surface *dri2_surf) | ||||
| { | ||||
|    struct dri2_egl_display *dri2_dpy = | ||||
|       dri2_egl_display(dri2_surf->base.Resource.Display); | ||||
|    int fd, stride, name; | ||||
|    int fd; | ||||
|  | ||||
|    if (dri2_surf->current->wl_buffer != NULL) | ||||
|       return; | ||||
| @@ -528,8 +467,6 @@ create_wl_buffer(struct dri2_egl_surface *dri2_surf) | ||||
|    if (dri2_dpy->capabilities & WL_DRM_CAPABILITY_PRIME) { | ||||
|       dri2_dpy->image->queryImage(dri2_surf->current->dri_image, | ||||
|                                   __DRI_IMAGE_ATTRIB_FD, &fd); | ||||
|       dri2_dpy->image->queryImage(dri2_surf->current->dri_image, | ||||
|                                   __DRI_IMAGE_ATTRIB_STRIDE, &stride); | ||||
|  | ||||
|       dri2_surf->current->wl_buffer = | ||||
|          wl_drm_create_prime_buffer(dri2_dpy->wl_drm, | ||||
| @@ -537,22 +474,17 @@ create_wl_buffer(struct dri2_egl_surface *dri2_surf) | ||||
|                                     dri2_surf->base.Width, | ||||
|                                     dri2_surf->base.Height, | ||||
|                                     dri2_surf->format, | ||||
|                                     0, stride, | ||||
|                                     0, dri2_surf->current->pitch, | ||||
|                                     0, 0, | ||||
|                                     0, 0); | ||||
|       close(fd); | ||||
|    } else { | ||||
|       dri2_dpy->image->queryImage(dri2_surf->current->dri_image, | ||||
|                                   __DRI_IMAGE_ATTRIB_NAME, &name); | ||||
|       dri2_dpy->image->queryImage(dri2_surf->current->dri_image, | ||||
|                                   __DRI_IMAGE_ATTRIB_STRIDE, &stride); | ||||
|  | ||||
|       dri2_surf->current->wl_buffer = | ||||
|          wl_drm_create_buffer(dri2_dpy->wl_drm, | ||||
|                               name, | ||||
|                               dri2_surf->current->name, | ||||
|                               dri2_surf->base.Width, | ||||
|                               dri2_surf->base.Height, | ||||
|                               stride, | ||||
|                               dri2_surf->current->pitch, | ||||
|                               dri2_surf->format); | ||||
|    } | ||||
|  | ||||
| @@ -574,9 +506,19 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv, | ||||
| { | ||||
|    struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); | ||||
|    struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw); | ||||
|    struct dri2_egl_context *dri2_ctx; | ||||
|    _EGLContext *ctx; | ||||
|    int i; | ||||
|    __DRIbuffer buffer; | ||||
|    int i, ret = 0; | ||||
|  | ||||
|    while (dri2_surf->frame_callback && ret != -1) | ||||
|       ret = wl_display_dispatch_queue(dri2_dpy->wl_dpy, dri2_dpy->wl_queue); | ||||
|    if (ret < 0) | ||||
|       return EGL_FALSE; | ||||
|  | ||||
|    dri2_surf->frame_callback = wl_surface_frame(dri2_surf->wl_win->surface); | ||||
|    wl_callback_add_listener(dri2_surf->frame_callback, | ||||
|                             &frame_listener, dri2_surf); | ||||
|    wl_proxy_set_queue((struct wl_proxy *) dri2_surf->frame_callback, | ||||
|                       dri2_dpy->wl_queue); | ||||
|  | ||||
|    for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) | ||||
|       if (dri2_surf->color_buffers[i].age > 0) | ||||
| @@ -584,20 +526,11 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv, | ||||
|  | ||||
|    /* Make sure we have a back buffer in case we're swapping without ever | ||||
|     * rendering. */ | ||||
|    if (get_back_bo(dri2_surf) < 0) { | ||||
|    if (get_back_bo(dri2_surf, &buffer) < 0) { | ||||
|       _eglError(EGL_BAD_ALLOC, "dri2_swap_buffers"); | ||||
|       return EGL_FALSE; | ||||
|    } | ||||
|  | ||||
|    if (draw->SwapInterval > 0) { | ||||
|       dri2_surf->throttle_callback = | ||||
|          wl_surface_frame(dri2_surf->wl_win->surface); | ||||
|       wl_callback_add_listener(dri2_surf->throttle_callback, | ||||
|                                &throttle_listener, dri2_surf); | ||||
|       wl_proxy_set_queue((struct wl_proxy *) dri2_surf->throttle_callback, | ||||
|                          dri2_dpy->wl_queue); | ||||
|    } | ||||
|  | ||||
|    dri2_surf->back->age = 1; | ||||
|    dri2_surf->current = dri2_surf->back; | ||||
|    dri2_surf->back = NULL; | ||||
| @@ -615,8 +548,8 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv, | ||||
|    dri2_surf->dy = 0; | ||||
|  | ||||
|    if (n_rects == 0) { | ||||
|       wl_surface_damage(dri2_surf->wl_win->surface, | ||||
|                         0, 0, INT32_MAX, INT32_MAX); | ||||
|       wl_surface_damage(dri2_surf->wl_win->surface, 0, 0, | ||||
|                         dri2_surf->base.Width, dri2_surf->base.Height); | ||||
|    } else { | ||||
|       for (i = 0; i < n_rects; i++) { | ||||
|          const int *rect = &rects[i * 4]; | ||||
| @@ -627,34 +560,10 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv, | ||||
|       } | ||||
|    } | ||||
|  | ||||
|    if (dri2_dpy->flush->base.version >= 4) { | ||||
|       ctx = _eglGetCurrentContext(); | ||||
|       dri2_ctx = dri2_egl_context(ctx); | ||||
|       (*dri2_dpy->flush->flush_with_flags)(dri2_ctx->dri_context, | ||||
|                                            dri2_surf->dri_drawable, | ||||
|                                            __DRI2_FLUSH_DRAWABLE, | ||||
|                                            __DRI2_THROTTLE_SWAPBUFFER); | ||||
|    } else { | ||||
|       (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable); | ||||
|    } | ||||
|  | ||||
|    (*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable); | ||||
|  | ||||
|    wl_surface_commit(dri2_surf->wl_win->surface); | ||||
|  | ||||
|    /* If we're not waiting for a frame callback then we'll at least throttle | ||||
|     * to a sync callback so that we always give a chance for the compositor to | ||||
|     * handle the commit and send a release event before checking for a free | ||||
|     * buffer */ | ||||
|    if (dri2_surf->throttle_callback == NULL) { | ||||
|       dri2_surf->throttle_callback = wl_display_sync(dri2_dpy->wl_dpy); | ||||
|       wl_callback_add_listener(dri2_surf->throttle_callback, | ||||
|                                &throttle_listener, dri2_surf); | ||||
|       wl_proxy_set_queue((struct wl_proxy *) dri2_surf->throttle_callback, | ||||
|                          dri2_dpy->wl_queue); | ||||
|    } | ||||
|  | ||||
|    wl_display_flush(dri2_dpy->wl_dpy); | ||||
|    (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable); | ||||
|    (*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable); | ||||
|  | ||||
|    return EGL_TRUE; | ||||
| } | ||||
| @@ -664,8 +573,9 @@ dri2_query_buffer_age(_EGLDriver *drv, | ||||
|                       _EGLDisplay *disp, _EGLSurface *surface) | ||||
| { | ||||
|    struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surface); | ||||
|    __DRIbuffer buffer; | ||||
|  | ||||
|    if (get_back_bo(dri2_surf) < 0) { | ||||
|    if (get_back_bo(dri2_surf, &buffer) < 0) { | ||||
|       _eglError(EGL_BAD_ALLOC, "dri2_query_buffer_age"); | ||||
|       return 0; | ||||
|    } | ||||
| @@ -679,81 +589,6 @@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw) | ||||
|    return dri2_swap_buffers_with_damage (drv, disp, draw, NULL, 0); | ||||
| } | ||||
|  | ||||
| static struct wl_buffer * | ||||
| dri2_create_wayland_buffer_from_image_wl(_EGLDriver *drv, | ||||
|                                          _EGLDisplay *disp, | ||||
|                                          _EGLImage *img) | ||||
| { | ||||
|    struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); | ||||
|    struct dri2_egl_image *dri2_img = dri2_egl_image(img); | ||||
|    __DRIimage *image = dri2_img->dri_image; | ||||
|    struct wl_buffer *buffer; | ||||
|    int width, height, format, pitch; | ||||
|    enum wl_drm_format wl_format; | ||||
|  | ||||
|    dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_FORMAT, &format); | ||||
|  | ||||
|    switch (format) { | ||||
|    case __DRI_IMAGE_FORMAT_ARGB8888: | ||||
|       if (!(dri2_dpy->formats & HAS_ARGB8888)) | ||||
|          goto bad_format; | ||||
|       wl_format = WL_DRM_FORMAT_ARGB8888; | ||||
|       break; | ||||
|    case __DRI_IMAGE_FORMAT_XRGB8888: | ||||
|       if (!(dri2_dpy->formats & HAS_XRGB8888)) | ||||
|          goto bad_format; | ||||
|       wl_format = WL_DRM_FORMAT_XRGB8888; | ||||
|       break; | ||||
|    default: | ||||
|       goto bad_format; | ||||
|    } | ||||
|  | ||||
|    dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_WIDTH, &width); | ||||
|    dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_HEIGHT, &height); | ||||
|    dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_STRIDE, &pitch); | ||||
|  | ||||
|    if (dri2_dpy->capabilities & WL_DRM_CAPABILITY_PRIME) { | ||||
|       int fd; | ||||
|  | ||||
|       dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_FD, &fd); | ||||
|  | ||||
|       buffer = | ||||
|          wl_drm_create_prime_buffer(dri2_dpy->wl_drm, | ||||
|                                     fd, | ||||
|                                     width, height, | ||||
|                                     wl_format, | ||||
|                                     0, pitch, | ||||
|                                     0, 0, | ||||
|                                     0, 0); | ||||
|  | ||||
|       close(fd); | ||||
|    } else { | ||||
|       int name; | ||||
|  | ||||
|       dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_NAME, &name); | ||||
|  | ||||
|       buffer = | ||||
|          wl_drm_create_buffer(dri2_dpy->wl_drm, | ||||
|                               name, | ||||
|                               width, height, | ||||
|                               pitch, | ||||
|                               wl_format); | ||||
|    } | ||||
|  | ||||
|    /* The buffer object will have been created with our internal event queue | ||||
|     * because it is using the wl_drm object as a proxy factory. We want the | ||||
|     * buffer to be used by the application so we'll reset it to the display's | ||||
|     * default event queue */ | ||||
|    if (buffer) | ||||
|       wl_proxy_set_queue((struct wl_proxy *) buffer, NULL); | ||||
|  | ||||
|    return buffer; | ||||
|  | ||||
| bad_format: | ||||
|    _eglError(EGL_BAD_MATCH, "unsupported image format"); | ||||
|    return NULL; | ||||
| } | ||||
|  | ||||
| static int | ||||
| dri2_wayland_authenticate(_EGLDisplay *disp, uint32_t id) | ||||
| { | ||||
| @@ -897,60 +732,6 @@ static const struct wl_registry_listener registry_listener = { | ||||
|    registry_handle_global_remove | ||||
| }; | ||||
|  | ||||
| static EGLBoolean | ||||
| dri2_swap_interval(_EGLDriver *drv, | ||||
|                    _EGLDisplay *disp, | ||||
|                    _EGLSurface *surf, | ||||
|                    EGLint interval) | ||||
| { | ||||
|    if (interval > surf->Config->MaxSwapInterval) | ||||
|       interval = surf->Config->MaxSwapInterval; | ||||
|    else if (interval < surf->Config->MinSwapInterval) | ||||
|       interval = surf->Config->MinSwapInterval; | ||||
|  | ||||
|    surf->SwapInterval = interval; | ||||
|  | ||||
|    return EGL_TRUE; | ||||
| } | ||||
|  | ||||
| static void | ||||
| dri2_setup_swap_interval(struct dri2_egl_display *dri2_dpy) | ||||
| { | ||||
|    GLint vblank_mode = DRI_CONF_VBLANK_DEF_INTERVAL_1; | ||||
|  | ||||
|    /* We can't use values greater than 1 on Wayland because we are using the | ||||
|     * frame callback to synchronise the frame and the only way we be sure to | ||||
|     * get a frame callback is to attach a new buffer. Therefore we can't just | ||||
|     * sit drawing nothing to wait until the next ‘n’ frame callbacks */ | ||||
|  | ||||
|    if (dri2_dpy->config) | ||||
|       dri2_dpy->config->configQueryi(dri2_dpy->dri_screen, | ||||
|                                      "vblank_mode", &vblank_mode); | ||||
|    switch (vblank_mode) { | ||||
|    case DRI_CONF_VBLANK_NEVER: | ||||
|       dri2_dpy->min_swap_interval = 0; | ||||
|       dri2_dpy->max_swap_interval = 0; | ||||
|       dri2_dpy->default_swap_interval = 0; | ||||
|       break; | ||||
|    case DRI_CONF_VBLANK_ALWAYS_SYNC: | ||||
|       dri2_dpy->min_swap_interval = 1; | ||||
|       dri2_dpy->max_swap_interval = 1; | ||||
|       dri2_dpy->default_swap_interval = 1; | ||||
|       break; | ||||
|    case DRI_CONF_VBLANK_DEF_INTERVAL_0: | ||||
|       dri2_dpy->min_swap_interval = 0; | ||||
|       dri2_dpy->max_swap_interval = 1; | ||||
|       dri2_dpy->default_swap_interval = 0; | ||||
|       break; | ||||
|    default: | ||||
|    case DRI_CONF_VBLANK_DEF_INTERVAL_1: | ||||
|       dri2_dpy->min_swap_interval = 0; | ||||
|       dri2_dpy->max_swap_interval = 1; | ||||
|       dri2_dpy->default_swap_interval = 1; | ||||
|       break; | ||||
|    } | ||||
| } | ||||
|  | ||||
| EGLBoolean | ||||
| dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp) | ||||
| { | ||||
| @@ -963,19 +744,13 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp) | ||||
|    static const unsigned int rgb_masks[4] = { 0xff0000, 0xff00, 0xff, 0 }; | ||||
|    static const unsigned int rgb565_masks[4] = { 0xf800, 0x07e0, 0x001f, 0 }; | ||||
|  | ||||
|    loader_set_logger(_eglLog); | ||||
|  | ||||
|    drv->API.CreateWindowSurface = dri2_create_window_surface; | ||||
|    drv->API.DestroySurface = dri2_destroy_surface; | ||||
|    drv->API.SwapBuffers = dri2_swap_buffers; | ||||
|    drv->API.SwapBuffersWithDamageEXT = dri2_swap_buffers_with_damage; | ||||
|    drv->API.SwapInterval = dri2_swap_interval; | ||||
|    drv->API.Terminate = dri2_terminate; | ||||
|    drv->API.QueryBufferAge = dri2_query_buffer_age; | ||||
|  | ||||
|    drv->API.CreateWaylandBufferFromImageWL = | ||||
|       dri2_create_wayland_buffer_from_image_wl; | ||||
|  | ||||
|    dri2_dpy = calloc(1, sizeof *dri2_dpy); | ||||
|    if (!dri2_dpy) | ||||
|       return _eglError(EGL_BAD_ALLOC, "eglInitialize"); | ||||
| @@ -1009,7 +784,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp) | ||||
|    if (roundtrip(dri2_dpy) < 0 || !dri2_dpy->authenticated) | ||||
|       goto cleanup_fd; | ||||
|  | ||||
|    dri2_dpy->driver_name = loader_get_driver_for_fd(dri2_dpy->fd, 0); | ||||
|    dri2_dpy->driver_name = dri2_get_driver_for_fd(dri2_dpy->fd); | ||||
|    if (dri2_dpy->driver_name == NULL) { | ||||
|       _eglError(EGL_BAD_ALLOC, "DRI2: failed to get driver name"); | ||||
|       goto cleanup_fd; | ||||
| @@ -1026,18 +801,13 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp) | ||||
|       dri2_get_buffers_with_format; | ||||
|        | ||||
|    dri2_dpy->extensions[0] = &dri2_dpy->dri2_loader_extension.base; | ||||
|    dri2_dpy->extensions[1] = &image_loader_extension.base; | ||||
|    dri2_dpy->extensions[2] = &image_lookup_extension.base; | ||||
|    dri2_dpy->extensions[3] = &use_invalidate.base; | ||||
|    dri2_dpy->extensions[4] = NULL; | ||||
|  | ||||
|    dri2_dpy->swap_available = EGL_TRUE; | ||||
|    dri2_dpy->extensions[1] = &image_lookup_extension.base; | ||||
|    dri2_dpy->extensions[2] = &use_invalidate.base; | ||||
|    dri2_dpy->extensions[3] = NULL; | ||||
|  | ||||
|    if (!dri2_create_screen(disp)) | ||||
|       goto cleanup_driver; | ||||
|  | ||||
|    dri2_setup_swap_interval(dri2_dpy); | ||||
|  | ||||
|    /* The server shouldn't advertise WL_DRM_CAPABILITY_PRIME if the driver | ||||
|     * doesn't have createImageFromFds, since we're using the same driver on | ||||
|     * both sides.  We don't want crash if that happens anyway, so fall back to | ||||
| @@ -1059,7 +829,6 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp) | ||||
|    } | ||||
|  | ||||
|    disp->Extensions.WL_bind_wayland_display = EGL_TRUE; | ||||
|    disp->Extensions.WL_create_wayland_buffer_from_image = EGL_TRUE; | ||||
|    disp->Extensions.EXT_buffer_age = EGL_TRUE; | ||||
|    dri2_dpy->authenticate = dri2_wayland_authenticate; | ||||
|  | ||||
|   | ||||
| @@ -33,14 +33,18 @@ | ||||
| #include <fcntl.h> | ||||
| #include <errno.h> | ||||
| #include <unistd.h> | ||||
| #ifdef HAVE_LIBDRM | ||||
| #include <xf86drm.h> | ||||
| #endif | ||||
| #include <sys/types.h> | ||||
| #include <sys/stat.h> | ||||
|  | ||||
| #include "egl_dri2.h" | ||||
|  | ||||
| /* From xmlpool/options.h, user exposed so should be stable */ | ||||
| #define DRI_CONF_VBLANK_NEVER 0 | ||||
| #define DRI_CONF_VBLANK_DEF_INTERVAL_0 1 | ||||
| #define DRI_CONF_VBLANK_DEF_INTERVAL_1 2 | ||||
| #define DRI_CONF_VBLANK_ALWAYS_SYNC 3 | ||||
|  | ||||
| static void | ||||
| swrastCreateDrawable(struct dri2_egl_display * dri2_dpy, | ||||
|                      struct dri2_egl_surface * dri2_surf, | ||||
| @@ -602,7 +606,6 @@ dri2_x11_authenticate(_EGLDisplay *disp, uint32_t id) | ||||
| static EGLBoolean | ||||
| dri2_authenticate(_EGLDisplay *disp) | ||||
| { | ||||
| #ifdef HAVE_LIBDRM | ||||
|    struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); | ||||
|    drm_magic_t magic; | ||||
|  | ||||
| @@ -615,7 +618,7 @@ dri2_authenticate(_EGLDisplay *disp) | ||||
|       _eglLog(_EGL_WARNING, "DRI2: failed to authenticate"); | ||||
|       return EGL_FALSE; | ||||
|    } | ||||
| #endif | ||||
|  | ||||
|    return EGL_TRUE; | ||||
| } | ||||
|  | ||||
| @@ -1195,6 +1198,11 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp) | ||||
|  | ||||
|    dri2_setup_swap_interval(dri2_dpy); | ||||
|  | ||||
|    if (dri2_dpy->conn) { | ||||
|       if (!dri2_add_configs_for_visuals(dri2_dpy, disp)) | ||||
| 	 goto cleanup_configs; | ||||
|    } | ||||
|  | ||||
|    disp->Extensions.KHR_image_pixmap = EGL_TRUE; | ||||
|    disp->Extensions.NOK_swap_region = EGL_TRUE; | ||||
|    disp->Extensions.NOK_texture_from_pixmap = EGL_TRUE; | ||||
| @@ -1203,12 +1211,6 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp) | ||||
| #ifdef HAVE_WAYLAND_PLATFORM | ||||
|    disp->Extensions.WL_bind_wayland_display = EGL_TRUE; | ||||
| #endif | ||||
|  | ||||
|    if (dri2_dpy->conn) { | ||||
|       if (!dri2_add_configs_for_visuals(dri2_dpy, disp)) | ||||
| 	 goto cleanup_configs; | ||||
|    } | ||||
|  | ||||
|    dri2_dpy->authenticate = dri2_x11_authenticate; | ||||
|  | ||||
|    /* we're supporting EGL 1.4 */ | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> | ||||
|  * Copyright 2010-2011 LunarG, Inc. | ||||
|  * All Rights Reserved. | ||||
| @@ -32,7 +32,7 @@ | ||||
|  * This is an EGL driver that wraps GLX. This gives the benefit of being | ||||
|  * completely agnostic of the direct rendering implementation. | ||||
|  * | ||||
|  * Authors: Alan Hourihane <alanh@vmware.com> | ||||
|  * Authors: Alan Hourihane <alanh@tungstengraphics.com> | ||||
|  */ | ||||
|  | ||||
| #include <stdlib.h> | ||||
|   | ||||
| @@ -154,7 +154,6 @@ LOCAL_STATIC_LIBRARIES := \ | ||||
| 	libmesa_glsl \ | ||||
| 	libmesa_glsl_utils \ | ||||
| 	libmesa_gallium \ | ||||
| 	libloader \ | ||||
| 	$(LOCAL_STATIC_LIBRARIES) | ||||
|  | ||||
| endif # MESA_BUILD_GALLIUM | ||||
|   | ||||
| @@ -112,10 +112,15 @@ if HAVE_EGL_DRIVER_DRI2 | ||||
| AM_CFLAGS += -D_EGL_BUILT_IN_DRIVER_DRI2 | ||||
| AM_CFLAGS += -DHAVE_XCB_DRI2 | ||||
| libEGL_la_LIBADD += ../drivers/dri2/libegl_dri2.la | ||||
| libEGL_la_LIBADD += $(DLOPEN_LIBS) $(LIBDRM_LIBS) | ||||
| libEGL_la_LIBADD += $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIBS) | ||||
| endif | ||||
|  | ||||
| include $(top_srcdir)/install-lib-links.mk | ||||
| # Provide compatibility with scripts for the old Mesa build system for | ||||
| # a while by putting a link to the driver into /lib of the build tree. | ||||
| all-local: libEGL.la | ||||
| 	$(MKDIR_P) $(top_builddir)/$(LIB_DIR); | ||||
| 	ln -f .libs/libEGL.so.1.0.0 $(top_builddir)/$(LIB_DIR)/libEGL.so.1 | ||||
| 	ln -sf libEGL.so.1 $(top_builddir)/$(LIB_DIR)/libEGL.so | ||||
|  | ||||
| pkgconfigdir = $(libdir)/pkgconfig | ||||
|  | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> | ||||
|  * Copyright 2010-2011 LunarG, Inc. | ||||
|  * All Rights Reserved. | ||||
| @@ -87,7 +87,6 @@ | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
|  | ||||
| #include "eglglobals.h" | ||||
| #include "eglcontext.h" | ||||
| #include "egldisplay.h" | ||||
| #include "egltypedefs.h" | ||||
| @@ -355,15 +354,10 @@ eglTerminate(EGLDisplay dpy) | ||||
| const char * EGLAPIENTRY | ||||
| eglQueryString(EGLDisplay dpy, EGLint name) | ||||
| { | ||||
|    _EGLDisplay *disp; | ||||
|    _EGLDisplay *disp = _eglLockDisplay(dpy); | ||||
|    _EGLDriver *drv; | ||||
|    const char *ret; | ||||
|  | ||||
|    if (dpy == EGL_NO_DISPLAY && name == EGL_EXTENSIONS) { | ||||
|       RETURN_EGL_SUCCESS(NULL, _eglGlobal.ClientExtensionString); | ||||
|    } | ||||
|  | ||||
|    disp = _eglLockDisplay(dpy); | ||||
|    _EGL_CHECK_DISPLAY(disp, NULL, drv); | ||||
|    ret = drv->API.QueryString(drv, disp, name); | ||||
|  | ||||
| @@ -972,9 +966,6 @@ eglGetProcAddress(const char *procname) | ||||
|       { "eglBindWaylandDisplayWL", (_EGLProc) eglBindWaylandDisplayWL }, | ||||
|       { "eglUnbindWaylandDisplayWL", (_EGLProc) eglUnbindWaylandDisplayWL }, | ||||
|       { "eglQueryWaylandBufferWL", (_EGLProc) eglQueryWaylandBufferWL }, | ||||
| #endif | ||||
| #ifdef EGL_WL_create_wayland_buffer_from_image | ||||
|       { "eglCreateWaylandBufferFromImageWL", (_EGLProc) eglCreateWaylandBufferFromImageWL }, | ||||
| #endif | ||||
|       { "eglPostSubBufferNV", (_EGLProc) eglPostSubBufferNV }, | ||||
| #ifdef EGL_EXT_swap_buffers_with_damage | ||||
| @@ -1604,28 +1595,6 @@ eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer, | ||||
| } | ||||
| #endif | ||||
|  | ||||
| #ifdef EGL_WL_create_wayland_buffer_from_image | ||||
| struct wl_buffer * EGLAPIENTRY | ||||
| eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image) | ||||
| { | ||||
|    _EGLDisplay *disp = _eglLockDisplay(dpy); | ||||
|    _EGLImage *img; | ||||
|    _EGLDriver *drv; | ||||
|    struct wl_buffer *ret; | ||||
|  | ||||
|    _EGL_CHECK_DISPLAY(disp, NULL, drv); | ||||
|    assert(disp->Extensions.WL_create_wayland_buffer_from_image); | ||||
|  | ||||
|    img = _eglLookupImage(image, disp); | ||||
|  | ||||
|    if (!img) | ||||
|       RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, NULL); | ||||
|  | ||||
|    ret = drv->API.CreateWaylandBufferFromImageWL(drv, disp, img); | ||||
|  | ||||
|    RETURN_EGL_EVAL(disp, ret); | ||||
| } | ||||
| #endif | ||||
|  | ||||
| EGLBoolean EGLAPIENTRY | ||||
| eglPostSubBufferNV(EGLDisplay dpy, EGLSurface surface, | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> | ||||
|  * Copyright 2010-2011 LunarG, Inc. | ||||
|  * All Rights Reserved. | ||||
| @@ -126,10 +126,6 @@ typedef EGLBoolean (*UnbindWaylandDisplayWL_t)(_EGLDriver *drv, _EGLDisplay *dis | ||||
| typedef EGLBoolean (*QueryWaylandBufferWL_t)(_EGLDriver *drv, _EGLDisplay *displ, struct wl_resource *buffer, EGLint attribute, EGLint *value); | ||||
| #endif | ||||
|  | ||||
| #ifdef EGL_WL_create_wayland_buffer_from_image | ||||
| typedef struct wl_buffer * (*CreateWaylandBufferFromImageWL_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img); | ||||
| #endif | ||||
|  | ||||
| typedef EGLBoolean (*PostSubBufferNV_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surface, EGLint x, EGLint y, EGLint width, EGLint height); | ||||
|  | ||||
| typedef EGLint (*QueryBufferAge_t)(_EGLDriver *drv, | ||||
| @@ -214,10 +210,6 @@ struct _egl_api | ||||
|    QueryWaylandBufferWL_t QueryWaylandBufferWL; | ||||
| #endif | ||||
|  | ||||
| #ifdef EGL_WL_create_wayland_buffer_from_image | ||||
|    CreateWaylandBufferFromImageWL_t CreateWaylandBufferFromImageWL; | ||||
| #endif | ||||
|  | ||||
| #ifdef EGL_EXT_swap_buffers_with_damage | ||||
|    SwapBuffersWithDamageEXT_t SwapBuffersWithDamageEXT; | ||||
| #endif /* EGL_EXT_swap_buffers_with_damage */ | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> | ||||
|  * Copyright 2010-2011 LunarG, Inc. | ||||
|  * All Rights Reserved. | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> | ||||
|  * Copyright 2010-2011 LunarG, Inc. | ||||
|  * All Rights Reserved. | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> | ||||
|  * Copyright 2010-2011 LunarG, Inc. | ||||
|  * All Rights Reserved. | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> | ||||
|  * Copyright 2010-2011 LunarG, Inc. | ||||
|  * All Rights Reserved. | ||||
|   | ||||
| @@ -45,7 +45,7 @@ static _EGLThreadInfo dummy_thread = _EGL_THREAD_INFO_INITIALIZER; | ||||
| #if HAVE_PTHREAD | ||||
| #include <pthread.h> | ||||
|  | ||||
| static _EGLMutex _egl_TSDMutex = _EGL_MUTEX_INITIALIZER; | ||||
| static _EGL_DECLARE_MUTEX(_egl_TSDMutex); | ||||
| static EGLBoolean _egl_TSDInitialized; | ||||
| static pthread_key_t _egl_TSD; | ||||
| static void (*_egl_FreeTSD)(_EGLThreadInfo *); | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * All Rights Reserved. | ||||
|  * | ||||
|  * Permission is hereby granted, free of charge, to any person obtaining a | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> | ||||
|  * Copyright 2010-2011 LunarG, Inc. | ||||
|  * All Rights Reserved. | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> | ||||
|  * Copyright 2010-2011 LunarG, Inc. | ||||
|  * All Rights Reserved. | ||||
| @@ -91,7 +91,6 @@ struct _egl_extensions | ||||
|    EGLBoolean MESA_drm_image; | ||||
|  | ||||
|    EGLBoolean WL_bind_wayland_display; | ||||
|    EGLBoolean WL_create_wayland_buffer_from_image; | ||||
|  | ||||
|    EGLBoolean KHR_image_base; | ||||
|    EGLBoolean KHR_image_pixmap; | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> | ||||
|  * Copyright 2010-2011 LunarG, Inc. | ||||
|  * All Rights Reserved. | ||||
| @@ -60,7 +60,7 @@ typedef struct _egl_module { | ||||
|    _EGLDriver *Driver; | ||||
| } _EGLModule; | ||||
|  | ||||
| static _EGLMutex _eglModuleMutex = _EGL_MUTEX_INITIALIZER; | ||||
| static _EGL_DECLARE_MUTEX(_eglModuleMutex); | ||||
| static _EGLArray *_eglModules; | ||||
|  | ||||
| const struct { | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> | ||||
|  * Copyright 2010-2011 LunarG, Inc. | ||||
|  * All Rights Reserved. | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> | ||||
|  * Copyright 2010-2011 LunarG, Inc. | ||||
|  * All Rights Reserved. | ||||
| @@ -36,8 +36,7 @@ | ||||
| #include "eglmutex.h" | ||||
|  | ||||
|  | ||||
| static _EGLMutex _eglGlobalMutex = _EGL_MUTEX_INITIALIZER; | ||||
|  | ||||
| static _EGL_DECLARE_MUTEX(_eglGlobalMutex); | ||||
| struct _egl_global _eglGlobal = | ||||
| { | ||||
|    &_eglGlobalMutex,       /* Mutex */ | ||||
| @@ -48,14 +47,6 @@ struct _egl_global _eglGlobal = | ||||
|       _eglUnloadDrivers, /* always called last */ | ||||
|       _eglFiniDisplay | ||||
|    }, | ||||
|  | ||||
|    /* ClientExtensions */ | ||||
|    { | ||||
|       true /* EGL_EXT_client_extensions */ | ||||
|    }, | ||||
|  | ||||
|    /* ClientExtensionsString */ | ||||
|    "EGL_EXT_client_extensions" | ||||
| }; | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> | ||||
|  * Copyright 2010-2011 LunarG, Inc. | ||||
|  * All Rights Reserved. | ||||
| @@ -31,7 +31,6 @@ | ||||
| #ifndef EGLGLOBALS_INCLUDED | ||||
| #define EGLGLOBALS_INCLUDED | ||||
|  | ||||
| #include <stdbool.h> | ||||
|  | ||||
| #include "egltypedefs.h" | ||||
| #include "eglmutex.h" | ||||
| @@ -49,12 +48,6 @@ struct _egl_global | ||||
|  | ||||
|    EGLint NumAtExitCalls; | ||||
|    void (*AtExitCalls[10])(void); | ||||
|  | ||||
|    struct _egl_client_extensions { | ||||
|       bool EXT_client_extensions; | ||||
|    } ClientExtensions; | ||||
|  | ||||
|    const char *ClientExtensionString; | ||||
| }; | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> | ||||
|  * Copyright 2010 LunarG, Inc. | ||||
|  * All Rights Reserved. | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> | ||||
|  * All Rights Reserved. | ||||
|  * | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> | ||||
|  * Copyright 2010-2011 LunarG, Inc. | ||||
|  * All Rights Reserved. | ||||
| @@ -92,7 +92,6 @@ _eglUpdateExtensionsString(_EGLDisplay *dpy) | ||||
|    _EGL_CHECK_EXTENSION(MESA_drm_image); | ||||
|  | ||||
|    _EGL_CHECK_EXTENSION(WL_bind_wayland_display); | ||||
|    _EGL_CHECK_EXTENSION(WL_create_wayland_buffer_from_image); | ||||
|  | ||||
|    _EGL_CHECK_EXTENSION(KHR_image_base); | ||||
|    _EGL_CHECK_EXTENSION(KHR_image_pixmap); | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| /************************************************************************** | ||||
|  * | ||||
|  * Copyright 2008 VMware, Inc. | ||||
|  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. | ||||
|  * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com> | ||||
|  * Copyright 2010-2011 LunarG, Inc. | ||||
|  * All Rights Reserved. | ||||
|   | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user