intel: Add a new "common" library for more code sharing

The first thing to go in this new library is brw_device_info.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Jason Ekstrand 2016-08-22 14:47:55 -07:00
parent 4218c32166
commit 55364ab5b7
20 changed files with 77 additions and 9 deletions

View File

@ -0,0 +1,35 @@
# 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.
# ---------------------------------------
# Build libmesa_intel_common
# ---------------------------------------
include $(CLEAR_VARS)
LOCAL_MODULE := libmesa_intel_common
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_SRC_FILES := $(COMMON_FILES)
include $(MESA_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)

View File

@ -26,5 +26,6 @@ LOCAL_PATH := $(call my-dir)
include $(LOCAL_PATH)/Makefile.sources
include $(LOCAL_PATH)/Android.blorp.mk
include $(LOCAL_PATH)/Android.common.mk
include $(LOCAL_PATH)/Android.genxml.mk
include $(LOCAL_PATH)/Android.isl.mk

View File

@ -53,6 +53,7 @@ CLEANFILES =
EXTRA_DIST =
include Makefile.blorp.am
include Makefile.common.am
include Makefile.genxml.am
include Makefile.isl.am

View File

@ -0,0 +1,24 @@
# Copyright © 2016 Intel Corporation
#
# 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.
noinst_LTLIBRARIES += common/libintel_common.la
common_libintel_common_la_SOURCES = $(COMMON_FILES)

View File

@ -72,6 +72,7 @@ check_PROGRAMS += isl/tests/isl_surf_get_image_offset_test
TESTS += $(check_PROGRAMS)
isl_tests_isl_surf_get_image_offset_test_LDADD = \
common/libintel_common.la \
isl/libisl.la \
$(top_builddir)/src/mesa/drivers/dri/i965/libi965_compiler.la \
-lm

View File

@ -6,6 +6,10 @@ BLORP_FILES = \
blorp/blorp_genX_exec.h \
blorp/blorp_priv.h
COMMON_FILES = \
common/brw_device_info.c \
common/brw_device_info.h
GENXML_GENERATED_FILES = \
genxml/gen4_pack.h \
genxml/gen45_pack.h \

View File

@ -22,7 +22,7 @@
*/
#include "blorp_priv.h"
#include "brw_device_info.h"
#include "common/brw_device_info.h"
#include "intel_aub.h"
/**

View File

@ -24,7 +24,7 @@
#include <assert.h>
#include "isl.h"
#include "brw_device_info.h"
#include "common/brw_device_info.h"
struct surface_format_info {
bool exists;

View File

@ -26,7 +26,7 @@
#include <assert.h>
#include <strings.h>
#include "brw_device_info.h"
#include "common/brw_device_info.h"
#include "util/macros.h"
#include "isl.h"

View File

@ -26,7 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "brw_device_info.h"
#include "common/brw_device_info.h"
#include "isl/isl.h"
#include "isl/isl_priv.h"

View File

@ -37,6 +37,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/intel
aubinator_DEPS = \
$(top_builddir)/src/intel/common/libintel_common.la \
$(top_builddir)/src/mesa/drivers/dri/i965/libi965_compiler.la \
$(top_builddir)/src/util/libmesautil.la \
$(PER_GEN_LIBS) \

View File

@ -117,6 +117,7 @@ VULKAN_LIB_DEPS += \
$(top_builddir)/src/mesa/drivers/dri/i965/libi965_compiler.la \
$(top_builddir)/src/compiler/nir/libnir.la \
$(top_builddir)/src/util/libmesautil.la \
$(top_builddir)/src/intel/common/libintel_common.la \
$(top_builddir)/src/intel/isl/libisl.la \
$(PER_GEN_LIBS) \
$(PTHREAD_LIBS) \

View File

@ -40,7 +40,7 @@
#define VG(x)
#endif
#include "brw_device_info.h"
#include "common/brw_device_info.h"
#include "brw_compiler.h"
#include "util/macros.h"
#include "util/list.h"

View File

@ -183,6 +183,7 @@ LOCAL_SRC_FILES := \
LOCAL_WHOLE_STATIC_LIBRARIES := \
$(MESA_DRI_WHOLE_STATIC_LIBRARIES) \
$(I965_PERGEN_LIBS) \
libmesa_intel_common \
libmesa_blorp \
libmesa_isl

View File

@ -78,6 +78,7 @@ noinst_LTLIBRARIES = \
libi965_dri_la_SOURCES = $(i965_FILES)
libi965_dri_la_LIBADD = \
$(top_builddir)/src/intel/common/libintel_common.la \
$(top_builddir)/src/intel/isl/libisl.la \
libi965_compiler.la \
$(top_builddir)/src/intel/blorp/libblorp.la \

View File

@ -6,8 +6,6 @@ i965_compiler_FILES = \
brw_dead_control_flow.cpp \
brw_dead_control_flow.h \
brw_defines.h \
brw_device_info.c \
brw_device_info.h \
brw_disasm.c \
brw_eu.c \
brw_eu_compact.c \

View File

@ -24,7 +24,7 @@
#pragma once
#include <stdio.h>
#include "brw_device_info.h"
#include "common/brw_device_info.h"
#include "main/mtypes.h"
#include "main/macros.h"

View File

@ -33,7 +33,7 @@
#include "dri_util.h"
#include "intel_bufmgr.h"
#include "brw_device_info.h"
#include "common/brw_device_info.h"
#include "i915_drm.h"
#include "xmlconfig.h"