--- mesa-11.2.1.orig/.dir-locals.el +++ mesa-11.2.1/.dir-locals.el @@ -0,0 +1,13 @@ +((prog-mode + (indent-tabs-mode . nil) + (tab-width . 8) + (c-basic-offset . 3) + (c-file-style . "stroustrup") + (fill-column . 78) + (eval . (progn + (c-set-offset 'case-label '0) + (c-set-offset 'innamespace '0) + (c-set-offset 'inline-open '0))) + ) + (makefile-mode (indent-tabs-mode . t)) + ) --- mesa-11.2.1.orig/.travis.yml +++ mesa-11.2.1/.travis.yml @@ -0,0 +1,101 @@ +language: c + +sudo: false + +cache: + directories: + - $HOME/.ccache + +addons: + apt: + packages: + - libdrm-dev + - libudev-dev + - x11proto-xf86vidmode-dev + - libexpat1-dev + - libxcb-dri2-0-dev + - libx11-xcb-dev + - llvm-3.4-dev + - scons + +env: + global: + - XORG_RELEASES=http://xorg.freedesktop.org/releases/individual + - XCB_RELEASES=http://xcb.freedesktop.org/dist + - XORGMACROS_VERSION=util-macros-1.19.0 + - GLPROTO_VERSION=glproto-1.4.17 + - DRI2PROTO_VERSION=dri2proto-2.8 + - DRI3PROTO_VERSION=dri3proto-1.0 + - PRESENTPROTO_VERSION=presentproto-1.0 + - LIBPCIACCESS_VERSION=libpciaccess-0.13.4 + - LIBDRM_VERSION=libdrm-2.4.65 + - XCBPROTO_VERSION=xcb-proto-1.11 + - LIBXCB_VERSION=libxcb-1.11 + - LIBXSHMFENCE_VERSION=libxshmfence-1.2 + - PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig + matrix: + - BUILD=make + - BUILD=scons + +install: + - export PATH="/usr/lib/ccache:$PATH" + - pip install --user mako + + # Install dependencies where we require specific versions (or where + # disallowed by Travis CI's package whitelisting). + + - wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2 + - tar -jxvf $XORGMACROS_VERSION.tar.bz2 + - (cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install) + + - wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2 + - tar -jxvf $GLPROTO_VERSION.tar.bz2 + - (cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) + + - wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2 + - tar -jxvf $DRI2PROTO_VERSION.tar.bz2 + - (cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) + + - wget $XORG_RELEASES/proto/$DRI3PROTO_VERSION.tar.bz2 + - tar -jxvf $DRI3PROTO_VERSION.tar.bz2 + - (cd $DRI3PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) + + - wget $XORG_RELEASES/proto/$PRESENTPROTO_VERSION.tar.bz2 + - tar -jxvf $PRESENTPROTO_VERSION.tar.bz2 + - (cd $PRESENTPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) + + - wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2 + - tar -jxvf $XCBPROTO_VERSION.tar.bz2 + - (cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install) + + - wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2 + - tar -jxvf $LIBXCB_VERSION.tar.bz2 + - (cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install) + + - wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2 + - tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2 + - (cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install) + + - wget http://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2 + - tar -jxvf $LIBDRM_VERSION.tar.bz2 + - (cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix && make install) + + - wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2 + - tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2 + - (cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install) + +# Disabled LLVM (and therefore r300 and r600) because the build fails +# with "undefined reference to `clock_gettime'" and "undefined +# reference to `setupterm'" in llvmpipe. +script: + - if test "x$BUILD" = xmake; then + ./autogen.sh --enable-debug + --disable-gallium-llvm + --with-egl-platforms=x11,drm + --with-dri-drivers=i915,i965,radeon,r200,swrast,nouveau + --with-gallium-drivers=svga,swrast,vc4,virgl + ; + make && make check; + elif test x$BUILD = xscons; then + scons; + fi --- mesa-11.2.1.orig/Android.common.mk +++ mesa-11.2.1/Android.common.mk @@ -0,0 +1,94 @@ +# 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. + +ifeq ($(LOCAL_IS_HOST_MODULE),true) +LOCAL_CFLAGS += -D_GNU_SOURCE +endif + +LOCAL_C_INCLUDES += \ + $(MESA_TOP)/src \ + $(MESA_TOP)/include + +MESA_VERSION := $(shell cat $(MESA_TOP)/VERSION) +# define ANDROID_VERSION (e.g., 4.0.x => 0x0400) +LOCAL_CFLAGS += \ + -Wno-unused-parameter \ + -Wno-date-time \ + -DPACKAGE_VERSION=\"$(MESA_VERSION)\" \ + -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\" \ + -DANDROID_VERSION=0x0$(MESA_ANDROID_MAJOR_VERSION)0$(MESA_ANDROID_MINOR_VERSION) + +LOCAL_CFLAGS += \ + -D__STDC_LIMIT_MACROS \ + -DHAVE___BUILTIN_EXPECT \ + -DHAVE___BUILTIN_FFS \ + -DHAVE___BUILTIN_FFSLL \ + -DHAVE_FUNC_ATTRIBUTE_FLATTEN \ + -DHAVE_FUNC_ATTRIBUTE_UNUSED \ + -DHAVE_FUNC_ATTRIBUTE_FORMAT \ + -DHAVE_FUNC_ATTRIBUTE_PACKED \ + -DHAVE___BUILTIN_CTZ \ + -DHAVE___BUILTIN_POPCOUNT \ + -DHAVE___BUILTIN_POPCOUNTLL \ + -DHAVE___BUILTIN_CLZ \ + -DHAVE___BUILTIN_CLZLL \ + -DHAVE___BUILTIN_UNREACHABLE \ + -DHAVE_PTHREAD=1 \ + -fvisibility=hidden \ + -Wno-sign-compare + +# mesa requires at least c99 compiler +LOCAL_CONLYFLAGS += \ + -std=c99 + +ifeq ($(strip $(MESA_ENABLE_ASM)),true) +ifeq ($(TARGET_ARCH),x86) +LOCAL_CFLAGS += \ + -DUSE_X86_ASM \ + -DHAVE_DLOPEN \ + +endif +endif + +ifeq ($(MESA_ENABLE_LLVM),true) +LOCAL_CFLAGS += \ + -DHAVE_LLVM=0x0305 -DMESA_LLVM_VERSION_PATCH=2 \ + -D__STDC_CONSTANT_MACROS \ + -D__STDC_FORMAT_MACROS \ + -D__STDC_LIMIT_MACROS +endif + +LOCAL_CPPFLAGS += \ + $(if $(filter true,$(MESA_LOLLIPOP_BUILD)),-D_USING_LIBCXX) \ + -Wno-error=non-virtual-dtor \ + -Wno-non-virtual-dtor + +# uncomment to keep the debug symbols +#LOCAL_STRIP_MODULE := false + +ifeq ($(strip $(LOCAL_MODULE_TAGS)),) +LOCAL_MODULE_TAGS := optional +endif + +# Quiet down the build system and remove any .h files from the sources +LOCAL_SRC_FILES := $(patsubst %.h, , $(LOCAL_SRC_FILES)) --- mesa-11.2.1.orig/Android.mk +++ mesa-11.2.1/Android.mk @@ -0,0 +1,106 @@ +# 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. + +# BOARD_GPU_DRIVERS should be defined. The valid values are +# +# classic drivers: i915 i965 +# gallium drivers: swrast freedreno i915g ilo nouveau r300g r600g radeonsi vc4 virgl vmwgfx +# +# The main target is libGLES_mesa. For each classic driver enabled, a DRI +# module will also be built. DRI modules will be loaded by libGLES_mesa. + +MESA_TOP := $(call my-dir) + +MESA_ANDROID_MAJOR_VERSION := $(word 1, $(subst ., , $(PLATFORM_VERSION))) +MESA_ANDROID_MINOR_VERSION := $(word 2, $(subst ., , $(PLATFORM_VERSION))) +MESA_ANDROID_VERSION := $(MESA_ANDROID_MAJOR_VERSION).$(MESA_ANDROID_MINOR_VERSION) +ifeq ($(filter 1 2 3 4,$(MESA_ANDROID_MAJOR_VERSION)),) +MESA_LOLLIPOP_BUILD := true +else +define local-generated-sources-dir +$(call local-intermediates-dir) +endef +endif + +MESA_DRI_MODULE_REL_PATH := dri +MESA_DRI_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/$(MESA_DRI_MODULE_REL_PATH) +MESA_DRI_MODULE_UNSTRIPPED_PATH := $(TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED)/$(MESA_DRI_MODULE_REL_PATH) + +MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk +MESA_PYTHON2 := python + +classic_drivers := i915 i965 +gallium_drivers := swrast freedreno i915g ilo nouveau r300g r600g radeonsi vmwgfx vc4 virgl + +MESA_GPU_DRIVERS := $(strip $(BOARD_GPU_DRIVERS)) + +# warn about invalid drivers +invalid_drivers := $(filter-out \ + $(classic_drivers) $(gallium_drivers), $(MESA_GPU_DRIVERS)) +ifneq ($(invalid_drivers),) +$(warning invalid GPU drivers: $(invalid_drivers)) +# tidy up +MESA_GPU_DRIVERS := $(filter-out $(invalid_drivers), $(MESA_GPU_DRIVERS)) +endif + +# host and target must be the same arch to generate matypes.h +ifeq ($(TARGET_ARCH),$(HOST_ARCH)) +MESA_ENABLE_ASM := true +else +MESA_ENABLE_ASM := false +endif + +ifneq ($(filter $(classic_drivers), $(MESA_GPU_DRIVERS)),) +MESA_BUILD_CLASSIC := true +else +MESA_BUILD_CLASSIC := false +endif + +ifneq ($(filter $(gallium_drivers), $(MESA_GPU_DRIVERS)),) +MESA_BUILD_GALLIUM := true +else +MESA_BUILD_GALLIUM := false +endif + +MESA_ENABLE_LLVM := $(if $(filter radeonsi,$(MESA_GPU_DRIVERS)),true,false) + +# add subdirectories +ifneq ($(strip $(MESA_GPU_DRIVERS)),) + +SUBDIRS := \ + src/loader \ + src/mapi \ + src/compiler \ + src/compiler/glsl \ + src/mesa \ + src/util \ + src/egl \ + src/mesa/drivers/dri + +ifeq ($(strip $(MESA_BUILD_GALLIUM)),true) +SUBDIRS += src/gallium +endif + +include $(call all-named-subdir-makefiles,$(SUBDIRS)) + +endif --- mesa-11.2.1.orig/CleanSpec.mk +++ mesa-11.2.1/CleanSpec.mk @@ -0,0 +1,16 @@ +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libmesa_*_intermediates) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/i9*5_dri_intermediates) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libglapi_intermediates) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libGLES_mesa_intermediates) +$(call add-clean-step, rm -rf $(OUT_DIR)/host/$(HOST_OS)-$(HOST_ARCH)/obj/EXECUTABLES/mesa_*_intermediates) +$(call add-clean-step, rm -rf $(OUT_DIR)/host/$(HOST_OS)-$(HOST_ARCH)/obj/EXECUTABLES/glsl_compiler_intermediates) +$(call add-clean-step, rm -rf $(OUT_DIR)/host/$(HOST_OS)-$(HOST_ARCH)/obj/STATIC_LIBRARIES/libmesa_glsl_utils_intermediates) + +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/*/STATIC_LIBRARIES/libmesa_*_intermediates) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/*/SHARED_LIBRARIES/i9?5_dri_intermediates) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/*/SHARED_LIBRARIES/libglapi_intermediates) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/*/SHARED_LIBRARIES/libGLES_mesa_intermediates) +$(call add-clean-step, rm -rf $(HOST_OUT_release)/*/EXECUTABLES/mesa_*_intermediates) +$(call add-clean-step, rm -rf $(HOST_OUT_release)/*/EXECUTABLES/glsl_compiler_intermediates) +$(call add-clean-step, rm -rf $(HOST_OUT_release)/*/STATIC_LIBRARIES/libmesa_*_intermediates) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/*/SHARED_LIBRARIES/*_dri_intermediates) --- mesa-11.2.1.orig/appveyor.yml +++ mesa-11.2.1/appveyor.yml @@ -0,0 +1,73 @@ +# http://www.appveyor.com/docs/appveyor-yml +# +# To setup AppVeyor for your own personal repositories do the following: +# - Sign up +# - Add a new project +# - Select Git and fill in the Git clone URL +# - Setup a Git hook as explained in +# https://github.com/appveyor/webhooks#installing-git-hook +# - Check 'Settings > General > Skip branches without appveyor.yml' +# - Check 'Settings > General > Rolling builds' +# - Setup the global or project notifications to your liking +# +# Note that kicking (or restarting) a build via the web UI will not work, as it +# will fail to find appveyor.yml . The Git hook is the most practical way to +# kick a build. +# +# See also: +# - http://help.appveyor.com/discussions/problems/2209-node-grunt-build-specify-a-project-or-solution-file-the-directory-does-not-contain-a-project-or-solution-file +# - http://help.appveyor.com/discussions/questions/1184-build-config-vs-appveyoryaml + +version: '{build}' + +branches: + except: + - /^travis.*$/ + +# Don't download the full Mesa history to speed up cloning. However the clone +# depth must not be too small, otherwise builds might fail when lots of patches +# are committed in succession, because the desired commit is not found on the +# truncated history. +# +# See also: +# - https://www.appveyor.com/blog/2014/06/04/shallow-clone-for-git-repositories +clone_depth: 100 + +cache: +- win_flex_bison-2.4.5.zip +- llvm-3.3.1-msvc2013-mtd.7z + +environment: + WINFLEXBISON_ARCHIVE: win_flex_bison-2.4.5.zip + LLVM_ARCHIVE: llvm-3.3.1-msvc2013-mtd.7z + +install: +# Check pip +- python --version +- python -m pip --version +# Install Mako +- python -m pip install --egg Mako +# Install SCons +- python -m pip install --egg scons==2.4.1 +- scons --version +# Install flex/bison +- if not exist "%WINFLEXBISON_ARCHIVE%" appveyor DownloadFile "http://downloads.sourceforge.net/project/winflexbison/%WINFLEXBISON_ARCHIVE%" +- 7z x -y -owinflexbison\ "%WINFLEXBISON_ARCHIVE%" > nul +- set Path=%CD%\winflexbison;%Path% +- win_flex --version +- win_bison --version +# Download and extract LLVM +- if not exist "%LLVM_ARCHIVE%" appveyor DownloadFile "https://people.freedesktop.org/~jrfonseca/llvm/%LLVM_ARCHIVE%" +- 7z x -y "%LLVM_ARCHIVE%" > nul +- mkdir llvm\bin +- set LLVM=%CD%\llvm + +build_script: +- scons -j%NUMBER_OF_PROCESSORS% MSVC_VERSION=12.0 llvm=1 + + +# It's possible to setup notification here, as described in +# http://www.appveyor.com/docs/notifications#appveyor-yml-configuration , but +# doing so would cause the notification settings to be replicated across all +# repos, which is most likely undesired. So it's better to rely on the +# Appveyor global/project notification settings. --- mesa-11.2.1.orig/bin/bugzilla_mesa.sh +++ mesa-11.2.1/bin/bugzilla_mesa.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +# This script is used to generate the list of fixed bugs that +# appears in the release notes files, with HTML formatting. +# +# Note: This script could take a while until all details have +# been fetched from bugzilla. +# +# Usage examples: +# +# $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 +# $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 > bugfixes +# $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 | tee bugfixes +# $ DRYRUN=yes bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 +# $ DRYRUN=yes bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 | wc -l + + +# regex pattern: trim before bug number +trim_before='s/.*show_bug.cgi?id=\([0-9]*\).*/\1/' + +# regex pattern: reconstruct the url +use_after='s,^,https://bugs.freedesktop.org/show_bug.cgi?id=,' + +# extract fdo urls from commit log +urls=$(git log $* | grep 'bugs.freedesktop.org/show_bug' | sed -e $trim_before | sort -n -u | sed -e $use_after) + +# if DRYRUN is set to "yes", simply print the URLs and don't fetch the +# details from fdo bugzilla. +#DRYRUN=yes + +if [ "x$DRYRUN" = xyes ]; then + for i in $urls + do + echo $i + done +else + echo "