[Mesa-dev] [PATCH 08/16] i965/icl: Build and use gen11 functions for genxml state-upload and blorp

Anuj Phogat anuj.phogat at gmail.com
Tue Feb 13 19:15:08 UTC 2018


Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
---
 src/mesa/drivers/dri/i965/Android.mk         | 24 +++++++++++++++++++++++-
 src/mesa/drivers/dri/i965/Makefile.am        |  6 +++++-
 src/mesa/drivers/dri/i965/Makefile.sources   |  4 ++++
 src/mesa/drivers/dri/i965/brw_blorp.c        |  4 ++++
 src/mesa/drivers/dri/i965/brw_blorp.h        |  2 ++
 src/mesa/drivers/dri/i965/brw_state.h        |  1 +
 src/mesa/drivers/dri/i965/brw_state_upload.c |  4 +++-
 src/mesa/drivers/dri/i965/meson.build        |  2 +-
 8 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk
index 39aa33fa9f..83959cbf6c 100644
--- a/src/mesa/drivers/dri/i965/Android.mk
+++ b/src/mesa/drivers/dri/i965/Android.mk
@@ -48,7 +48,8 @@ I965_PERGEN_LIBS := \
 	libmesa_i965_gen75 \
 	libmesa_i965_gen8 \
 	libmesa_i965_gen9 \
-	libmesa_i965_gen10
+	libmesa_i965_gen10 \
+	libmesa_i965_gen11
 
 # ---------------------------------------
 # Build libmesa_i965_gen4
@@ -240,6 +241,27 @@ include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
 
 # ---------------------------------------
+# Build libmesa_i965_gen11
+# ---------------------------------------
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libmesa_i965_gen11
+
+LOCAL_C_INCLUDES := $(I965_PERGEN_COMMON_INCLUDES)
+
+LOCAL_SRC_FILES := $(i965_gen11_FILES)
+
+LOCAL_SHARED_LIBRARIES := $(I965_PERGEN_SHARED_LIBRARIES)
+
+LOCAL_STATIC_LIBRARIES := $(I965_PERGEN_STATIC_LIBRARIES)
+
+LOCAL_CFLAGS := -DGEN_VERSIONx10=110
+
+include $(MESA_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
+
+# ---------------------------------------
 # Build i965_dri
 # ---------------------------------------
 
diff --git a/src/mesa/drivers/dri/i965/Makefile.am b/src/mesa/drivers/dri/i965/Makefile.am
index 79be769c9b..da56f67fa5 100644
--- a/src/mesa/drivers/dri/i965/Makefile.am
+++ b/src/mesa/drivers/dri/i965/Makefile.am
@@ -57,7 +57,8 @@ I965_PERGEN_LIBS = \
 	libi965_gen75.la \
 	libi965_gen8.la \
 	libi965_gen9.la \
-	libi965_gen10.la
+	libi965_gen10.la \
+	libi965_gen11.la
 
 libi965_gen4_la_SOURCES = $(i965_gen4_FILES)
 libi965_gen4_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=40
@@ -86,6 +87,9 @@ libi965_gen9_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=90
 libi965_gen10_la_SOURCES = $(i965_gen10_FILES)
 libi965_gen10_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=100
 
+libi965_gen11_la_SOURCES = $(i965_gen11_FILES)
+libi965_gen11_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=110
+
 noinst_LTLIBRARIES = \
 	libi965_dri.la \
 	$(I965_PERGEN_LIBS)
diff --git a/src/mesa/drivers/dri/i965/Makefile.sources b/src/mesa/drivers/dri/i965/Makefile.sources
index d928f71b43..def5ce701e 100644
--- a/src/mesa/drivers/dri/i965/Makefile.sources
+++ b/src/mesa/drivers/dri/i965/Makefile.sources
@@ -150,6 +150,10 @@ i965_gen10_FILES = \
 	genX_blorp_exec.c \
 	genX_state_upload.c
 
+i965_gen11_FILES = \
+	genX_blorp_exec.c \
+	genX_state_upload.c
+
 i965_oa_GENERATED_FILES = \
 	brw_oa_hsw.h \
 	brw_oa_hsw.c \
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c
index 82d9de1ead..a2eeb55388 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.c
+++ b/src/mesa/drivers/dri/i965/brw_blorp.c
@@ -106,6 +106,10 @@ brw_blorp_init(struct brw_context *brw)
    case 10:
       brw->blorp.exec = gen10_blorp_exec;
       break;
+   case 11:
+      brw->blorp.exec = gen11_blorp_exec;
+      break;
+
    default:
       unreachable("Invalid gen");
    }
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h
index c5ded891bb..579b4dfefc 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.h
+++ b/src/mesa/drivers/dri/i965/brw_blorp.h
@@ -129,6 +129,8 @@ void gen9_blorp_exec(struct blorp_batch *batch,
                      const struct blorp_params *params);
 void gen10_blorp_exec(struct blorp_batch *batch,
                       const struct blorp_params *params);
+void gen11_blorp_exec(struct blorp_batch *batch,
+                      const struct blorp_params *params);
 
 #ifdef __cplusplus
 } /* extern "C" */
diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h
index ad508950f7..709896be3e 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -334,6 +334,7 @@ void gen75_init_atoms(struct brw_context *brw);
 void gen8_init_atoms(struct brw_context *brw);
 void gen9_init_atoms(struct brw_context *brw);
 void gen10_init_atoms(struct brw_context *brw);
+void gen11_init_atoms(struct brw_context *brw);
 
 /* Memory Object Control State:
  * Specifying zero for L3 means "uncached in L3", at least on Haswell
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index 20c59c6e9d..2c8c0f4b27 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -164,7 +164,9 @@ void brw_init_state( struct brw_context *brw )
 
    brw_init_caches(brw);
 
-   if (devinfo->gen >= 10)
+   if (devinfo->gen >= 11)
+      gen11_init_atoms(brw);
+   else if (devinfo->gen >= 10)
       gen10_init_atoms(brw);
    else if (devinfo->gen >= 9)
       gen9_init_atoms(brw);
diff --git a/src/mesa/drivers/dri/i965/meson.build b/src/mesa/drivers/dri/i965/meson.build
index 9adda06183..91a72b715a 100644
--- a/src/mesa/drivers/dri/i965/meson.build
+++ b/src/mesa/drivers/dri/i965/meson.build
@@ -135,7 +135,7 @@ files_i965 = files(
 )
 
 i965_gen_libs = []
-foreach v : ['40', '45', '50', '60', '70', '75', '80', '90', '100']
+foreach v : ['40', '45', '50', '60', '70', '75', '80', '90', '100', '110']
   i965_gen_libs += static_library(
     'libi965_gen at 0@'.format(v),
     ['genX_blorp_exec.c', 'genX_state_upload.c', gen_xml_pack],
-- 
2.13.6



More information about the mesa-dev mailing list