anv: Build for gen12
authorJordan Justen <jordan.l.justen@intel.com>
Wed, 13 Dec 2017 09:18:07 +0000 (01:18 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Wed, 28 Aug 2019 20:38:34 +0000 (13:38 -0700)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/Makefile.sources
src/intel/vulkan/anv_blorp.c
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_entrypoints_gen.py
src/intel/vulkan/anv_private.h
src/intel/vulkan/meson.build

index 43937811ea86f7ad20fd39ecb3f987d08be2a85a..115403983cd2a4145ffcd4dde1dab2b86ef04d87 100644 (file)
@@ -322,6 +322,10 @@ VULKAN_GEN11_FILES := \
        vulkan/gen8_cmd_buffer.c \
        $(VULKAN_GENX_FILES)
 
+VULKAN_GEN12_FILES := \
+       vulkan/gen8_cmd_buffer.c \
+       $(VULKAN_GENX_FILES)
+
 GEN_PERF_XML_FILES = \
        perf/oa-hsw.xml \
        perf/oa-bdw.xml \
index 1ab57fb4e85c6426beb1331a2af7156e274feddf..17f0ffad57636dc559bf14825b890a53aafd82eb 100644 (file)
@@ -117,6 +117,9 @@ anv_device_init_blorp(struct anv_device *device)
    case 11:
       device->blorp.exec = gen11_blorp_exec;
       break;
+   case 12:
+      device->blorp.exec = gen12_blorp_exec;
+      break;
    default:
       unreachable("Unknown hardware generation");
    }
index c55b5233cc77d2d7cbf94255d9fee5d79fa95083..a6572135c9192a632ed16fadc6f35c8239dc1e45 100644 (file)
@@ -415,6 +415,8 @@ anv_physical_device_init(struct anv_physical_device *device,
       intel_logw("Bay Trail Vulkan support is incomplete");
    } else if (device->info.gen >= 8 && device->info.gen <= 11) {
       /* Gen8-11 fully supported */
+   } else if (device->info.gen == 12) {
+      intel_logw("Vulkan is not yet fully supported on gen12");
    } else {
       result = vk_errorf(device->instance, device,
                          VK_ERROR_INCOMPATIBLE_DRIVER,
@@ -2125,6 +2127,9 @@ anv_device_init_dispatch(struct anv_device *device)
 {
    const struct anv_device_dispatch_table *genX_table;
    switch (device->info.gen) {
+   case 12:
+      genX_table = &gen12_device_dispatch_table;
+      break;
    case 11:
       genX_table = &gen11_device_dispatch_table;
       break;
@@ -2524,6 +2529,9 @@ VkResult anv_CreateDevice(
    case 11:
       result = gen11_init_device_state(device);
       break;
+   case 12:
+      result = gen12_init_device_state(device);
+      break;
    default:
       /* Shouldn't get here as we don't create physical devices for any other
        * gens. */
index 4dfde4513f074973988c6e1edcfebe56f0d15398..23ade58ae19abda0b5bef2c2e5071465691a0bfb 100644 (file)
@@ -45,6 +45,7 @@ LAYERS = [
     'gen9',
     'gen10',
     'gen11',
+    'gen12',
 ]
 
 TEMPLATE_H = Template("""\
@@ -383,6 +384,9 @@ anv_resolve_device_entrypoint(const struct gen_device_info *devinfo, uint32_t in
 {
    const struct anv_device_dispatch_table *genX_table;
    switch (devinfo->gen) {
+   case 12:
+      genX_table = &gen12_device_dispatch_table;
+      break;
    case 11:
       genX_table = &gen11_device_dispatch_table;
       break;
index b6bb2019bb34f401c77825ab0da97ac63e4c2ccd..26ce4aa6ddf362f791e0de0d156ec72954577eeb 100644 (file)
@@ -1506,6 +1506,11 @@ _anv_combine_address(struct anv_batch *batch, void *location,
 #define GEN11_MOCS GEN9_MOCS
 #define GEN11_EXTERNAL_MOCS GEN9_EXTERNAL_MOCS
 
+/* TigerLake MOCS */
+#define GEN12_MOCS GEN9_MOCS
+/* TC=1/LLC Only, LeCC=1/Uncacheable, LRUM=0, L3CC=1/Uncacheable */
+#define GEN12_EXTERNAL_MOCS (3 << 1)
+
 struct anv_device_memory {
    struct list_head                             link;
 
@@ -3809,6 +3814,9 @@ ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_ycbcr_conversion, VkSamplerYcbcrConversion)
 #  define genX(x) gen11_##x
 #  include "anv_genX.h"
 #  undef genX
+#  define genX(x) gen12_##x
+#  include "anv_genX.h"
+#  undef genX
 #endif
 
 #endif /* ANV_PRIVATE_H */
index 5aa35738060dfc0daf488d98012adcbf0848861c..87280d173185f65ebca7e7fee042bdd287cda279 100644 (file)
@@ -79,7 +79,8 @@ anv_gen_files = files(
 )
 foreach g : [['70', ['gen7_cmd_buffer.c']], ['75', ['gen7_cmd_buffer.c']],
              ['80', ['gen8_cmd_buffer.c']], ['90', ['gen8_cmd_buffer.c']],
-             ['100', ['gen8_cmd_buffer.c']], ['110', ['gen8_cmd_buffer.c']]]
+             ['100', ['gen8_cmd_buffer.c']], ['110', ['gen8_cmd_buffer.c']],
+             ['120', ['gen8_cmd_buffer.c']]]
   _gen = g[0]
   libanv_gen_libs += static_library(
     'anv_gen@0@'.format(_gen),