<div dir="ltr">+Mauro<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 31, 2016 at 1:56 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The first thing to go in this new library is brw_device_info.<br>
<br>
Signed-off-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
Cc: Rob Herring <<a href="mailto:robh@kernel.org">robh@kernel.org</a>><br>
---<br>
<br>
The android build files I just copied-and-pasted from blorp but I don't<br>
have an android build setup so I can't test them.<br>
<br>
src/intel/<a href="http://Android.common.mk" rel="noreferrer" target="_blank">Android.common.mk</a> | 37 ++++++++++++++++++++++<br>
src/intel/Android.mk | 1 +<br>
src/intel/Makefile.am | 1 +<br>
src/intel/<a href="http://Makefile.common.am" rel="noreferrer" target="_blank">Makefile.common.am</a> | 24 ++++++++++++++<br>
src/intel/<a href="http://Makefile.isl.am" rel="noreferrer" target="_blank">Makefile.isl.am</a> | 1 +<br>
src/intel/Makefile.sources | 4 +++<br>
src/intel/blorp/blorp_genX_<wbr>exec.h | 2 +-<br>
.../dri/i965 => intel/common}/brw_device_info.<wbr>c | 0<br>
.../dri/i965 => intel/common}/brw_device_info.<wbr>h | 0<br>
src/intel/isl/isl_format.c | 2 +-<br>
src/intel/isl/isl_priv.h | 2 +-<br>
.../isl/tests/isl_surf_get_<wbr>image_offset_test.c | 2 +-<br>
src/intel/tools/Makefile.am | 1 +<br>
src/intel/vulkan/Makefile.am | 1 +<br>
src/intel/vulkan/anv_private.h | 2 +-<br>
src/mesa/drivers/dri/i965/<wbr>Android.mk | 1 +<br>
src/mesa/drivers/dri/i965/<wbr>Makefile.am | 1 +<br>
src/mesa/drivers/dri/i965/<wbr>Makefile.sources | 2 --<br>
src/mesa/drivers/dri/i965/brw_<wbr>compiler.h | 2 +-<br>
src/mesa/drivers/dri/i965/<wbr>intel_screen.h | 2 +-<br>
20 files changed, 79 insertions(+), 9 deletions(-)<br>
create mode 100644 src/intel/<a href="http://Android.common.mk" rel="noreferrer" target="_blank">Android.common.mk</a><br>
create mode 100644 src/intel/<a href="http://Makefile.common.am" rel="noreferrer" target="_blank">Makefile.common.am</a><br>
rename src/{mesa/drivers/dri/i965 => intel/common}/brw_device_info.<wbr>c (100%)<br>
rename src/{mesa/drivers/dri/i965 => intel/common}/brw_device_info.<wbr>h (100%)<br>
<br>
diff --git a/src/intel/<a href="http://Android.common.mk" rel="noreferrer" target="_blank">Android.common.mk</a> b/src/intel/<a href="http://Android.common.mk" rel="noreferrer" target="_blank">Android.common.mk</a><br>
new file mode 100644<br>
index 0000000..512bcd7<br>
--- /dev/null<br>
+++ b/src/intel/<a href="http://Android.common.mk" rel="noreferrer" target="_blank">Android.common.mk</a><br>
@@ -0,0 +1,37 @@<br>
+# Copyright © 2016 Intel Corporation<br>
+# Copyright © 2016 Mauro Rossi <<a href="mailto:issor.oruam@gmail.com">issor.oruam@gmail.com</a>><br>
+#<br>
+# Permission is hereby granted, free of charge, to any person obtaining a<br>
+# copy of this software and associated documentation files (the "Software"),<br>
+# to deal in the Software without restriction, including without limitation<br>
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,<br>
+# and/or sell copies of the Software, and to permit persons to whom the<br>
+# Software is furnished to do so, subject to the following conditions:<br>
+#<br>
+# The above copyright notice and this permission notice shall be included<br>
+# in all copies or substantial portions of the Software.<br>
+#<br>
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br>
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br>
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL<br>
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br>
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING<br>
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER<br>
+# DEALINGS IN THE SOFTWARE.<br>
+<br>
+# ------------------------------<wbr>---------<br>
+# Build libintel_common<br>
+# ------------------------------<wbr>---------<br>
+<br>
+include $(CLEAR_VARS)<br>
+<br>
+LOCAL_MODULE := libintel_common<br>
+<br>
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES<br>
+<br>
+LOCAL_SRC_FILES := $(COMMON_FILES)<br>
+<br>
+LOCAL_C_INCLUDES :=<br>
+<br>
+include $(MESA_COMMON_MK)<br>
+include $(BUILD_STATIC_LIBRARY)<br>
diff --git a/src/intel/Android.mk b/src/intel/Android.mk<br>
index 0e9c29d..3d501ab 100644<br>
--- a/src/intel/Android.mk<br>
+++ b/src/intel/Android.mk<br>
@@ -26,5 +26,6 @@ LOCAL_PATH := $(call my-dir)<br>
include $(LOCAL_PATH)/Makefile.sources<br>
<br>
include $(LOCAL_PATH)/<a href="http://Android.blorp.mk" rel="noreferrer" target="_blank">Android.blorp.mk</a><br>
+include $(LOCAL_PATH)/<a href="http://Android.common.mk" rel="noreferrer" target="_blank">Android.common.<wbr>mk</a><br>
include $(LOCAL_PATH)/<a href="http://Android.genxml.mk" rel="noreferrer" target="_blank">Android.genxml.<wbr>mk</a><br>
include $(LOCAL_PATH)/<a href="http://Android.isl.mk" rel="noreferrer" target="_blank">Android.isl.mk</a><br>
diff --git a/src/intel/Makefile.am b/src/intel/Makefile.am<br>
index fa4570d..9186b5c 100644<br>
--- a/src/intel/Makefile.am<br>
+++ b/src/intel/Makefile.am<br>
@@ -53,6 +53,7 @@ CLEANFILES =<br>
EXTRA_DIST =<br>
<br>
include <a href="http://Makefile.blorp.am" rel="noreferrer" target="_blank">Makefile.blorp.am</a><br>
+include <a href="http://Makefile.common.am" rel="noreferrer" target="_blank">Makefile.common.am</a><br>
include <a href="http://Makefile.genxml.am" rel="noreferrer" target="_blank">Makefile.genxml.am</a><br>
include <a href="http://Makefile.isl.am" rel="noreferrer" target="_blank">Makefile.isl.am</a><br>
<br>
diff --git a/src/intel/<a href="http://Makefile.common.am" rel="noreferrer" target="_blank">Makefile.common.am</a> b/src/intel/<a href="http://Makefile.common.am" rel="noreferrer" target="_blank">Makefile.common.am</a><br>
new file mode 100644<br>
index 0000000..a8be54a<br>
--- /dev/null<br>
+++ b/src/intel/<a href="http://Makefile.common.am" rel="noreferrer" target="_blank">Makefile.common.am</a><br>
@@ -0,0 +1,24 @@<br>
+# Copyright © 2016 Intel Corporation<br>
+#<br>
+# Permission is hereby granted, free of charge, to any person obtaining a<br>
+# copy of this software and associated documentation files (the "Software"),<br>
+# to deal in the Software without restriction, including without limitation<br>
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,<br>
+# and/or sell copies of the Software, and to permit persons to whom the<br>
+# Software is furnished to do so, subject to the following conditions:<br>
+#<br>
+# The above copyright notice and this permission notice (including the next<br>
+# paragraph) shall be included in all copies or substantial portions of the<br>
+# Software.<br>
+#<br>
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br>
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br>
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL<br>
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br>
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING<br>
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS<br>
+# IN THE SOFTWARE.<br>
+<br>
+noinst_LTLIBRARIES += common/<a href="http://libintel_common.la" rel="noreferrer" target="_blank">libintel_common.la</a><br>
+<br>
+common_libintel_common_la_<wbr>SOURCES = $(COMMON_FILES)<br>
diff --git a/src/intel/<a href="http://Makefile.isl.am" rel="noreferrer" target="_blank">Makefile.isl.am</a> b/src/intel/<a href="http://Makefile.isl.am" rel="noreferrer" target="_blank">Makefile.isl.am</a><br>
index 8871684..5a317f5 100644<br>
--- a/src/intel/<a href="http://Makefile.isl.am" rel="noreferrer" target="_blank">Makefile.isl.am</a><br>
+++ b/src/intel/<a href="http://Makefile.isl.am" rel="noreferrer" target="_blank">Makefile.isl.am</a><br>
@@ -72,6 +72,7 @@ check_PROGRAMS += isl/tests/isl_surf_get_image_<wbr>offset_test<br>
TESTS += $(check_PROGRAMS)<br>
<br>
isl_tests_isl_surf_get_image_<wbr>offset_test_LDADD = \<br>
+ common/<a href="http://libintel_common.la" rel="noreferrer" target="_blank">libintel_common.la</a> \<br>
isl/<a href="http://libisl.la" rel="noreferrer" target="_blank">libisl.la</a> \<br>
$(top_builddir)/src/mesa/<wbr>drivers/dri/i965/<a href="http://libi965_compiler.la" rel="noreferrer" target="_blank">libi965_<wbr>compiler.la</a> \<br>
-lm<br>
diff --git a/src/intel/Makefile.sources b/src/intel/Makefile.sources<br>
index fcf85ea..97f2328 100644<br>
--- a/src/intel/Makefile.sources<br>
+++ b/src/intel/Makefile.sources<br>
@@ -6,6 +6,10 @@ BLORP_FILES = \<br>
blorp/blorp_genX_exec.h \<br>
blorp/blorp_priv.h<br>
<br>
+COMMON_FILES = \<br>
+ common/brw_device_info.c \<br>
+ common/brw_device_info.h<br>
+<br>
GENXML_GENERATED_FILES = \<br>
genxml/gen4_pack.h \<br>
genxml/gen45_pack.h \<br>
diff --git a/src/intel/blorp/blorp_genX_<wbr>exec.h b/src/intel/blorp/blorp_genX_<wbr>exec.h<br>
index 966e4b3..461cfe0 100644<br>
--- a/src/intel/blorp/blorp_genX_<wbr>exec.h<br>
+++ b/src/intel/blorp/blorp_genX_<wbr>exec.h<br>
@@ -22,7 +22,7 @@<br>
*/<br>
<br>
#include "blorp_priv.h"<br>
-#include "brw_device_info.h"<br>
+#include "common/brw_device_info.h"<br>
#include "intel_aub.h"<br>
<br>
/**<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_device_info.c b/src/intel/common/brw_device_<wbr>info.c<br>
similarity index 100%<br>
rename from src/mesa/drivers/dri/i965/brw_<wbr>device_info.c<br>
rename to src/intel/common/brw_device_<wbr>info.c<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_device_info.h b/src/intel/common/brw_device_<wbr>info.h<br>
similarity index 100%<br>
rename from src/mesa/drivers/dri/i965/brw_<wbr>device_info.h<br>
rename to src/intel/common/brw_device_<wbr>info.h<br>
diff --git a/src/intel/isl/isl_format.c b/src/intel/isl/isl_format.c<br>
index 8507cc5..c41a0bf 100644<br>
--- a/src/intel/isl/isl_format.c<br>
+++ b/src/intel/isl/isl_format.c<br>
@@ -24,7 +24,7 @@<br>
#include <assert.h><br>
<br>
#include "isl.h"<br>
-#include "brw_device_info.h"<br>
+#include "common/brw_device_info.h"<br>
<br>
struct surface_format_info {<br>
bool exists;<br>
diff --git a/src/intel/isl/isl_priv.h b/src/intel/isl/isl_priv.h<br>
index 3a7af1a..ab9103e 100644<br>
--- a/src/intel/isl/isl_priv.h<br>
+++ b/src/intel/isl/isl_priv.h<br>
@@ -26,7 +26,7 @@<br>
#include <assert.h><br>
#include <strings.h><br>
<br>
-#include "brw_device_info.h"<br>
+#include "common/brw_device_info.h"<br>
#include "util/macros.h"<br>
<br>
#include "isl.h"<br>
diff --git a/src/intel/isl/tests/isl_<wbr>surf_get_image_offset_test.c b/src/intel/isl/tests/isl_<wbr>surf_get_image_offset_test.c<br>
index 9015f0e..0c9173d 100644<br>
--- a/src/intel/isl/tests/isl_<wbr>surf_get_image_offset_test.c<br>
+++ b/src/intel/isl/tests/isl_<wbr>surf_get_image_offset_test.c<br>
@@ -26,7 +26,7 @@<br>
#include <stdio.h><br>
#include <stdlib.h><br>
<br>
-#include "brw_device_info.h"<br>
+#include "common/brw_device_info.h"<br>
#include "isl/isl.h"<br>
#include "isl/isl_priv.h"<br>
<br>
diff --git a/src/intel/tools/Makefile.am b/src/intel/tools/Makefile.am<br>
index 9f9bb86..5f4d78d 100644<br>
--- a/src/intel/tools/Makefile.am<br>
+++ b/src/intel/tools/Makefile.am<br>
@@ -37,6 +37,7 @@ AM_CPPFLAGS = \<br>
-I$(top_srcdir)/src/intel<br>
<br>
aubinator_DEPS = \<br>
+ $(top_builddir)/src/intel/<wbr>common/<a href="http://libintel_common.la" rel="noreferrer" target="_blank">libintel_common.la</a> \<br>
$(top_builddir)/src/mesa/<wbr>drivers/dri/i965/<a href="http://libi965_compiler.la" rel="noreferrer" target="_blank">libi965_<wbr>compiler.la</a> \<br>
$(top_builddir)/src/util/<a href="http://libmesautil.la" rel="noreferrer" target="_blank">libme<wbr>sautil.la</a> \<br>
$(PER_GEN_LIBS) \<br>
diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am<br>
index 5491a16..2d20de9 100644<br>
--- a/src/intel/vulkan/Makefile.am<br>
+++ b/src/intel/vulkan/Makefile.am<br>
@@ -117,6 +117,7 @@ VULKAN_LIB_DEPS += \<br>
$(top_builddir)/src/mesa/<wbr>drivers/dri/i965/<a href="http://libi965_compiler.la" rel="noreferrer" target="_blank">libi965_<wbr>compiler.la</a> \<br>
$(top_builddir)/src/compiler/<wbr>nir/<a href="http://libnir.la" rel="noreferrer" target="_blank">libnir.la</a> \<br>
$(top_builddir)/src/util/<a href="http://libmesautil.la" rel="noreferrer" target="_blank">libme<wbr>sautil.la</a> \<br>
+ $(top_builddir)/src/intel/<wbr>common/<a href="http://libintel_common.la" rel="noreferrer" target="_blank">libintel_common.la</a> \<br>
$(top_builddir)/src/intel/isl/<a href="http://libisl.la" rel="noreferrer" target="_blank"><wbr>libisl.la</a> \<br>
$(PER_GEN_LIBS) \<br>
$(PTHREAD_LIBS) \<br>
diff --git a/src/intel/vulkan/anv_<wbr>private.h b/src/intel/vulkan/anv_<wbr>private.h<br>
index f24020c..74c1e5b 100644<br>
--- a/src/intel/vulkan/anv_<wbr>private.h<br>
+++ b/src/intel/vulkan/anv_<wbr>private.h<br>
@@ -40,7 +40,7 @@<br>
#define VG(x)<br>
#endif<br>
<br>
-#include "brw_device_info.h"<br>
+#include "common/brw_device_info.h"<br>
#include "brw_compiler.h"<br>
#include "util/macros.h"<br>
#include "util/list.h"<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>Android.mk b/src/mesa/drivers/dri/i965/<wbr>Android.mk<br>
index 335850a..5ff9553 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>Android.mk<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>Android.mk<br>
@@ -183,6 +183,7 @@ LOCAL_SRC_FILES := \<br>
LOCAL_WHOLE_STATIC_LIBRARIES := \<br>
$(MESA_DRI_WHOLE_STATIC_<wbr>LIBRARIES) \<br>
$(I965_PERGEN_LIBS) \<br>
+ libintel_common \<br>
libmesa_blorp \<br>
libmesa_isl<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>Makefile.am b/src/mesa/drivers/dri/i965/<wbr>Makefile.am<br>
index 91559c5..a192fc0 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>Makefile.am<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>Makefile.am<br>
@@ -78,6 +78,7 @@ noinst_LTLIBRARIES = \<br>
<br>
libi965_dri_la_SOURCES = $(i965_FILES)<br>
libi965_dri_la_LIBADD = \<br>
+ $(top_builddir)/src/intel/<wbr>common/<a href="http://libintel_common.la" rel="noreferrer" target="_blank">libintel_common.la</a> \<br>
$(top_builddir)/src/intel/isl/<a href="http://libisl.la" rel="noreferrer" target="_blank"><wbr>libisl.la</a> \<br>
<a href="http://libi965_compiler.la" rel="noreferrer" target="_blank">libi965_compiler.la</a> \<br>
$(top_builddir)/src/intel/<wbr>blorp/<a href="http://libblorp.la" rel="noreferrer" target="_blank">libblorp.la</a> \<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>Makefile.sources b/src/mesa/drivers/dri/i965/<wbr>Makefile.sources<br>
index 9ff5ceb..df90cb4 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>Makefile.sources<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>Makefile.sources<br>
@@ -6,8 +6,6 @@ i965_compiler_FILES = \<br>
brw_dead_control_flow.cpp \<br>
brw_dead_control_flow.h \<br>
brw_defines.h \<br>
- brw_device_info.c \<br>
- brw_device_info.h \<br>
brw_disasm.c \<br>
brw_eu.c \<br>
brw_eu_compact.c \<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_compiler.h b/src/mesa/drivers/dri/i965/<wbr>brw_compiler.h<br>
index 933ab11..b45fba13 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>brw_compiler.h<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_compiler.h<br>
@@ -24,7 +24,7 @@<br>
#pragma once<br>
<br>
#include <stdio.h><br>
-#include "brw_device_info.h"<br>
+#include "common/brw_device_info.h"<br>
#include "main/mtypes.h"<br>
#include "main/macros.h"<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_screen.h b/src/mesa/drivers/dri/i965/<wbr>intel_screen.h<br>
index f62b39f..ab1cc28 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_screen.h<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_screen.h<br>
@@ -33,7 +33,7 @@<br>
<br>
#include "dri_util.h"<br>
#include "intel_bufmgr.h"<br>
-#include "brw_device_info.h"<br>
+#include "common/brw_device_info.h"<br>
#include "i915_drm.h"<br>
#include "xmlconfig.h"<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.5.0.400.gff86faf<br>
<br>
</font></span></blockquote></div><br></div>