--- mesa-10.5.2.orig/.dir-locals.el +++ mesa-10.5.2/.dir-locals.el @@ -0,0 +1,12 @@ +((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 'innamespace '0) + (c-set-offset 'inline-open '0))) + ) + (makefile-mode (indent-tabs-mode . t)) + ) --- mesa-10.5.2.orig/Android.common.mk +++ mesa-10.5.2/Android.common.mk @@ -0,0 +1,66 @@ +# 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. + +# use c99 compiler by default +ifeq ($(LOCAL_CC),) +ifeq ($(LOCAL_IS_HOST_MODULE),true) +LOCAL_CC := $(HOST_CC) -std=c99 +else +LOCAL_CC := $(TARGET_CC) -std=c99 +endif +endif + +LOCAL_C_INCLUDES += \ + $(MESA_TOP)/include + +MESA_VERSION=$(shell cat $(MESA_TOP)/VERSION) +# define ANDROID_VERSION (e.g., 4.0.x => 0x0400) +LOCAL_CFLAGS += \ + -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 += \ + -DHAVE_PTHREAD=1 \ + -fvisibility=hidden \ + -Wno-sign-compare + +ifeq ($(strip $(MESA_ENABLE_ASM)),true) +ifeq ($(TARGET_ARCH),x86) +LOCAL_CFLAGS += \ + -DUSE_X86_ASM \ + -DHAVE_DLOPEN \ + +endif +endif + +LOCAL_CPPFLAGS += \ + -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 --- mesa-10.5.2.orig/Android.mk +++ mesa-10.5.2/Android.mk @@ -0,0 +1,100 @@ +# 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 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) + +MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk +MESA_PYTHON2 := python + +DRM_GRALLOC_TOP := hardware/drm_gralloc + +classic_drivers := i915 i965 +gallium_drivers := swrast freedreno i915g ilo nouveau r300g r600g radeonsi vmwgfx + +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 + +# add subdirectories +ifneq ($(strip $(MESA_GPU_DRIVERS)),) + +SUBDIRS := \ + src/loader \ + src/mapi \ + src/glsl \ + src/mesa \ + src/util \ + src/egl/main + +ifeq ($(strip $(MESA_BUILD_CLASSIC)),true) +SUBDIRS += \ + src/egl/drivers/dri2 \ + src/mesa/drivers/dri +endif + +ifeq ($(strip $(MESA_BUILD_GALLIUM)),true) +SUBDIRS += src/gallium +endif + +mkfiles := $(patsubst %,$(MESA_TOP)/%/Android.mk,$(SUBDIRS)) +include $(mkfiles) + +endif --- mesa-10.5.2.orig/CleanSpec.mk +++ mesa-10.5.2/CleanSpec.mk @@ -0,0 +1,7 @@ +$(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) --- mesa-10.5.2.orig/bin/.cherry-ignore +++ mesa-10.5.2/bin/.cherry-ignore @@ -0,0 +1,26 @@ +# Cherry-picked without -x +# nir: resolve nir.h dependency list (fix make distcheck) +556fc4b84df99a1cd4b18c11fb16f7854a948b2a + +# nir: add missing header to the sources list +72e602905dd9d86450a936d5a22bf21758844b38 + +# configure: rework wayland_scanner handling(fix make distcheck) +153539bd9d4445b504110958306f00632222f840 + +# auxiliary/vl: bring back the VL code for the dri targets +c39dbfdd0f764b1aaa7319b4694e7335692993dd + +# mesa: rename format_info.c to format_info.h +3f6c28f2a976e35128b7a4a513cfa60af00301e1 +# mesa: fix dependency tracking of generated sources +d22391cb165af4ed2f9a9e5d6233072a432cc969 +# mesa: drop Makefile from get_hash.h dependency list +2c0f72d5389a9838cc4fbf4cc4f4291aa56c7845 +# mapi: fix *glapi dependency tracking +fe5fddd7e2df74233a2a02ae021418485f39d11c +# xmlpool: make sure we ship options.h +8d8ca64c28170ec7e9ffa01638bcf8fd30a96088 + +# The optimisations mentioned are not available in 10.5 +627c68308683abbd6e563a09af6013a33938a790 i965/fs: in MAD optimizations, switch last argument to be immediate --- mesa-10.5.2.orig/bin/bugzilla_mesa.sh +++ mesa-10.5.2/bin/bugzilla_mesa.sh @@ -0,0 +1,52 @@ +#!/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 url +trim_before='s/.*\(http\)/\1/' + +# regex pattern: trim after url +trim_after='s/\(show_bug.cgi?id=[0-9]*\).*/\1/' + +# regex pattern: always use https +use_https='s/http:/https:/' + +# extract fdo urls from commit log +urls=$(git log $* | grep 'bugs.freedesktop.org/show_bug' | sed -e $trim_before -e $trim_after -e $use_https | sort | uniq) + +# 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 "