mirror of
https://github.com/elwrcl/copnix.git
synced 2026-10-31 22:28:03 +03:00
151 lines
5.2 KiB
Diff
151 lines
5.2 KiB
Diff
diff --git a/src/intel/vulkan_hasvk/anv_device.c b/src/intel/vulkan_hasvk/anv_device.c
|
|
index 9000e9b..b91a1d9 100644
|
|
--- a/src/intel/vulkan_hasvk/anv_device.c
|
|
+++ b/src/intel/vulkan_hasvk/anv_device.c
|
|
@@ -767,7 +767,11 @@ get_properties_1_2(const struct anv_physical_device *pdevice,
|
|
else {
|
|
p->conformanceVersion = (VkConformanceVersion) {
|
|
.major = 1,
|
|
- .minor = pdevice->use_softpin ? 3 : 2,
|
|
+#ifdef HASVK_FORCE_VK_1_3
|
|
+ .minor = 3,
|
|
+#else
|
|
+ .minor = pdevice->use_softpin ? 3 : 2,
|
|
+#endif
|
|
.subminor = 0,
|
|
.patch = 0,
|
|
};
|
|
@@ -979,6 +983,8 @@ get_properties(const struct anv_physical_device *pdevice,
|
|
*props = (struct vk_properties) {
|
|
#if DETECT_OS_ANDROID
|
|
.apiVersion = ANV_API_VERSION,
|
|
+#elif defined(HASVK_FORCE_VK_1_3)
|
|
+ .apiVersion = ANV_API_VERSION_1_3,
|
|
#else
|
|
.apiVersion = (pdevice->use_softpin || pdevice->instance->report_vk_1_3) ?
|
|
ANV_API_VERSION_1_3 : ANV_API_VERSION_1_2,
|
|
diff --git a/src/intel/vulkan_hasvk/meson.build b/src/intel/vulkan_hasvk/meson.build
|
|
index 2e34cd6..4b292eb 100644
|
|
--- a/src/intel/vulkan_hasvk/meson.build
|
|
+++ b/src/intel/vulkan_hasvk/meson.build
|
|
@@ -208,6 +208,119 @@ if with_symbols_check
|
|
)
|
|
endif
|
|
|
|
+# =============================================================================
|
|
+# Experimental Vulkan 1.3 variant for Gen7 (HD 4000) hardware.
|
|
+# This builds the same HasVK driver but with -DHASVK_FORCE_VK_1_3=1,
|
|
+# which forces the driver to always report Vulkan 1.3 API version and
|
|
+# conformance regardless of softpin support. This is experimental and
|
|
+# intended for applications that require VK 1.3 to run.
|
|
+# =============================================================================
|
|
+
|
|
+icd_file_name_13 = libname_prefix + 'vulkan_intel_hasvk13.' + libname_suffix
|
|
+
|
|
+intel_hasvk13_icd = custom_target(
|
|
+ 'intel_hasvk13_icd',
|
|
+ input : [vk_icd_gen, vk_api_xml],
|
|
+ output : 'intel_hasvk13_icd.' + vulkan_manifest_suffix,
|
|
+ command : [
|
|
+ prog_python, '@INPUT0@',
|
|
+ '--api-version', '1.3', '--xml', '@INPUT1@',
|
|
+ '--sizeof-pointer', sizeof_pointer,
|
|
+ '--icd-lib-path', vulkan_icd_lib_path,
|
|
+ '--icd-filename', icd_file_name_13,
|
|
+ '--out', '@OUTPUT@',
|
|
+ ],
|
|
+ build_by_default : true,
|
|
+ install_dir : with_vulkan_icd_dir,
|
|
+ install_tag : 'runtime',
|
|
+ install : true,
|
|
+)
|
|
+
|
|
+_dev_icdname_13 = 'intel_hasvk13_devenv_icd.@[email protected]'.format(host_machine.cpu())
|
|
+_dev_icd_13 = custom_target(
|
|
+ 'intel_hasvk13_devenv_icd',
|
|
+ input : [vk_icd_gen, vk_api_xml],
|
|
+ output : _dev_icdname_13,
|
|
+ command : [
|
|
+ prog_python, '@INPUT0@',
|
|
+ '--api-version', '1.3', '--xml', '@INPUT1@',
|
|
+ '--sizeof-pointer', sizeof_pointer,
|
|
+ '--icd-lib-path', meson.current_build_dir(),
|
|
+ '--icd-filename', icd_file_name_13,
|
|
+ '--out', '@OUTPUT@',
|
|
+ ],
|
|
+ build_by_default : true,
|
|
+)
|
|
+
|
|
+# Build per-hw-ver static libs with VK 1.3 force flag
|
|
+libanv_per_hw_ver_libs_13 = []
|
|
+foreach g : [['70', ['gfx7_cmd_buffer.c']],
|
|
+ ['75', ['gfx7_cmd_buffer.c']],
|
|
+ ['80', ['gfx8_cmd_buffer.c']]]
|
|
+ _gfx_ver = g[0]
|
|
+ libanv_per_hw_ver_libs_13 += static_library(
|
|
+ 'anv_per_hw_ver@0@_vk13'.format(_gfx_ver),
|
|
+ [anv_per_hw_ver_files, g[1], anv_hasvk_entrypoints[0]],
|
|
+ include_directories : [
|
|
+ inc_include, inc_src, inc_intel,
|
|
+ ],
|
|
+ c_args : [
|
|
+ no_override_init_args, sse2_args,
|
|
+ '-DGFX_VERx10=@0@'.format(_gfx_ver),
|
|
+ '-DHASVK_FORCE_VK_1_3=1',
|
|
+ ],
|
|
+ gnu_symbol_visibility : 'hidden',
|
|
+ dependencies : [
|
|
+ dep_libdrm, dep_valgrind, idep_nir_headers, idep_genxml,
|
|
+ idep_vulkan_util_headers, idep_vulkan_wsi_headers,
|
|
+ idep_vulkan_runtime_headers, idep_intel_driver_ds_headers,
|
|
+ idep_intel_blorp_elk, idep_mesautil,
|
|
+ ],
|
|
+ )
|
|
+endforeach
|
|
+
|
|
+# Build common static lib with VK 1.3 force flag
|
|
+libanv_hasvk13_common = static_library(
|
|
+ 'anv_hasvk13_common',
|
|
+ [
|
|
+ libanv_files, anv_hasvk_entrypoints, sha1_h,
|
|
+ gen_xml_pack,
|
|
+ ],
|
|
+ include_directories : [
|
|
+ inc_include, inc_src, inc_intel,
|
|
+ inc_util,
|
|
+ ],
|
|
+ c_args : anv_flags + ['-DHASVK_FORCE_VK_1_3=1'],
|
|
+ cpp_args : anv_cpp_flags,
|
|
+ gnu_symbol_visibility : 'hidden',
|
|
+ dependencies : anv_deps,
|
|
+)
|
|
+
|
|
+libvulkan_intel_hasvk13 = shared_library(
|
|
+ 'vulkan_intel_hasvk13',
|
|
+ [files('anv_gem.c'), anv_hasvk_entrypoints[0]],
|
|
+ include_directories : [
|
|
+ inc_include, inc_src, inc_intel,
|
|
+ ],
|
|
+ link_whole : [libanv_hasvk13_common, libanv_per_hw_ver_libs_13],
|
|
+ link_with : [
|
|
+ libisl, libintel_perf,
|
|
+ ],
|
|
+ dependencies : [
|
|
+ dep_thread, dep_dl, dep_m, anv_deps, idep_libintel_common,
|
|
+ idep_nir, idep_genxml, idep_vulkan_util, idep_vulkan_wsi,
|
|
+ idep_vulkan_runtime, idep_mesautil, idep_xmlconfig,
|
|
+ idep_intel_driver_ds, idep_intel_dev, idep_intel_blorp_elk,
|
|
+ idep_intel_decoder_elk, idep_intel_compiler_elk,
|
|
+ ],
|
|
+ c_args : anv_flags + ['-DHASVK_FORCE_VK_1_3=1'],
|
|
+ gnu_symbol_visibility : 'hidden',
|
|
+ link_args : [vulkan_icd_link_args, ld_args_build_id,
|
|
+ ld_args_bsymbolic, ld_args_gc_sections],
|
|
+ link_depends : vulkan_icd_link_depends,
|
|
+ install : true,
|
|
+)
|
|
+
|
|
# HasVK and its tests can only run on x86
|
|
if with_tests and host_machine.cpu_family().startswith('x86')
|
|
libvulkan_intel_hasvk_test = static_library(
|