[Mesa-dev] [PATCH 31/31] i965: Move blorp into src/intel/blorp

Jason Ekstrand jason at jlekstrand.net
Fri Aug 19 16:56:08 UTC 2016


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.
---
 configure.ac                                       |  1 +
 src/intel/Makefile.am                              |  2 +-
 src/intel/blorp/Makefile.am                        | 46 ++++++++++++++++++++++
 src/intel/blorp/Makefile.sources                   |  7 ++++
 src/{mesa/drivers/dri/i965 => intel/blorp}/blorp.c |  2 +
 src/{mesa/drivers/dri/i965 => intel/blorp}/blorp.h |  0
 .../drivers/dri/i965 => intel/blorp}/blorp_blit.c  |  0
 .../drivers/dri/i965 => intel/blorp}/blorp_clear.c |  2 +-
 .../blorp/blorp_genX_exec.h}                       |  0
 .../drivers/dri/i965 => intel/blorp}/blorp_priv.h  |  0
 src/mesa/drivers/dri/i965/Makefile.am              |  1 +
 src/mesa/drivers/dri/i965/Makefile.sources         | 20 +++-------
 src/mesa/drivers/dri/i965/brw_blorp.h              |  2 +-
 src/mesa/drivers/dri/i965/brw_context.h            |  2 +-
 src/mesa/drivers/dri/i965/genX_blorp_exec.c        |  2 +-
 src/mesa/drivers/dri/i965/intel_resolve_map.h      |  2 +-
 16 files changed, 68 insertions(+), 21 deletions(-)
 create mode 100644 src/intel/blorp/Makefile.am
 create mode 100644 src/intel/blorp/Makefile.sources
 rename src/{mesa/drivers/dri/i965 => intel/blorp}/blorp.c (99%)
 rename src/{mesa/drivers/dri/i965 => intel/blorp}/blorp.h (100%)
 rename src/{mesa/drivers/dri/i965 => intel/blorp}/blorp_blit.c (100%)
 rename src/{mesa/drivers/dri/i965 => intel/blorp}/blorp_clear.c (99%)
 rename src/{mesa/drivers/dri/i965/genX_blorp_exec.h => intel/blorp/blorp_genX_exec.h} (100%)
 rename src/{mesa/drivers/dri/i965 => intel/blorp}/blorp_priv.h (100%)

diff --git a/configure.ac b/configure.ac
index aea5890..825b7c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2739,6 +2739,7 @@ AC_CONFIG_FILES([Makefile
 		src/glx/tests/Makefile
 		src/gtest/Makefile
 		src/intel/Makefile
+		src/intel/blorp/Makefile
 		src/intel/genxml/Makefile
 		src/intel/isl/Makefile
 		src/intel/vulkan/Makefile
diff --git a/src/intel/Makefile.am b/src/intel/Makefile.am
index 520602d..4ec42ba 100644
--- a/src/intel/Makefile.am
+++ b/src/intel/Makefile.am
@@ -19,4 +19,4 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 # IN THE SOFTWARE.
 
-SUBDIRS = genxml isl
+SUBDIRS = genxml isl blorp
diff --git a/src/intel/blorp/Makefile.am b/src/intel/blorp/Makefile.am
new file mode 100644
index 0000000..ebbfc5d
--- /dev/null
+++ b/src/intel/blorp/Makefile.am
@@ -0,0 +1,46 @@
+# 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.
+
+include Makefile.sources
+
+noinst_LTLIBRARIES = libblorp.la
+
+# The gallium includes are for the util/u_math.h include from main/macros.h
+AM_CPPFLAGS = \
+	-I$(top_srcdir)/include \
+	-I$(top_builddir)/src \
+	-I$(top_srcdir)/src \
+	-I$(top_srcdir)/src/compiler/nir \
+	-I$(top_builddir)/src/intel \
+	-I$(top_srcdir)/src/intel \
+	-I$(top_srcdir)/src/mapi \
+	-I$(top_srcdir)/src/mesa \
+	-I$(top_srcdir)/src/mesa/drivers/dri/i965 \
+	-I$(top_srcdir)/src/gallium/auxiliary \
+	-I$(top_srcdir)/src/gallium/include \
+	-I$(top_builddir)/src/compiler/nir \
+	$(DEFINES) \
+	$(VALGRIND_CFLAGS) \
+	$(INTEL_CFLAGS)
+
+libblorp_la_CFLAGS = $(CFLAGS) -Wno-override-init
+
+libblorp_la_SOURCES = $(BLORP_FILES)
diff --git a/src/intel/blorp/Makefile.sources b/src/intel/blorp/Makefile.sources
new file mode 100644
index 0000000..a999992
--- /dev/null
+++ b/src/intel/blorp/Makefile.sources
@@ -0,0 +1,7 @@
+BLORP_FILES = \
+	blorp.c \
+	blorp.h \
+	blorp_blit.c \
+	blorp_clear.c \
+	blorp_genX_exec.h \
+	blorp_priv.h
diff --git a/src/mesa/drivers/dri/i965/blorp.c b/src/intel/blorp/blorp.c
similarity index 99%
rename from src/mesa/drivers/dri/i965/blorp.c
rename to src/intel/blorp/blorp.c
index e7d7c13..75c204c 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
similarity index 100%
rename from src/mesa/drivers/dri/i965/blorp.h
rename to src/intel/blorp/blorp.h
diff --git a/src/mesa/drivers/dri/i965/blorp_blit.c b/src/intel/blorp/blorp_blit.c
similarity index 100%
rename from src/mesa/drivers/dri/i965/blorp_blit.c
rename to src/intel/blorp/blorp_blit.c
diff --git a/src/mesa/drivers/dri/i965/blorp_clear.c b/src/intel/blorp/blorp_clear.c
similarity index 99%
rename from src/mesa/drivers/dri/i965/blorp_clear.c
rename to src/intel/blorp/blorp_clear.c
index 74df8fc..488523c 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
similarity index 100%
rename from src/mesa/drivers/dri/i965/genX_blorp_exec.h
rename to 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
similarity index 100%
rename from src/mesa/drivers/dri/i965/blorp_priv.h
rename to src/intel/blorp/blorp_priv.h
diff --git a/src/mesa/drivers/dri/i965/Makefile.am b/src/mesa/drivers/dri/i965/Makefile.am
index d6bafed..14dbb9c 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 c97486c..9ff5ceb 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 9c71410..655a6a7 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 b29933a..4ef9f2e 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 f795f93..e8fde75 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"
 
 static void *
 blorp_emit_dwords(struct blorp_context *blorp, void *batch, unsigned n)
diff --git a/src/mesa/drivers/dri/i965/intel_resolve_map.h b/src/mesa/drivers/dri/i965/intel_resolve_map.h
index 672a4aa..e998e97 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
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list