summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-08-19 04:27:18 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-08-29 12:17:34 -0700
commit348509269ead23cb7f953c174d400e6e3d17d723 (patch)
treeb72ea058928189d5f56b605ca21447206df23834
parent8bd35d8bd2bff51b39baf559efd9f3a0e20fd2b0 (diff)
i965: Move blorp into src/intel/blorp
At this point, blorp is completely driver agnostic and can be safely moved into its own folder. Soon, we hope to start using it for doing blits in the Vulkan driver. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
-rw-r--r--src/intel/Android.blorp.mk47
-rw-r--r--src/intel/Android.mk1
-rw-r--r--src/intel/Makefile.am2
-rw-r--r--src/intel/Makefile.blorp.am24
-rw-r--r--src/intel/Makefile.sources8
-rw-r--r--src/intel/blorp/blorp.c (renamed from src/mesa/drivers/dri/i965/blorp.c)2
-rw-r--r--src/intel/blorp/blorp.h (renamed from src/mesa/drivers/dri/i965/blorp.h)0
-rw-r--r--src/intel/blorp/blorp_blit.c (renamed from src/mesa/drivers/dri/i965/blorp_blit.c)0
-rw-r--r--src/intel/blorp/blorp_clear.c (renamed from src/mesa/drivers/dri/i965/blorp_clear.c)2
-rw-r--r--src/intel/blorp/blorp_genX_exec.h (renamed from src/mesa/drivers/dri/i965/genX_blorp_exec.h)0
-rw-r--r--src/intel/blorp/blorp_priv.h (renamed from src/mesa/drivers/dri/i965/blorp_priv.h)0
-rw-r--r--src/mesa/drivers/dri/i965/Android.mk1
-rw-r--r--src/mesa/drivers/dri/i965/Makefile.am1
-rw-r--r--src/mesa/drivers/dri/i965/Makefile.sources20
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp.h2
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h2
-rw-r--r--src/mesa/drivers/dri/i965/genX_blorp_exec.c2
-rw-r--r--src/mesa/drivers/dri/i965/intel_resolve_map.h2
18 files changed, 96 insertions, 20 deletions
diff --git a/src/intel/Android.blorp.mk b/src/intel/Android.blorp.mk
new file mode 100644
index 0000000000..268d5ebfa7
--- /dev/null
+++ b/src/intel/Android.blorp.mk
@@ -0,0 +1,47 @@
+# 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_blorp
+# ---------------------------------------
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libmesa_blorp
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+
+LOCAL_SRC_FILES := $(BLORP_FILES)
+
+LOCAL_C_INCLUDES := := \
+ $(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_nir,,)/nir \
+ $(MESA_TOP)/src/gallium/auxiliary \
+ $(MESA_TOP)/src/gallium/include \
+ $(MESA_TOP)/src/mapi \
+ $(MESA_TOP)/src/mesa \
+ $(MESA_TOP)/src/mesa/drivers/dri/i965
+
+LOCAL_STATIC_LIBRARIES := libmesa_nir
+
+LOCAL_SHARED_LIBRARIES := libdrm_intel
+
+include $(MESA_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
diff --git a/src/intel/Android.mk b/src/intel/Android.mk
index 114b111eba..0e9c29dfa2 100644
--- a/src/intel/Android.mk
+++ b/src/intel/Android.mk
@@ -25,5 +25,6 @@ LOCAL_PATH := $(call my-dir)
# Import variables
include $(LOCAL_PATH)/Makefile.sources
+include $(LOCAL_PATH)/Android.blorp.mk
include $(LOCAL_PATH)/Android.genxml.mk
include $(LOCAL_PATH)/Android.isl.mk
diff --git a/src/intel/Makefile.am b/src/intel/Makefile.am
index 3b7d2f3a85..fa4570d18a 100644
--- a/src/intel/Makefile.am
+++ b/src/intel/Makefile.am
@@ -26,6 +26,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_builddir)/src \
-I$(top_srcdir)/src \
+ -I$(top_builddir)/src/compiler/nir \
-I$(top_builddir)/src/intel \
-I$(top_srcdir)/src/intel \
-I$(top_srcdir)/src/mapi \
@@ -51,6 +52,7 @@ BUILT_SOURCES =
CLEANFILES =
EXTRA_DIST =
+include Makefile.blorp.am
include Makefile.genxml.am
include Makefile.isl.am
diff --git a/src/intel/Makefile.blorp.am b/src/intel/Makefile.blorp.am
new file mode 100644
index 0000000000..36d99dfa1f
--- /dev/null
+++ b/src/intel/Makefile.blorp.am
@@ -0,0 +1,24 @@
+# Copyright 2015-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 += blorp/libblorp.la
+
+blorp_libblorp_la_SOURCES = $(BLORP_FILES)
diff --git a/src/intel/Makefile.sources b/src/intel/Makefile.sources
index a8ba0b9a17..fcf85eacfc 100644
--- a/src/intel/Makefile.sources
+++ b/src/intel/Makefile.sources
@@ -1,3 +1,11 @@
+BLORP_FILES = \
+ blorp/blorp.c \
+ blorp/blorp.h \
+ blorp/blorp_blit.c \
+ blorp/blorp_clear.c \
+ blorp/blorp_genX_exec.h \
+ blorp/blorp_priv.h
+
GENXML_GENERATED_FILES = \
genxml/gen4_pack.h \
genxml/gen45_pack.h \
diff --git a/src/mesa/drivers/dri/i965/blorp.c b/src/intel/blorp/blorp.c
index 8640abe146..4dbba01748 100644
--- a/src/mesa/drivers/dri/i965/blorp.c
+++ b/src/intel/blorp/blorp.c
@@ -23,6 +23,8 @@
#include <errno.h>
+#include "program/prog_instruction.h"
+
#include "blorp_priv.h"
#include "brw_compiler.h"
#include "brw_nir.h"
diff --git a/src/mesa/drivers/dri/i965/blorp.h b/src/intel/blorp/blorp.h
index a4fcfdfcf7..a4fcfdfcf7 100644
--- a/src/mesa/drivers/dri/i965/blorp.h
+++ b/src/intel/blorp/blorp.h
diff --git a/src/mesa/drivers/dri/i965/blorp_blit.c b/src/intel/blorp/blorp_blit.c
index 170c3816e3..170c3816e3 100644
--- a/src/mesa/drivers/dri/i965/blorp_blit.c
+++ b/src/intel/blorp/blorp_blit.c
diff --git a/src/mesa/drivers/dri/i965/blorp_clear.c b/src/intel/blorp/blorp_clear.c
index 4ab0fe137a..a371dfd31e 100644
--- a/src/mesa/drivers/dri/i965/blorp_clear.c
+++ b/src/intel/blorp/blorp_clear.c
@@ -26,7 +26,7 @@
#include "blorp_priv.h"
#include "brw_defines.h"
-#include "nir_builder.h"
+#include "compiler/nir/nir_builder.h"
#define FILE_DEBUG_FLAG DEBUG_BLORP
diff --git a/src/mesa/drivers/dri/i965/genX_blorp_exec.h b/src/intel/blorp/blorp_genX_exec.h
index f44076e129..f44076e129 100644
--- a/src/mesa/drivers/dri/i965/genX_blorp_exec.h
+++ b/src/intel/blorp/blorp_genX_exec.h
diff --git a/src/mesa/drivers/dri/i965/blorp_priv.h b/src/intel/blorp/blorp_priv.h
index 33f197b523..33f197b523 100644
--- a/src/mesa/drivers/dri/i965/blorp_priv.h
+++ b/src/intel/blorp/blorp_priv.h
diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk
index 971c3c58e8..335850a8d8 100644
--- a/src/mesa/drivers/dri/i965/Android.mk
+++ b/src/mesa/drivers/dri/i965/Android.mk
@@ -183,6 +183,7 @@ LOCAL_SRC_FILES := \
LOCAL_WHOLE_STATIC_LIBRARIES := \
$(MESA_DRI_WHOLE_STATIC_LIBRARIES) \
$(I965_PERGEN_LIBS) \
+ libmesa_blorp \
libmesa_isl
LOCAL_SHARED_LIBRARIES := \
diff --git a/src/mesa/drivers/dri/i965/Makefile.am b/src/mesa/drivers/dri/i965/Makefile.am
index d6bafed300..14dbb9cd6d 100644
--- a/src/mesa/drivers/dri/i965/Makefile.am
+++ b/src/mesa/drivers/dri/i965/Makefile.am
@@ -79,6 +79,7 @@ libi965_dri_la_SOURCES = $(i965_FILES)
libi965_dri_la_LIBADD = \
$(top_builddir)/src/intel/isl/libisl.la \
libi965_compiler.la \
+ $(top_builddir)/src/intel/blorp/libblorp.la \
$(I965_PERGEN_LIBS) \
$(INTEL_LIBS)
diff --git a/src/mesa/drivers/dri/i965/Makefile.sources b/src/mesa/drivers/dri/i965/Makefile.sources
index c97486c2de..9ff5cebeab 100644
--- a/src/mesa/drivers/dri/i965/Makefile.sources
+++ b/src/mesa/drivers/dri/i965/Makefile.sources
@@ -95,11 +95,6 @@ i965_compiler_GENERATED_FILES = \
brw_nir_trig_workarounds.c
i965_FILES = \
- blorp.c \
- blorp.h \
- blorp_blit.c \
- blorp_clear.c \
- blorp_priv.h \
brw_binding_tables.c \
brw_blorp.c \
brw_blorp.h \
@@ -259,21 +254,16 @@ i965_FILES = \
intel_upload.c
i965_gen6_FILES = \
- genX_blorp_exec.c \
- genX_blorp_exec.h
+ genX_blorp_exec.c
i965_gen7_FILES = \
- genX_blorp_exec.c \
- genX_blorp_exec.h
+ genX_blorp_exec.c
i965_gen75_FILES = \
- genX_blorp_exec.c \
- genX_blorp_exec.h
+ genX_blorp_exec.c
i965_gen8_FILES = \
- genX_blorp_exec.c \
- genX_blorp_exec.h
+ genX_blorp_exec.c
i965_gen9_FILES = \
- genX_blorp_exec.c \
- genX_blorp_exec.h
+ genX_blorp_exec.c
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h
index f66f13e762..afbf68f419 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.h
+++ b/src/mesa/drivers/dri/i965/brw_blorp.h
@@ -23,7 +23,7 @@
#pragma once
-#include "blorp.h"
+#include "blorp/blorp.h"
#include "intel_mipmap_tree.h"
#include "program/prog_instruction.h"
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index a76b25f0b9..bcda0ab74c 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -41,7 +41,7 @@
#include "intel_aub.h"
#include "isl/isl.h"
-#include "blorp.h"
+#include "blorp/blorp.h"
#ifdef __cplusplus
extern "C" {
diff --git a/src/mesa/drivers/dri/i965/genX_blorp_exec.c b/src/mesa/drivers/dri/i965/genX_blorp_exec.c
index a4a4af94ef..2e62c70ee6 100644
--- a/src/mesa/drivers/dri/i965/genX_blorp_exec.c
+++ b/src/mesa/drivers/dri/i965/genX_blorp_exec.c
@@ -29,7 +29,7 @@
#include "brw_context.h"
#include "brw_state.h"
-#include "genX_blorp_exec.h"
+#include "blorp/blorp_genX_exec.h"
#include "brw_blorp.h"
diff --git a/src/mesa/drivers/dri/i965/intel_resolve_map.h b/src/mesa/drivers/dri/i965/intel_resolve_map.h
index 672a4aaba7..e998e97e6d 100644
--- a/src/mesa/drivers/dri/i965/intel_resolve_map.h
+++ b/src/mesa/drivers/dri/i965/intel_resolve_map.h
@@ -24,7 +24,7 @@
#pragma once
#include <stdint.h>
-#include "blorp.h"
+#include "blorp/blorp.h"
#include "compiler/glsl/list.h"
#ifdef __cplusplus