[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mesa: Changes to 'upstream-experimental'



 Android.mk                                                |    2 
 VERSION                                                   |    2 
 configure.ac                                              |    8 
 docs/envvars.html                                         |    1 
 src/Makefile.am                                           |   26 
 src/compiler/Android.glsl.mk                              |    5 
 src/compiler/glsl/ast_to_hir.cpp                          |   23 
 src/compiler/glsl/builtin_variables.cpp                   |   31 -
 src/compiler/glsl/glsl_parser_extras.cpp                  |    4 
 src/compiler/glsl/ir.cpp                                  |   23 
 src/compiler/glsl/ir.h                                    |    6 
 src/compiler/glsl/link_uniform_initializers.cpp           |    2 
 src/compiler/glsl/link_varyings.cpp                       |   55 +-
 src/compiler/glsl/linker.cpp                              |    8 
 src/compiler/glsl/lower_distance.cpp                      |    1 
 src/compiler/nir/nir.c                                    |    4 
 src/compiler/nir/nir.h                                    |    2 
 src/compiler/nir/nir_gather_info.c                        |    1 
 src/compiler/nir/nir_intrinsics.h                         |    2 
 src/compiler/nir/nir_lower_system_values.c                |   16 
 src/compiler/nir/nir_validate.c                           |    4 
 src/egl/drivers/dri2/platform_android.c                   |   15 
 src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp |    4 
 src/gallium/drivers/nouveau/codegen/nv50_ir_util.cpp      |    6 
 src/gallium/drivers/radeon/radeon_video.c                 |    2 
 src/gallium/drivers/radeonsi/si_state.c                   |    5 
 src/intel/genxml/Android.mk                               |   82 +++
 src/intel/genxml/Makefile.am                              |    4 
 src/intel/genxml/gen_pack_header.py                       |   20 
 src/intel/isl/Android.mk                                  |  155 +++++
 src/intel/isl/Makefile.am                                 |    2 
 src/intel/isl/Makefile.sources                            |    1 
 src/intel/vulkan/anv_cmd_buffer.c                         |   52 -
 src/intel/vulkan/anv_entrypoints_gen.py                   |   28 +
 src/intel/vulkan/anv_pipeline.c                           |    4 
 src/intel/vulkan/anv_private.h                            |    1 
 src/intel/vulkan/gen7_cmd_buffer.c                        |   15 
 src/intel/vulkan/gen8_cmd_buffer.c                        |   13 
 src/intel/vulkan/genX_cmd_buffer.c                        |    4 
 src/intel/vulkan/genX_pipeline.c                          |   12 
 src/mesa/drivers/dri/i965/Android.mk                      |    3 
 src/mesa/drivers/dri/i965/Makefile.sources                |    1 
 src/mesa/drivers/dri/i965/brw_compiler.h                  |   22 
 src/mesa/drivers/dri/i965/brw_context.c                   |   38 +
 src/mesa/drivers/dri/i965/brw_cs.c                        |    3 
 src/mesa/drivers/dri/i965/brw_defines.h                   |    3 
 src/mesa/drivers/dri/i965/brw_eu_emit.c                   |    6 
 src/mesa/drivers/dri/i965/brw_fs.cpp                      |  379 +++++++-------
 src/mesa/drivers/dri/i965/brw_fs.h                        |    1 
 src/mesa/drivers/dri/i965/brw_fs_builder.h                |   10 
 src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp    |    7 
 src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp     |    9 
 src/mesa/drivers/dri/i965/brw_fs_nir.cpp                  |   27 
 src/mesa/drivers/dri/i965/brw_ir_fs.h                     |   20 
 src/mesa/drivers/dri/i965/brw_nir.h                       |    2 
 src/mesa/drivers/dri/i965/brw_nir_intrinsics.c            |  179 ++++++
 src/mesa/drivers/dri/i965/brw_tcs.c                       |   19 
 src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp         |    3 
 src/mesa/drivers/dri/i965/gen7_cs_state.c                 |  121 ++--
 src/mesa/drivers/dri/i965/gen7_sol_state.c                |   10 
 src/mesa/drivers/dri/i965/gen8_surface_state.c            |   13 
 src/mesa/drivers/dri/i965/intel_debug.c                   |    1 
 src/mesa/drivers/dri/i965/intel_debug.h                   |    1 
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c             |    2 
 src/mesa/main/bufferobj.c                                 |    2 
 src/mesa/main/fbobject.c                                  |    3 
 src/mesa/main/mtypes.h                                    |    3 
 src/mesa/main/samplerobj.c                                |   37 -
 src/mesa/main/shader_query.cpp                            |    2 
 src/mesa/main/shaderobj.c                                 |    2 
 src/mesa/state_tracker/st_extensions.c                    |    1 
 71 files changed, 1095 insertions(+), 486 deletions(-)

New commits:
commit a7649abe9fc19671493957a8ffbbf6053c77cab4
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Mon Jun 6 16:42:59 2016 +0100

    Update version to 12.0.0-rc2
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

diff --git a/VERSION b/VERSION
index cbc76f5..76ea38e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-12.0.0-rc1
+12.0.0-rc2

commit bcfda0a1fe10bbe35a8c798a3e05b9fdc8802c70
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Mon Jun 6 19:39:40 2016 +0100

    mesa: automake: distclean git_sha1.h when building OOT
    
    In the case of out-of-tree (OOT) builds, in particular when building
    from tarball, we'll end up with the file in both srcdir and builddir.
    
    We want the former to remain intact (since we need it on rebuild) while
    the latter should be removed otherwise `make distclean' gets angry at
    us.
    
    Ideally there'll be a solution that feels a bit less of a hack. Until
    then this does the job exactly as expected.
    
    Cc: <mesa-stable@lists.freedesktop.org>
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    (cherry picked from commit b7f7ec78435771ab02f7d9a61bb1d4a11df720b8)

diff --git a/src/Makefile.am b/src/Makefile.am
index a5c54ff..0527a31 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -46,6 +46,12 @@ git_sha1.h: git_sha1.h.tmp
 
 BUILT_SOURCES = git_sha1.h
 
+# We want to keep the srcdir file since we need it on rebuild from tarball.
+# At the same time `make distclean' gets angry at us if we don't cleanup the
+# builddir one.
+distclean-local:
+	test $(top_srcdir) != $(top_builddir) && rm $(builddir)/git_sha1.h
+
 SUBDIRS = . gtest util mapi/glapi/gen mapi
 
 # include only conditionally ?

commit 998e503592d13f1268df4e7ca1dd4da57e2d738f
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Mon Jun 6 17:31:05 2016 +0100

    mesa: automake: ensure that git_sha1.h.tmp has the right attributes
    
    ... when copied from git_sha1.h.
    
    As the latter file can we lacking the write attribute, one should set it
    explicitly. Otherwise we'll get a warning/failure at cleanup stage.
    
    Cc: <mesa-stable@lists.freedesktop.org>
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    (cherry picked from commit 2c424e00c3995a6a88f4db0c5dc9fd03ea749ebd)

diff --git a/src/Makefile.am b/src/Makefile.am
index 08446a8..a5c54ff 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -33,6 +33,7 @@ git_sha1.h.tmp:
 		fi \
 	else \
 		cp $(srcdir)/git_sha1.h git_sha1.h.tmp ;\
+		chmod u+w git_sha1.h.tmp; \
 	fi
 
 git_sha1.h: git_sha1.h.tmp

commit 5e3e292502d48faa648d8267d35eb09cf2bd74ea
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Mon Jun 6 16:50:14 2016 +0100

    mesa: automake: add directory prefix for git_sha1.h
    
    Otherwise the build will assume that we've talking about builddir, which
    is not the case in the else statement.
    
    Here the file is already generated and is part of the tarball.
    
    Cc: <mesa-stable@lists.freedesktop.org>
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    (cherry picked from commit 359d9dfec3381284b044d6c9bcf7a648ea8c651a)

diff --git a/src/Makefile.am b/src/Makefile.am
index 45590c0..08446a8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -32,7 +32,7 @@ git_sha1.h.tmp:
 			> git_sha1.h.tmp ; \
 		fi \
 	else \
-		cp git_sha1.h git_sha1.h.tmp ;\
+		cp $(srcdir)/git_sha1.h git_sha1.h.tmp ;\
 	fi
 
 git_sha1.h: git_sha1.h.tmp

commit 3be5c6a9ecc65ede2a112cfc6f548a3af860471d
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Sat Jun 4 01:09:14 2016 +0100

    egl: android: don't add the image loader extension for !render_node
    
    With earlier commit we introduced support for render_node devices, which
    was couples with the use of the image loader extension.
    
    As the work was inspired by egl/wayland we (erroneously) added the
    extension for the !render_node path as well.
    
    That works for wayland, as the implementations of the DRI2 and IMAGE
    loader extensions converge behind the scenes. As that is not yet
    the case for Android we shouldn't expose the extension.
    
    Fixes: 34ddef39cef ("egl: android: add dma-buf fd support")
    
    Cc: <mesa-stable@lists.freedesktop.org>
    Reported-by: Mauro Rossi <issor.oruam@gmail.com>
    Tested-by: Mauro Rossi <issor.oruam@gmail.com>
    Acked-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    (cherry picked from commit 1816c837c1906382c370d65afe65a691738fd03b)

diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 25d02f5..70bbdff 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -814,10 +814,6 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy)
 
    dri2_dpy->is_render_node = drmGetNodeTypeFromFd(dri2_dpy->fd) == DRM_NODE_RENDER;
 
-   dri2_dpy->extensions[0] = &droid_image_loader_extension.base;
-   dri2_dpy->extensions[1] = &use_invalidate.base;
-   dri2_dpy->extensions[2] = &image_lookup_extension.base;
-
    /* render nodes cannot use Gem names, and thus do not support
     * the __DRI_DRI2_LOADER extension */
    if (!dri2_dpy->is_render_node) {
@@ -827,10 +823,13 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy)
       dri2_dpy->dri2_loader_extension.flushFrontBuffer = droid_flush_front_buffer;
       dri2_dpy->dri2_loader_extension.getBuffersWithFormat =
         droid_get_buffers_with_format;
-      dri2_dpy->extensions[3] = &dri2_dpy->dri2_loader_extension.base;
-      dri2_dpy->extensions[4] = NULL;
-   } else
-      dri2_dpy->extensions[3] = NULL;
+      dri2_dpy->extensions[0] = &dri2_dpy->dri2_loader_extension.base;
+   } else {
+      dri2_dpy->extensions[0] = &droid_image_loader_extension.base;
+   }
+   dri2_dpy->extensions[1] = &use_invalidate.base;
+   dri2_dpy->extensions[2] = &image_lookup_extension.base;
+   dri2_dpy->extensions[3] = NULL;
 
 
    if (!dri2_create_screen(dpy)) {

commit a26ca04fe304a95d86d9255cbc0318337e7ad037
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Tue May 31 14:55:04 2016 +0100

    anv: let anv_entrypoints_gen.py generate proper Wayland/Xcb guards
    
    The generated sources should follow the example set by the vulkan
    headers and our non-generated code. Namely: the code for all supported
    platforms should be available, each one guarded by its respective
    VK_USE_PLATFORM_*_KHR macro.
    
    v2: Reword commit message.
    
    Cc: Mark Janes <mark.a.janes@intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96285
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v1 over IRC)
    (cherry picked from commit b8e1f59d62bbe9b071c1012fd26a84928f3b0564)

diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py
index cedecfe..7a47372 100644
--- a/src/intel/vulkan/anv_entrypoints_gen.py
+++ b/src/intel/vulkan/anv_entrypoints_gen.py
@@ -51,6 +51,20 @@ def hash(name):
 
     return h
 
+def print_guard_start(name):
+    if "Wayland" in name:
+        print "#ifdef VK_USE_PLATFORM_WAYLAND_KHR"
+    if "Xcb" in name:
+        print "#ifdef VK_USE_PLATFORM_XCB_KHR"
+    return
+
+def print_guard_end(name):
+    if "Wayland" in name:
+        print "#endif // VK_USE_PLATFORM_WAYLAND_KHR"
+    if "Xcb" in name:
+        print "#endif // VK_USE_PLATFORM_XCB_KHR"
+    return
+
 opt_header = False
 opt_code = False
 
@@ -86,7 +100,9 @@ if opt_header:
     print "      struct {"
 
     for type, name, args, num, h in entrypoints:
+        print_guard_start(name)
         print "         %s (*%s)%s;" % (type, name, args)
+        print_guard_end(name)
     print "      };\n"
     print "   };\n"
     print "};\n"
@@ -94,12 +110,14 @@ if opt_header:
     print "void anv_set_dispatch_devinfo(const struct brw_device_info *info);\n"
 
     for type, name, args, num, h in entrypoints:
+        print_guard_start(name)
         print "%s anv_%s%s;" % (type, name, args)
         print "%s gen7_%s%s;" % (type, name, args)
         print "%s gen75_%s%s;" % (type, name, args)
         print "%s gen8_%s%s;" % (type, name, args)
         print "%s gen9_%s%s;" % (type, name, args)
         print "%s anv_validate_%s%s;" % (type, name, args)
+        print_guard_end(name)
     exit()
 
 
@@ -146,9 +164,11 @@ static const char strings[] ="""
 offsets = []
 i = 0;
 for type, name, args, num, h in entrypoints:
+    print_guard_start(name)
     print "   \"vk%s\\0\"" % name
     offsets.append(i)
     i += 2 + len(name) + 1
+    print_guard_end(name)
 print """   ;
 
 /* Weak aliases for all potential validate functions. These will resolve to
@@ -162,15 +182,21 @@ print """   ;
 
 print "\nstatic const struct anv_entrypoint entrypoints[] = {"
 for type, name, args, num, h in entrypoints:
+    print_guard_start(name)
     print "   { %5d, 0x%08x }," % (offsets[num], h)
+    print_guard_end(name)
 print "};\n"
 
 for layer in [ "anv", "validate", "gen7", "gen75", "gen8", "gen9" ]:
     for type, name, args, num, h in entrypoints:
+        print_guard_start(name)
         print "%s %s_%s%s __attribute__ ((weak));" % (type, layer, name, args)
+        print_guard_end(name)
     print "\nconst struct anv_dispatch_table %s_layer = {" % layer
     for type, name, args, num, h in entrypoints:
+        print_guard_start(name)
         print "   .%s = %s_%s," % (name, layer, name)
+        print_guard_end(name)
     print "};\n"
 
 print """
@@ -242,8 +268,10 @@ anv_resolve_entrypoint(uint32_t index)
 # lets the resolver look it up in the table.
 
 for type, name, args, num, h in entrypoints:
+    print_guard_start(name)
     print "static void *resolve_%s(void) { return anv_resolve_entrypoint(%d); }" % (name, num)
     print "%s vk%s%s\n   __attribute__ ((ifunc (\"resolve_%s\"), visibility (\"default\")));\n" % (type, name, args, name)
+    print_guard_end(name)
 
 
 # Now generate the hash table used for entry point look up.  This is a

commit 1a5d6a232fdfcfee71916c70c5dabf40c6a81fd7
Author: Mauro Rossi <issor.oruam@gmail.com>
Date:   Thu Jun 2 21:15:35 2016 +0200

    isl: add support for Android libmesa_isl static library
    
    isl library is needed to build i965, libmesa_isl static library is added
    to fix related Android building errors.
    
    Any attempt to build libmesa_genxml as phony package module failed to deliver
    gen{7,75,8,9}_pack.h generated headers, needed for libmesa_isl_gen{7,75,8,9}
    
    Due to constraints in Android Build System, libmesa_genxml is built as static,
    at least one source is needed, so dummy.c is autogenerated for this scope,
    libmesa_genxml dependency is declared using LOCAL_WHOLE_STATIC_LIBRARIES,
    to avoid building errors due to missing genxml/gen{7,75,8,9}_pack.h headers.
    
    Cc: <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
    (cherry picked from commit 278c2212ac137c19438a84072c8d3150b5a5b4f6)

diff --git a/Android.mk b/Android.mk
index 6a5596b..a83cb33 100644
--- a/Android.mk
+++ b/Android.mk
@@ -95,6 +95,8 @@ SUBDIRS := \
 	src/mesa \
 	src/util \
 	src/egl \
+	src/intel/genxml \
+	src/intel/isl \
 	src/mesa/drivers/dri
 
 INC_DIRS := $(call all-named-subdir-makefiles,$(SUBDIRS))
diff --git a/src/intel/genxml/Android.mk b/src/intel/genxml/Android.mk
new file mode 100644
index 0000000..e5b7597
--- /dev/null
+++ b/src/intel/genxml/Android.mk
@@ -0,0 +1,82 @@
+# Copyright © 2016 Intel Corporation
+# Copyright © 2016 Mauro Rossi <issor.oruam@gmail.com>
+#
+# 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.
+
+LOCAL_PATH := $(call my-dir)
+
+# Import variable GENERATED_FILES.
+include $(LOCAL_PATH)/Makefile.sources
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libmesa_genxml
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir)
+
+# dummy.c source file is generated to meet the build system's rules.
+LOCAL_GENERATED_SOURCES += $(intermediates)/dummy.c
+
+$(intermediates)/dummy.c:
+	@mkdir -p $(dir $@)
+	@echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))"
+	$(hide) touch $@
+
+# This is the list of auto-generated files headers
+LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/genxml/, $(GENXML_GENERATED_FILES))
+
+define header-gen
+	@mkdir -p $(dir $@)
+	@echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
+	$(hide) $(PRIVATE_SCRIPT) $(PRIVATE_XML) > $@
+endef
+
+$(intermediates)/genxml/gen6_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py
+$(intermediates)/genxml/gen6_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen6.xml
+$(intermediates)/genxml/gen6_pack.h: $(LOCAL_PATH)/gen6.xml $(LOCAL_PATH)/gen_pack_header.py
+	$(call header-gen)
+
+$(intermediates)/genxml/gen7_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py
+$(intermediates)/genxml/gen7_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen7.xml
+$(intermediates)/genxml/gen7_pack.h: $(LOCAL_PATH)/gen7.xml $(LOCAL_PATH)/gen_pack_header.py
+	$(call header-gen)
+
+$(intermediates)/genxml/gen75_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py
+$(intermediates)/genxml/gen75_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen75.xml
+$(intermediates)/genxml/gen75_pack.h: $(LOCAL_PATH)/gen75.xml $(LOCAL_PATH)/gen_pack_header.py
+	$(call header-gen)
+
+$(intermediates)/genxml/gen8_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py
+$(intermediates)/genxml/gen8_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen8.xml
+$(intermediates)/genxml/gen8_pack.h: $(LOCAL_PATH)/gen8.xml $(LOCAL_PATH)/gen_pack_header.py
+	$(call header-gen)
+
+$(intermediates)/genxml/gen9_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py
+$(intermediates)/genxml/gen9_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen9.xml
+$(intermediates)/genxml/gen9_pack.h: $(LOCAL_PATH)/gen9.xml $(LOCAL_PATH)/gen_pack_header.py
+	$(call header-gen)
+
+LOCAL_EXPORT_C_INCLUDE_DIRS := \
+	$(MESA_TOP)/src/intel \
+	$(intermediates)
+
+include $(MESA_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
diff --git a/src/intel/isl/Android.mk b/src/intel/isl/Android.mk
new file mode 100644
index 0000000..3134981
--- /dev/null
+++ b/src/intel/isl/Android.mk
@@ -0,0 +1,155 @@
+# Copyright © 2016 Intel Corporation
+# Copyright © 2016 Mauro Rossi <issor.oruam@gmail.com>
+#
+# 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+# Import variables LIBISL_FILES.
+include $(LOCAL_PATH)/Makefile.sources
+
+LIBISL_GENX_COMMON_INCLUDES := \
+	$(MESA_TOP)/src/ \
+	$(MESA_TOP)/src/mesa/drivers/dri/i965
+
+# ---------------------------------------
+# Build libisl_gen7
+# ---------------------------------------
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libmesa_isl_gen7
+
+LOCAL_SRC_FILES := $(ISL_GEN7_FILES)
+
+LOCAL_CFLAGS := -DGEN_VERSIONx10=70
+
+LOCAL_C_INCLUDES := $(LIBISL_GENX_COMMON_INCLUDES)
+
+LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml
+
+include $(MESA_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
+
+# ---------------------------------------
+# Build libisl_gen75
+# ---------------------------------------
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libmesa_isl_gen75
+
+LOCAL_SRC_FILES := $(ISL_GEN75_FILES)
+
+LOCAL_CFLAGS := -DGEN_VERSIONx10=75
+
+LOCAL_C_INCLUDES := $(LIBISL_GENX_COMMON_INCLUDES)
+
+LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml
+
+include $(MESA_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
+
+# ---------------------------------------
+# Build libisl_gen8
+# ---------------------------------------
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libmesa_isl_gen8
+
+LOCAL_SRC_FILES := $(ISL_GEN8_FILES)
+
+LOCAL_CFLAGS := -DGEN_VERSIONx10=80
+
+LOCAL_C_INCLUDES := $(LIBISL_GENX_COMMON_INCLUDES)
+
+LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml
+
+include $(MESA_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
+
+# ---------------------------------------
+# Build libisl_gen9
+# ---------------------------------------
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libmesa_isl_gen9
+
+LOCAL_SRC_FILES := $(ISL_GEN9_FILES)
+
+LOCAL_CFLAGS := -DGEN_VERSIONx10=90
+
+LOCAL_C_INCLUDES := $(LIBISL_GENX_COMMON_INCLUDES)
+
+LOCAL_WHOLE_STATIC_LIBRARIES := libmesa_genxml
+
+include $(MESA_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
+
+# ---------------------------------------
+# Build libisl
+# ---------------------------------------
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libmesa_isl
+
+LOCAL_SRC_FILES := $(ISL_FILES)
+
+LOCAL_C_INCLUDES := \
+	$(MESA_TOP)/src/mapi \
+	$(MESA_TOP)/src/mesa \
+	$(MESA_TOP)/src/mesa/drivers/dri/i965 \
+
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(MESA_TOP)/src/intel
+
+LOCAL_WHOLE_STATIC_LIBRARIES := \
+	libmesa_isl_gen7 \
+	libmesa_isl_gen75 \
+	libmesa_isl_gen8 \
+	libmesa_isl_gen9
+
+# Autogenerated sources
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir)
+
+LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, $(ISL_GENERATED_FILES))
+
+define bash-gen
+	@mkdir -p $(dir $@)
+	@echo "Gen Bash: $(PRIVATE_MODULE) <= $(notdir $(@))"
+	$(hide) $(PRIVATE_SCRIPT) < $(PRIVATE_CSV) > $@
+endef
+
+isl_format_layout_deps := \
+	$(LOCAL_PATH)/isl_format_layout_gen.bash \
+	$(LOCAL_PATH)/isl_format_layout.csv
+
+$(intermediates)/isl_format_layout.c: PRIVATE_SCRIPT := bash -c $(LOCAL_PATH)/isl_format_layout_gen.bash
+$(intermediates)/isl_format_layout.c: PRIVATE_CSV := $(LOCAL_PATH)/isl_format_layout.csv
+$(intermediates)/isl_format_layout.c: $(isl_format_layout_deps)
+	$(call bash-gen)
+
+include $(MESA_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk
index 9fd3a30..e8a379f 100644
--- a/src/mesa/drivers/dri/i965/Android.mk
+++ b/src/mesa/drivers/dri/i965/Android.mk
@@ -52,7 +52,8 @@ LOCAL_SRC_FILES := \
 	$(i965_FILES)
 
 LOCAL_WHOLE_STATIC_LIBRARIES := \
-	$(MESA_DRI_WHOLE_STATIC_LIBRARIES)
+	$(MESA_DRI_WHOLE_STATIC_LIBRARIES) \
+	libmesa_isl
 
 LOCAL_SHARED_LIBRARIES := \
 	$(MESA_DRI_SHARED_LIBRARIES) \

commit 702a1121c954ee5342dc22ac22a814ae40d70e1f
Author: Mauro Rossi <issor.oruam@gmail.com>
Date:   Tue May 31 00:20:28 2016 +0200

    android: libmesa_glsl: add a dependency on libmesa_nir static
    
    Fixes the following building error:
    
    target  C++: libmesa_glsl <= external/mesa/src/compiler/glsl/glsl_to_nir.cpp
    In file included from external/mesa/src/compiler/glsl/glsl_to_nir.h:28:0,
                     from external/mesa/src/compiler/glsl/glsl_to_nir.cpp:28:
    external/mesa/src/compiler/nir/nir.h:42:25: fatal error: nir_opcodes.h: No such file or directory
    compilation terminated.
    build/core/binary.mk:432: recipe for target 'out/target/product/x86/obj/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/glsl_to_nir.o' failed
    make: *** [out/target/product/x86/obj/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/glsl_to_nir.o] Error 1
    make: *** Waiting for unfinished jobs....
    
    Cc: <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
    (cherry picked from commit 4143245c23c25a8b81c4ab6ca3d9211593edf542)

diff --git a/src/compiler/Android.glsl.mk b/src/compiler/Android.glsl.mk
index 5d2bc18..21c1065 100644
--- a/src/compiler/Android.glsl.mk
+++ b/src/compiler/Android.glsl.mk
@@ -38,13 +38,14 @@ LOCAL_SRC_FILES := \
 	$(LIBGLSL_FILES) \
 
 LOCAL_C_INCLUDES := \
-	$(MESA_TOP)/src/compiler/nir \
 	$(MESA_TOP)/src/mapi \
 	$(MESA_TOP)/src/mesa \
 	$(MESA_TOP)/src/gallium/include \
 	$(MESA_TOP)/src/gallium/auxiliary
 
-LOCAL_STATIC_LIBRARIES := libmesa_compiler
+LOCAL_STATIC_LIBRARIES := \
+	libmesa_compiler \
+	libmesa_nir
 
 LOCAL_MODULE := libmesa_glsl
 

commit 9a21315ea91d150e391cfc6b76bc3d4a6f072142
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Tue May 31 16:59:39 2016 +0100

    isl: automake: don't include isl_format_layout.c in two lists.
    
    Including the file in both ISL_FILES and ISL_GENERATED_FILES makes
    the actual dependency list less obvious.
    
    v2: Drop unrelated vulkan hunk (Jason).
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
    (cherry picked from commit af1a0ae8cebb62fe9ce4b78c3e95185ea62ccdf0)

diff --git a/src/intel/isl/Makefile.am b/src/intel/isl/Makefile.am
index 4922b1f..74f863a 100644
--- a/src/intel/isl/Makefile.am
+++ b/src/intel/isl/Makefile.am
@@ -50,7 +50,7 @@ libisl_la_CFLAGS = $(CFLAGS) -Wno-override-init
 
 libisl_la_LIBADD = $(ISL_GEN_LIBS)
 
-libisl_la_SOURCES = $(ISL_FILES)
+libisl_la_SOURCES = $(ISL_FILES) $(ISL_GENERATED_FILES)
 
 libisl_gen7_la_SOURCES = $(ISL_GEN7_FILES)
 libisl_gen7_la_CFLAGS = $(libisl_la_CFLAGS) -DGEN_VERSIONx10=70
diff --git a/src/intel/isl/Makefile.sources b/src/intel/isl/Makefile.sources
index fe6a00f..89b1418 100644
--- a/src/intel/isl/Makefile.sources
+++ b/src/intel/isl/Makefile.sources
@@ -2,7 +2,6 @@ ISL_FILES = \
 	isl.c \
 	isl.h \
 	isl_format.c \
-	isl_format_layout.c \
 	isl_gen4.c \
 	isl_gen4.h \
 	isl_gen6.c \

commit 94630ce0c7d3d085cdb5b71542c3237d775f9872
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Tue May 31 14:46:19 2016 +0100

    automake: bring back the .PHONY git_sha1.h.tmp rule
    
    With earlier commit 3689ef32afd ("automake: rework the git_sha1.h rule,
    include in tarball") we/I erroneously removed the PHONY rule and the
    temporary file.
    
    The former is used to ensure that the header is regenerated when on each
    make invocation, while the latter helps us avoid the unneeded rebuild(s)
    when the SHA1 hasn't changed.
    
    Reported-by: Grazvydas Ignotas <notasas@gmail.com>
    Tested-by: Grazvydas Ignotas <notasas@gmail.com>
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    (cherry picked from commit af2637aa32aac1ef512433407385e8e2bf711aea)

diff --git a/src/Makefile.am b/src/Makefile.am
index f5c0773..45590c0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -19,13 +19,28 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 # IN THE SOFTWARE.
 
-git_sha1.h:
+.PHONY: git_sha1.h.tmp
+git_sha1.h.tmp:
+	@# Don't assume that $(top_srcdir)/.git is a directory. It may be
+	@# a gitlink file if $(top_srcdir) is a submodule checkout or a linked
+	@# worktree.
+	@# If we are building from a release tarball copy the bundled header.
 	@if test -e $(top_srcdir)/.git; then \
 		if which git > /dev/null; then \
 		    git --git-dir=$(top_srcdir)/.git log -n 1 --oneline | \
 			sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \
-			> git_sha1.h ; \
+			> git_sha1.h.tmp ; \
 		fi \
+	else \
+		cp git_sha1.h git_sha1.h.tmp ;\
+	fi
+
+git_sha1.h: git_sha1.h.tmp
+	@echo "updating git_sha1.h"
+	@if ! cmp -s git_sha1.h.tmp git_sha1.h; then \
+		mv git_sha1.h.tmp git_sha1.h ;\
+	else \
+		rm git_sha1.h.tmp ;\
 	fi
 
 BUILT_SOURCES = git_sha1.h

commit 6ad61d90eac9b92ba2e99b0c3287e164e2425043
Author: Christian König <christian.koenig@amd.com>
Date:   Wed May 25 16:55:48 2016 +0200

    radeon/uvd: fix the H264 level for Tonga v2
    
    We support 5.2 for a while now.
    
    v2: we even support 5.2 for H264, 5.1 is for HEVC.
    
    Signed-off-by: Christian König <christian.koenig@amd.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Cc: <mesa-stable@lists.freedesktop.org>
    (cherry picked from commit b3e75c39976c03f73128ffd802465799ac0e4ef5)

diff --git a/src/gallium/drivers/radeon/radeon_video.c b/src/gallium/drivers/radeon/radeon_video.c
index da65ce8..aba1404 100644
--- a/src/gallium/drivers/radeon/radeon_video.c
+++ b/src/gallium/drivers/radeon/radeon_video.c
@@ -298,7 +298,7 @@ int rvid_get_video_param(struct pipe_screen *screen,
 		case PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE:
 		case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN:
 		case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH:
-			return 41;
+			return (rscreen->family < CHIP_TONGA) ? 41 : 52;
 		case PIPE_VIDEO_PROFILE_HEVC_MAIN:
 		case PIPE_VIDEO_PROFILE_HEVC_MAIN_10:
 			return 186;

commit a136b8bfe2b1c8912a66eb2ae854b207f7732429
Author: Jordan Justen <jordan.l.justen@intel.com>
Date:   Sun May 22 22:31:06 2016 -0700

    i965: Remove old CS local ID handling
    
    The old method pushed data for each channels uvec3 data of
    gl_LocalInvocationID.
    
    The new method pushes 1 dword of data that is a 'thread local ID'
    value. Based on that value, we can generate gl_LocalInvocationIndex
    and gl_LocalInvocationID with some calculations.
    
    Cc: "12.0" <mesa-stable@lists.freedesktop.org>
    Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
    (cherry picked from commit 0a3acff5b53d409181dcd2f31a4a50af06f73a57)

diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c
index edaaa3d..3d37de2 100644
--- a/src/intel/vulkan/anv_cmd_buffer.c
+++ b/src/intel/vulkan/anv_cmd_buffer.c
@@ -1094,13 +1094,10 @@ anv_cmd_buffer_cs_push_constants(struct anv_cmd_buffer *cmd_buffer)
    }
 
    if (cs_prog_data->push.per_thread.size > 0) {
-      brw_cs_fill_local_id_payload(cs_prog_data, u32_map, cs_prog_data->threads,
-                                   cs_prog_data->push.per_thread.size);
       for (unsigned t = 0; t < cs_prog_data->threads; t++) {
          unsigned dst =
             8 * (cs_prog_data->push.per_thread.regs * t +
-                 cs_prog_data->push.cross_thread.regs +
-                 cs_prog_data->local_invocation_id_regs);
+                 cs_prog_data->push.cross_thread.regs);
          unsigned src = cs_prog_data->push.cross_thread.dwords;
          for ( ; src < prog_data->nr_params; src++, dst++) {
             if (src != cs_prog_data->thread_local_id_index) {
diff --git a/src/mesa/drivers/dri/i965/brw_compiler.h b/src/mesa/drivers/dri/i965/brw_compiler.h
index dda6297..6e6d20c 100644
--- a/src/mesa/drivers/dri/i965/brw_compiler.h
+++ b/src/mesa/drivers/dri/i965/brw_compiler.h
@@ -439,7 +439,6 @@ struct brw_cs_prog_data {
    unsigned threads;
    bool uses_barrier;
    bool uses_num_work_groups;
-   unsigned local_invocation_id_regs;
    int thread_local_id_index;
 
    struct {
@@ -831,13 +830,6 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data,
                unsigned *final_assembly_size,
                char **error_str);
 
-/**
- * Fill out local id payload for compute shader according to cs_prog_data.
- */
-void
-brw_cs_fill_local_id_payload(const struct brw_cs_prog_data *cs_prog_data,
-                             void *buffer, uint32_t threads, uint32_t stride);
-
 #ifdef __cplusplus
 } /* extern "C" */
 #endif
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 0b766a4..9abe73a 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -5581,31 +5581,6 @@ fs_visitor::setup_vs_payload()
    payload.num_regs = 2;
 }
 
-/**
- * We are building the local ID push constant data using the simplest possible
- * method. We simply push the local IDs directly as they should appear in the
- * registers for the uvec3 gl_LocalInvocationID variable.
- *
- * Therefore, for SIMD8, we use 3 full registers, and for SIMD16 we use 6
- * registers worth of push constant space.
- *
- * Note: Any updates to brw_cs_prog_local_id_payload_dwords,
- * fill_local_id_payload or fs_visitor::emit_cs_local_invocation_id_setup need
- * to coordinated.
- *
- * FINISHME: There are a few easy optimizations to consider.
- *
- * 1. If gl_WorkGroupSize x, y or z is 1, we can just use zero, and there is
- *    no need for using push constant space for that dimension.
- *
- * 2. Since GL_MAX_COMPUTE_WORK_GROUP_SIZE is currently 1024 or less, we can
- *    easily use 16-bit words rather than 32-bit dwords in the push constant
- *    data.
- *
- * 3. If gl_WorkGroupSize x, y or z is small, then we can use bytes for
- *    conveying the data, and thereby reduce push constant usage.
- *
- */
 void
 fs_visitor::setup_gs_payload()
 {
@@ -5649,16 +5624,7 @@ void
 fs_visitor::setup_cs_payload()
 {
    assert(devinfo->gen >= 7);
-   brw_cs_prog_data *prog_data = (brw_cs_prog_data*) this->prog_data;
-
    payload.num_regs = 1;
-
-   if (nir->info.system_values_read & SYSTEM_BIT_LOCAL_INVOCATION_ID &&
-       prog_data->thread_local_id_index < 0) {
-      prog_data->local_invocation_id_regs = dispatch_width * 3 / 8;
-      payload.local_invocation_id_reg = payload.num_regs;
-      payload.num_regs += prog_data->local_invocation_id_regs;
-   }
 }
 
 void
@@ -6533,25 +6499,6 @@ brw_compile_fs(const struct brw_compiler *compiler, void *log_data,
 }
 
 fs_reg *
-fs_visitor::emit_cs_local_invocation_id_setup()
-{
-   assert(stage == MESA_SHADER_COMPUTE);
-
-   fs_reg *reg = new(this->mem_ctx) fs_reg(vgrf(glsl_type::uvec3_type));
-
-   struct brw_reg src =
-      brw_vec8_grf(payload.local_invocation_id_reg, 0);
-   src = retype(src, BRW_REGISTER_TYPE_UD);
-   bld.MOV(*reg, src);
-   src.nr += dispatch_width / 8;
-   bld.MOV(offset(*reg, bld, 1), src);
-   src.nr += dispatch_width / 8;
-   bld.MOV(offset(*reg, bld, 2), src);
-
-   return reg;
-}
-
-fs_reg *
 fs_visitor::emit_cs_work_group_id_setup()
 {
    assert(stage == MESA_SHADER_COMPUTE);
@@ -6597,9 +6544,7 @@ cs_fill_push_const_info(const struct brw_device_info *devinfo,
    unsigned cross_thread_dwords, per_thread_dwords;
    if (!cross_thread_supported) {
       cross_thread_dwords = 0u;
-      per_thread_dwords =
-         8 * cs_prog_data->local_invocation_id_regs +
-         prog_data->nr_params;
+      per_thread_dwords = prog_data->nr_params;
    } else if (fill_thread_id) {
       /* Fill all but the last register with cross-thread payload */
       cross_thread_dwords = 8 * (cs_prog_data->thread_local_id_index / 8);
@@ -6623,7 +6568,6 @@ cs_fill_push_const_info(const struct brw_device_info *devinfo,
           cs_prog_data->push.per_thread.size == 0);
    assert(cs_prog_data->push.cross_thread.dwords +
           cs_prog_data->push.per_thread.dwords ==
-             8 * cs_prog_data->local_invocation_id_regs +
              prog_data->nr_params);
 }
 
@@ -6768,39 +6712,3 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data,
 
    return g.get_assembly(final_assembly_size);
 }
-
-void
-brw_cs_fill_local_id_payload(const struct brw_cs_prog_data *prog_data,
-                             void *buffer, uint32_t threads, uint32_t stride)
-{
-   if (prog_data->local_invocation_id_regs == 0)
-      return;
-
-   /* 'stride' should be an integer number of registers, that is, a multiple
-    * of 32 bytes.


Reply to: