summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2017-12-13 01:18:07 -0800
committerJordan Justen <[email protected]>2019-08-28 13:38:34 -0700
commit181be14d430339e24dd6c7af06ef00a1c3a3e931 (patch)
tree77eae25d717e415187103a3564b837287b3fcadf
parentda603c066e3fd5d70cc70ff8f7ffb9aa4db85016 (diff)
anv: Build for gen12
Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
-rw-r--r--src/intel/Makefile.sources4
-rw-r--r--src/intel/vulkan/anv_blorp.c3
-rw-r--r--src/intel/vulkan/anv_device.c8
-rw-r--r--src/intel/vulkan/anv_entrypoints_gen.py4
-rw-r--r--src/intel/vulkan/anv_private.h8
-rw-r--r--src/intel/vulkan/meson.build3
6 files changed, 29 insertions, 1 deletions
diff --git a/src/intel/Makefile.sources b/src/intel/Makefile.sources
index 43937811ea8..115403983cd 100644
--- a/src/intel/Makefile.sources
+++ b/src/intel/Makefile.sources
@@ -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 \
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
index 1ab57fb4e85..17f0ffad576 100644
--- a/src/intel/vulkan/anv_blorp.c
+++ b/src/intel/vulkan/anv_blorp.c
@@ -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");
}
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index c55b5233cc7..a6572135c91 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -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. */
diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py
index 4dfde4513f0..23ade58ae19 100644
--- a/src/intel/vulkan/anv_entrypoints_gen.py
+++ b/src/intel/vulkan/anv_entrypoints_gen.py
@@ -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;
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index b6bb2019bb3..26ce4aa6ddf 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -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 */
diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build
index 5aa35738060..87280d17318 100644
--- a/src/intel/vulkan/meson.build
+++ b/src/intel/vulkan/meson.build
@@ -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),