From b683b8f5675e280a6dd4ab82d6b9394182798b55 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 24 Jan 2012 08:53:36 +0100 Subject: libX11 mesa xserver git update 24 jan 2012 --- mesalib/configs/autoconf.in | 8 - mesalib/configs/default | 13 -- mesalib/configure.ac | 22 +-- mesalib/docs/vmware-guest.html | 197 +++++++++++++++++++++ mesalib/src/mapi/Android.mk | 75 ++++++++ mesalib/src/mesa/drivers/common/meta.c | 7 +- mesalib/src/mesa/drivers/dri/Makefile.am | 31 ++++ mesalib/src/mesa/drivers/dri/swrast/Makefile.am | 58 ++++++ .../src/mesa/drivers/dri/swrast/Makefile.sources | 11 ++ mesalib/src/mesa/swrast/s_stencil.c | 6 +- 10 files changed, 388 insertions(+), 40 deletions(-) create mode 100644 mesalib/docs/vmware-guest.html create mode 100644 mesalib/src/mapi/Android.mk create mode 100644 mesalib/src/mesa/drivers/dri/Makefile.am create mode 100644 mesalib/src/mesa/drivers/dri/swrast/Makefile.am create mode 100644 mesalib/src/mesa/drivers/dri/swrast/Makefile.sources (limited to 'mesalib') diff --git a/mesalib/configs/autoconf.in b/mesalib/configs/autoconf.in index 3e5da796f..55886ea88 100644 --- a/mesalib/configs/autoconf.in +++ b/mesalib/configs/autoconf.in @@ -75,7 +75,6 @@ GLESv2_LIB = GLESv2 VG_LIB = OpenVG GLAPI_LIB = glapi WAYLAND_EGL_LIB = wayland-egl -GBM_LIB = gbm # Library names (actual file names) GL_LIB_NAME = @GL_LIB_NAME@ @@ -88,7 +87,6 @@ GLESv2_LIB_NAME = @GLESv2_LIB_NAME@ VG_LIB_NAME = @VG_LIB_NAME@ GLAPI_LIB_NAME = @GLAPI_LIB_NAME@ WAYLAND_EGL_LIB_NAME = @WAYLAND_EGL_LIB_NAME@ -GBM_LIB_NAME = @GBM_LIB_NAME@ # Globs used to install the lib and all symlinks GL_LIB_GLOB = @GL_LIB_GLOB@ @@ -101,7 +99,6 @@ GLESv2_LIB_GLOB = @GLESv2_LIB_GLOB@ VG_LIB_GLOB = @VG_LIB_GLOB@ GLAPI_LIB_GLOB = @GLAPI_LIB_GLOB@ WAYLAND_EGL_LIB_GLOB = @WAYLAND_EGL_LIB_GLOB@ -GBM_LIB_GLOB = @GBM_LIB_GLOB@ # Directories to build LIB_DIR = @LIB_DIR@ @@ -109,7 +106,6 @@ SRC_DIRS = @SRC_DIRS@ GLU_DIRS = @GLU_DIRS@ DRIVER_DIRS = @DRIVER_DIRS@ EGL_DRIVERS_DIRS = @EGL_DRIVERS_DIRS@ -GBM_BACKEND_DIRS = @GBM_BACKEND_DIRS@ GALLIUM_DIRS = @GALLIUM_DIRS@ GALLIUM_DRIVERS_DIRS = @GALLIUM_DRIVERS_DIRS@ GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@ @@ -147,7 +143,6 @@ GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv2_LIB_DEPS@ VG_LIB_DEPS = $(EXTRA_LIB_PATH) @VG_LIB_DEPS@ GLAPI_LIB_DEPS = $(EXTRA_LIB_PATH) @GLAPI_LIB_DEPS@ WAYLAND_EGL_LIB_DEPS = $(EXTRA_LIB_PATH) @WAYLAND_EGL_LIB_DEPS@ -GBM_LIB_DEPS = $(EXTRA_LIB_PATH) @GBM_LIB_DEPS@ # DRI dependencies MESA_MODULES = @MESA_MODULES@ @@ -209,9 +204,6 @@ EGL_PC_CFLAGS = @GL_PC_CFLAGS@ WAYLAND_EGL_PC_REQ_PRIV = @WAYLAND_EGL_PC_REQ_PRIV@ WAYLAND_EGL_PC_LIB_PRIV = @WAYLAND_EGL_PC_LIB_PRIV@ WAYLAND_EGL_PC_CFLAGS = @WAYLAND_EGL_PC_CFLAGS@ -GBM_PC_REQ_PRIV = @GBM_PC_REQ_PRIV@ -GBM_PC_LIB_PRIV = @GBM_PC_LIB_PRIV@ -GBM_PC_CFLAGS = @GBM_PC_CFLAGS@ XCB_DRI2_CFLAGS = @XCB_DRI2_CFLAGS@ XCB_DRI2_LIBS = @XCB_DRI2_LIBS@ diff --git a/mesalib/configs/default b/mesalib/configs/default index 2ca6fe45d..7e1aceb6b 100644 --- a/mesalib/configs/default +++ b/mesalib/configs/default @@ -63,7 +63,6 @@ GLESv2_LIB = GLESv2 VG_LIB = OpenVG GLAPI_LIB = glapi WAYLAND_EGL_LIB = wayland-egl -GBM_LIB = gbm # Library names (actual file names) GL_LIB_NAME = lib$(GL_LIB).so @@ -76,7 +75,6 @@ GLESv2_LIB_NAME = lib$(GLESv2_LIB).so VG_LIB_NAME = lib$(VG_LIB).so GLAPI_LIB_NAME = lib$(GLAPI_LIB).so WAYLAND_EGL_LIB_NAME = lib$(WAYLAND_EGL_LIB).so -GBM_LIB_NAME = lib$(GBM_LIB).so # globs used to install the lib and all symlinks GL_LIB_GLOB = $(GL_LIB_NAME)* @@ -89,7 +87,6 @@ GLESv2_LIB_GLOB = $(GLESv2_LIB_NAME)* VG_LIB_GLOB = $(VG_LIB_NAME)* GLAPI_LIB_GLOB = $(GLAPI_LIB_NAME)* WAYLAND_EGL_LIB_GLOB = $(WAYLAND_EGL_LIB_NAME)* -GBM_LIB_GLOB = $(GBM_LIB_NAME)* DRI_CFLAGS = $(CFLAGS) DRI_CXXFLAGS = $(CXXFLAGS) @@ -113,9 +110,6 @@ DRIVER_DIRS = x11 osmesa # EGL drivers to build EGL_DRIVERS_DIRS = glx -# gbm backends to build -GBM_BACKEND_DIRS = dri - # Gallium directories and GALLIUM_DIRS = auxiliary drivers state_trackers GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a @@ -141,7 +135,6 @@ GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread VG_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread GLAPI_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread WAYLAND_EGL_LIB_DEPS = $(EXTRA_LIB_PATH) -lwayland-client -ldrm -GBM_LIB_DEPS = $(EXTRA_LIB_PATH) -ludev -ldl # Program dependencies - specific GL libraries added in Makefiles X11_LIBS = -lX11 @@ -160,9 +153,6 @@ DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR) # EGL driver install directory EGL_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/egl -# gbm backend install directory -GBM_BACKEND_INSTALL_DIR = $(INSTALL_LIB_DIR)/gbm - # Xorg driver install directory (for xorg state-tracker) XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers @@ -192,6 +182,3 @@ VG_PC_CFLAGS = WAYLAND_EGL_PC_REQ_PRIV = WAYLAND_EGL_PC_LIB_PRIV = WAYLAND_EGL_PC_CFLAGS = -GBM_PC_REQ_PRIV = -GBM_PC_LIB_PRIV = -GBM_PC_CFLAGS = diff --git a/mesalib/configure.ac b/mesalib/configure.ac index 959956862..f68a54fe5 100644 --- a/mesalib/configure.ac +++ b/mesalib/configure.ac @@ -414,7 +414,6 @@ GLESv2_LIB_NAME='lib$(GLESv2_LIB).'${LIB_EXTENSION} VG_LIB_NAME='lib$(VG_LIB).'${LIB_EXTENSION} GLAPI_LIB_NAME='lib$(GLAPI_LIB).'${LIB_EXTENSION} WAYLAND_EGL_LIB_NAME='lib$(WAYLAND_EGL_LIB).'${LIB_EXTENSION} -GBM_LIB_NAME='lib$(GBM_LIB).'${LIB_EXTENSION} GL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' GLU_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLU_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' @@ -426,7 +425,6 @@ GLESv2_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv2_LIB)'${LIB_VERSION_SEPARATOR}'*'${LI VG_LIB_GLOB=${LIB_PREFIX_GLOB}'$(VG_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' GLAPI_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLAPI_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' WAYLAND_EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(WAYLAND_EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -GBM_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GBM_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' AC_SUBST([GL_LIB_NAME]) AC_SUBST([GLU_LIB_NAME]) @@ -437,7 +435,6 @@ AC_SUBST([GLESv2_LIB_NAME]) AC_SUBST([VG_LIB_NAME]) AC_SUBST([GLAPI_LIB_NAME]) AC_SUBST([WAYLAND_EGL_LIB_NAME]) -AC_SUBST([GBM_LIB_NAME]) AC_SUBST([GL_LIB_GLOB]) AC_SUBST([GLU_LIB_GLOB]) @@ -448,7 +445,6 @@ AC_SUBST([GLESv2_LIB_GLOB]) AC_SUBST([VG_LIB_GLOB]) AC_SUBST([GLAPI_LIB_GLOB]) AC_SUBST([WAYLAND_EGL_LIB_GLOB]) -AC_SUBST([GBM_LIB_GLOB]) dnl dnl Arch/platform-specific settings @@ -785,6 +781,8 @@ if test "x$enable_glx" = xno; then enable_xlib_glx=no fi +AM_CONDITIONAL(HAVE_DRI, test x"$enable_dri" = xyes) + dnl dnl Driver specific build directories dnl @@ -1060,7 +1058,7 @@ DRI_CXXFLAGS='$(CXXFLAGS)' DRI_LIB_DEPS='$(TOP)/src/mesa/libmesa.a' MESA_MODULES='$(TOP)/src/mesa/libmesa.a' -if test "x$enable_dri" = xyes ; then +if test "x$enable_dri" = xyes && test "x$driglx_direct" = xyes ; then DRICORE_GLSL_LIBS='$(TOP)/$(LIB_DIR)/libglsl.so' DRICORE_LIBS='$(TOP)/$(LIB_DIR)/libdricore.so' DRICORE_LIB_DEPS='-L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -lglsl' @@ -1231,8 +1229,10 @@ if test "x$enable_dri" = xyes; then EXPAT_LIB="-L$withval/$LIB_DIR -lexpat" ]) AC_CHECK_HEADER([expat.h],[],[AC_MSG_ERROR([Expat required for DRI.])]) + save_LIBS="$LIBS" AC_CHECK_LIB([expat],[XML_ParserCreate],[], [AC_MSG_ERROR([Expat required for DRI.])]) + LIBS="$save_LIBS" fi # libdrm is required for all except swrast @@ -1362,24 +1362,14 @@ if test "x$enable_gbm" = xauto; then fi if test "x$enable_gbm" = xyes; then SRC_DIRS="$SRC_DIRS gbm" - GBM_BACKEND_DIRS="" PKG_CHECK_MODULES([LIBUDEV], [libudev], [], AC_MSG_ERROR([gbm needs udev])) - GBM_LIB_DEPS="$DLOPEN_LIBS $LIBUDEV_LIBS" - - if test "x$enable_dri" = xyes; then - GBM_BACKEND_DIRS="$GBM_BACKEND_DIRS dri" - fi fi -AC_SUBST([GBM_LIB_DEPS]) -AC_SUBST([GBM_BACKEND_DIRS]) GBM_PC_REQ_PRIV="libudev" GBM_PC_LIB_PRIV="$DLOPEN_LIBS" -GBM_PC_CFLAGS= AC_SUBST([GBM_PC_REQ_PRIV]) AC_SUBST([GBM_PC_LIB_PRIV]) -AC_SUBST([GBM_PC_CFLAGS]) dnl dnl EGL configuration @@ -1928,6 +1918,8 @@ CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS" dnl Substitute the config AC_CONFIG_FILES([configs/autoconf + src/gbm/Makefile + src/gbm/main/gbm.pc src/mesa/drivers/dri/dri.pc src/mesa/drivers/dri/Makefile src/mesa/drivers/dri/i915/Makefile diff --git a/mesalib/docs/vmware-guest.html b/mesalib/docs/vmware-guest.html new file mode 100644 index 000000000..e19782ce2 --- /dev/null +++ b/mesalib/docs/vmware-guest.html @@ -0,0 +1,197 @@ + + +VMware guest GL driver + + + + + + +

VMware guest GL driver

+ +

+This page describes how to build, install and use the VMware guest GL driver +(aka the SVGA or SVGA3D driver) for Linux using the latest source code. +This driver gives a Linux virtual machine access to the host's GPU for +hardware-accelerated 3D. +VMware Workstation running on Linux or Windows and VMware Fusion running on +MacOS are all supported. +

+ +

+End users shouldn't have to go through all these steps once the driver is +included in newer Linux distributions. +

+ +

+For more information about the X components see these wiki pages at x.org: +

+ + + +

Components

+ +The components involved in this include: + + + +

Prerequisites

+ + + +

+Depending on your Linux distro, other packages may be needed. +The configure scripts should tell you what's missing. +

+ + + +

Getting the Latest Source Code

+ +Begin by saving your current directory location: +
+  export TOP=$PWD
+  
+ + + + +

Building the Code

+ + + + +Now try to load the kernel module by issuing +
+  sudo modprobe vmwgfx
+Then type +
+  dmesg
+to watch the debug output. It should contain a number of lines prefixed with "[vmwgfx]". + +

+Then restart the Xserver (or reboot). +The lines starting with "vmwlegacy" or "VMWARE" in the file /var/log/Xorg.0.log +should now have been replaced with lines starting with "vmwgfx", indicating that +the new Xorg driver is in use. +

+ + +

Running OpenGL Programs

+ +

+In a shell, run 'glxinfo' and look for the following to verify that the +driver is working: +

+ +
+OpenGL vendor string: VMware, Inc.
+OpenGL renderer string: Gallium 0.4 on SVGA3D; build: RELEASE;
+OpenGL version string: 2.1 Mesa 8.0
+
+ +If you don't see this, try setting this environment variable: +
+  export LIBGL_DEBUG=verbose
+then rerun glxinfo and examine the output for error messages. +

+ + + + + diff --git a/mesalib/src/mapi/Android.mk b/mesalib/src/mapi/Android.mk new file mode 100644 index 000000000..fe9e40e26 --- /dev/null +++ b/mesalib/src/mapi/Android.mk @@ -0,0 +1,75 @@ +# Mesa 3-D graphics library +# +# Copyright (C) 2010-2011 Chia-I Wu +# Copyright (C) 2010-2011 LunarG Inc. +# +# 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 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. + +# Android.mk for glapi + +LOCAL_PATH := $(call my-dir) + +# get MAPI_GLAPI_SOURCES +include $(LOCAL_PATH)/mapi/sources.mak + +mapi_abi_headers := + +# --------------------------------------- +# Build libglapi +# --------------------------------------- + +include $(CLEAR_VARS) + +abi_header := shared-glapi/glapi_mapi_tmp.h + +LOCAL_SRC_FILES := $(addprefix mapi/, $(MAPI_GLAPI_SOURCES)) + +LOCAL_CFLAGS := \ + -DMAPI_MODE_GLAPI \ + -DMAPI_ABI_HEADER=\"$(abi_header)\" + +LOCAL_C_INCLUDES := \ + $(MESA_TOP)/src/mapi + +LOCAL_MODULE := libglapi + +LOCAL_MODULE_CLASS := SHARED_LIBRARIES +intermediates := $(call local-intermediates-dir) +abi_header := $(intermediates)/$(abi_header) +LOCAL_GENERATED_SOURCES := $(abi_header) + +$(abi_header): PRIVATE_PRINTER := shared-glapi + +mapi_abi_headers += $(abi_header) + +include $(MESA_COMMON_MK) +include $(BUILD_SHARED_LIBRARY) + + +mapi_abi_deps := \ + $(wildcard $(LOCAL_PATH)/glapi/gen/*.py) \ + $(wildcard $(LOCAL_PATH)/glapi/gen/*.xml) \ + $(LOCAL_PATH)/mapi/mapi_abi.py + +$(mapi_abi_headers): PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/mapi/mapi_abi.py +$(mapi_abi_headers): PRIVATE_APIXML := $(LOCAL_PATH)/glapi/gen/gl_and_es_API.xml +$(mapi_abi_headers): $(mapi_abi_deps) + @mkdir -p $(dir $@) + @echo "target $(PRIVATE_PRINTER): $(PRIVATE_MODULE) <= $(PRIVATE_APIXML)" + $(hide) $(PRIVATE_SCRIPT) --printer $(PRIVATE_PRINTER) --mode lib $(PRIVATE_APIXML) > $@ diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c index dca3613a6..05cc712cf 100644 --- a/mesalib/src/mesa/drivers/common/meta.c +++ b/mesalib/src/mesa/drivers/common/meta.c @@ -1451,7 +1451,12 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx, struct vertex verts[4]; GLboolean newTex; - if (srcW > maxTexSize || srcH > maxTexSize) { + /* In addition to falling back if the blit size is larger than the maximum + * texture size, fallback if the source is multisampled. This fallback can + * be removed once Mesa gets support ARB_texture_multisample. + */ + if (srcW > maxTexSize || srcH > maxTexSize + || ctx->ReadBuffer->Visual.samples > 0) { /* XXX avoid this fallback */ _swrast_BlitFramebuffer(ctx, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); diff --git a/mesalib/src/mesa/drivers/dri/Makefile.am b/mesalib/src/mesa/drivers/dri/Makefile.am new file mode 100644 index 000000000..3722082eb --- /dev/null +++ b/mesalib/src/mesa/drivers/dri/Makefile.am @@ -0,0 +1,31 @@ +SUBDIRS= + +if HAVE_I915_DRI +SUBDIRS+=i915 +endif + +if HAVE_I965_DRI +SUBDIRS+=i965 +endif + +if HAVE_NOUVEAU_DRI +SUBDIRS+=nouveau +endif + +if HAVE_R200_DRI +SUBDIRS+=r200 +endif + +if HAVE_RADEON_DRI +SUBDIRS+=radeon +endif + +if HAVE_SWRAST_DRI +SUBDIRS+=swrast +endif + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = dri.pc + +driincludedir = $(includedir)/GL/internal +driinclude_HEADERS = $(top_srcdir)/include/GL/internal/dri_interface.h diff --git a/mesalib/src/mesa/drivers/dri/swrast/Makefile.am b/mesalib/src/mesa/drivers/dri/swrast/Makefile.am new file mode 100644 index 000000000..0a2800440 --- /dev/null +++ b/mesalib/src/mesa/drivers/dri/swrast/Makefile.am @@ -0,0 +1,58 @@ + + +# Copyright © 2012 Matt Turner +# +# 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. + +include Makefile.sources + +# Hack to make some of the non-automake variables work. +TOP=$(top_builddir) + +AM_CFLAGS = \ + -D__NOT_HAVE_DRM_H \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/src/ \ + -I$(top_srcdir)/src/mapi \ + -I$(top_srcdir)/src/mesa/ \ + -I$(top_srcdir)/src/mesa/drivers/dri/common \ + $(DEFINES) \ + $(ASM_FLAGS) \ + $(API_DEFINES) + +dridir = $(DRI_DRIVER_INSTALL_DIR) + +if HAVE_SWRAST_DRI +dri_LTLIBRARIES = swrast_dri.la +endif + +swrast_dri_la_SOURCES = \ + $(SWRAST_C_FILES) + +swrast_dri_la_LDFLAGS = -module -avoid-version -shared +swrast_dri_la_LIBADD = \ + $(DRI_LIB_DEPS) \ + $(DRICORE_LIB_DEPS) + +# 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: swrast_dri.la + $(MKDIR_P) $(top_builddir)/$(LIB_DIR); + ln -f .libs/swrast_dri.so $(top_builddir)/$(LIB_DIR)/swrast_dri.so; diff --git a/mesalib/src/mesa/drivers/dri/swrast/Makefile.sources b/mesalib/src/mesa/drivers/dri/swrast/Makefile.sources new file mode 100644 index 000000000..9de5cb823 --- /dev/null +++ b/mesalib/src/mesa/drivers/dri/swrast/Makefile.sources @@ -0,0 +1,11 @@ +SWRAST_DRIVER_FILES = \ + swrast.c \ + swrast_span.c + +SWRAST_COMMON_FILES = \ + ../common/utils.c \ + ../common/drisw_util.c + +SWRAST_C_FILES = \ + $(SWRAST_COMMON_FILES) \ + $(SWRAST_DRIVER_FILES) diff --git a/mesalib/src/mesa/swrast/s_stencil.c b/mesalib/src/mesa/swrast/s_stencil.c index dbcbd2be0..fb95ef14d 100644 --- a/mesalib/src/mesa/swrast/s_stencil.c +++ b/mesalib/src/mesa/swrast/s_stencil.c @@ -297,7 +297,7 @@ get_s8_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint i; if (rb->Format == MESA_FORMAT_S8) { - const GLuint rowStride = rb->RowStride; + const GLint rowStride = rb->RowStride; for (i = 0; i < count; i++) { if (x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) { stencil[i] = *(map + y[i] * rowStride + x[i]); @@ -305,8 +305,8 @@ get_s8_values(struct gl_context *ctx, struct gl_renderbuffer *rb, } } else { - const GLuint bpp = _mesa_get_format_bytes(rb->Format); - const GLuint rowStride = rb->RowStride * bpp; + const GLint bpp = _mesa_get_format_bytes(rb->Format); + const GLint rowStride = rb->RowStride * bpp; for (i = 0; i < count; i++) { if (x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) { const GLubyte *src = map + y[i] * rowStride + x[i] * bpp; -- cgit v1.2.3