Accepting request 1157793 from X11:XOrg
- buildrequires llvm18-devel/clang18-devel on Leap 15.5/15.6 - disabled u_zink-dont-print-error-messages-when-failing-an-implicit.patch for now, since it breaks driver build; this patch needs other patches below to build ... - u_zink-dont-print-error-messages-when-failing-an-implicit.patch * zink: don't print error messages when failing an implicit driver load (Mesa gitlab issue #10802) - Add U_fix-ac-llvm-LLVM-18-remove-useless-passes.patch to fix build with LLVM 18. OBS-URL: https://build.opensuse.org/request/show/1157793 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/Mesa?expand=0&rev=497
This commit is contained in:
commit
607b3cf6ad
25
Mesa.changes
25
Mesa.changes
@ -1,3 +1,28 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 14 04:48:32 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
|
||||
|
||||
- buildrequires llvm18-devel/clang18-devel on Leap 15.5/15.6
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 14 04:40:06 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
|
||||
|
||||
- disabled u_zink-dont-print-error-messages-when-failing-an-implicit.patch
|
||||
for now, since it breaks driver build; this patch needs other patches
|
||||
below to build ...
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 12 20:13:17 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
|
||||
|
||||
- u_zink-dont-print-error-messages-when-failing-an-implicit.patch
|
||||
* zink: don't print error messages when failing an implicit
|
||||
driver load (Mesa gitlab issue #10802)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 9 22:17:33 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||
|
||||
- Add U_fix-ac-llvm-LLVM-18-remove-useless-passes.patch to fix
|
||||
build with LLVM 18.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 5 04:33:37 UTC 2024 - Jianhua Lu <lujianhua000@gmail.com>
|
||||
|
||||
|
@ -142,12 +142,14 @@ Patch11: u_0001-intel-genxml-Drop-from-__future__-import-annotations.patc
|
||||
Patch12: u_0002-intel-genxml-Add-a-untyped-OrderedDict-fallback-for-.patch
|
||||
Patch13: python36-buildfix1.patch
|
||||
Patch14: python36-buildfix2.patch
|
||||
Patch15: U_fix-ac-llvm-LLVM-18-remove-useless-passes.patch
|
||||
# never to be upstreamed
|
||||
Patch54: n_drirc-disable-rgb10-for-chromium-on-amd.patch
|
||||
Patch58: u_dep_xcb.patch
|
||||
Patch100: U_fix-mpeg1_2-decode-mesa-20.2.patch
|
||||
Patch200: u_fix-build-on-ppc64le.patch
|
||||
Patch400: n_stop-iris-flicker.patch
|
||||
Patch500: u_zink-dont-print-error-messages-when-failing-an-implicit.patch
|
||||
%ifarch %{ix86} x86_64
|
||||
BuildRequires: DirectX-Headers
|
||||
%endif
|
||||
@ -246,7 +248,7 @@ BuildRequires: pkgconfig(wayland-server) >= 1.11
|
||||
BuildRequires: llvm-devel
|
||||
%else
|
||||
%if 0%{?sle_version} >= 150500
|
||||
BuildRequires: llvm17-devel
|
||||
BuildRequires: llvm18-devel
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
@ -256,7 +258,7 @@ BuildRequires: llvm17-devel
|
||||
BuildRequires: clang-devel
|
||||
%else
|
||||
%if 0%{?sle_version} >= 150500
|
||||
BuildRequires: clang17-devel
|
||||
BuildRequires: clang18-devel
|
||||
%endif
|
||||
%endif
|
||||
BuildRequires: libclc
|
||||
@ -762,6 +764,7 @@ rm -rf docs/README.{VMS,WIN32,OS2}
|
||||
%if 0%{?suse_version} < 1550
|
||||
%patch -P 14 -p1
|
||||
%endif
|
||||
%patch -P 15 -p1
|
||||
# no longer needed since gstreamer-plugins-vaapi 1.18.4
|
||||
%if 0%{?suse_version} < 1550
|
||||
%patch -P 54 -p1
|
||||
@ -770,6 +773,7 @@ rm -rf docs/README.{VMS,WIN32,OS2}
|
||||
%patch -P 100 -p1
|
||||
#%patch -P 200 -p1
|
||||
%patch -P 400 -p1
|
||||
#%patch -P 500 -p1
|
||||
|
||||
# Remove requires to vulkan libs from baselibs.conf on platforms
|
||||
# where vulkan build is disabled; ugly ...
|
||||
|
58
U_fix-ac-llvm-LLVM-18-remove-useless-passes.patch
Normal file
58
U_fix-ac-llvm-LLVM-18-remove-useless-passes.patch
Normal file
@ -0,0 +1,58 @@
|
||||
From bc7e363f8e1a26342e6fd7241c1f0ebb722338d6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Kai=20Wasserb=C3=A4ch?= <kai@dev.carbon-project.org>
|
||||
Date: Wed, 22 Nov 2023 20:21:11 +0100
|
||||
Subject: [PATCH] fix: ac/llvm: LLVM 18: remove useless passes, partially
|
||||
removed upstream
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Upstream removed llvm::createLoopSinkPass() in commit
|
||||
<https://github.com/llvm/llvm-project/commit/b9975cec0ea0a2f10d65b7bd1197d9e1706cbd3d>
|
||||
and there is no useful alternative except moving to the new pass
|
||||
manager.
|
||||
|
||||
On top of that, the usage of this optimisation pass and
|
||||
PromoteMemoryToRegisterPass were just useless, according to the
|
||||
upstream developer of the commit named above. Therefore the easiest
|
||||
solution is, as him, Marek and Dave suggested, to just remove these two
|
||||
passes from the pipeline for now.
|
||||
|
||||
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10192
|
||||
Reference: https://github.com/llvm/llvm-project/pull/72811
|
||||
Reference: https://github.com/llvm/llvm-project/commit/b9975cec0ea0a2f10d65b7bd1197d9e1706cbd3d
|
||||
Suggested-by: Dave Airlie <airlied@redhat.com>
|
||||
Suggested-by: Aiden Grossman <agrossman154@yahoo.com>
|
||||
Suggested-by: Marek Olšák <maraeo@gmail.com>
|
||||
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
|
||||
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
|
||||
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26336>
|
||||
---
|
||||
src/amd/llvm/ac_llvm_helper.cpp | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/src/amd/llvm/ac_llvm_helper.cpp b/src/amd/llvm/ac_llvm_helper.cpp
|
||||
index 40a4399e705..5d065279ad1 100644
|
||||
--- a/src/amd/llvm/ac_llvm_helper.cpp
|
||||
+++ b/src/amd/llvm/ac_llvm_helper.cpp
|
||||
@@ -299,17 +299,12 @@ LLVMPassManagerRef ac_create_passmgr(LLVMTargetLibraryInfoRef target_library_inf
|
||||
*/
|
||||
unwrap(passmgr)->add(createBarrierNoopPass());
|
||||
|
||||
- /* This pass eliminates all loads and stores on alloca'd pointers. */
|
||||
- unwrap(passmgr)->add(createPromoteMemoryToRegisterPass());
|
||||
#if LLVM_VERSION_MAJOR >= 16
|
||||
unwrap(passmgr)->add(createSROAPass(true));
|
||||
#else
|
||||
unwrap(passmgr)->add(createSROAPass());
|
||||
#endif
|
||||
/* TODO: restore IPSCCP */
|
||||
- if (LLVM_VERSION_MAJOR >= 16)
|
||||
- unwrap(passmgr)->add(createLoopSinkPass());
|
||||
- /* TODO: restore IPSCCP */
|
||||
unwrap(passmgr)->add(createLICMPass());
|
||||
unwrap(passmgr)->add(createCFGSimplificationPass());
|
||||
/* This is recommended by the instruction combining pass. */
|
||||
--
|
||||
2.44.0
|
||||
|
330
u_zink-dont-print-error-messages-when-failing-an-implicit.patch
Normal file
330
u_zink-dont-print-error-messages-when-failing-an-implicit.patch
Normal file
@ -0,0 +1,330 @@
|
||||
From 481a319ad2df61fed7e2728d70eb9b945894303e Mon Sep 17 00:00:00 2001
|
||||
From: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
|
||||
Date: Tue, 12 Mar 2024 10:22:24 -0400
|
||||
Subject: [PATCH 9/9] zink: don't print error messages when failing an implicit
|
||||
driver load
|
||||
|
||||
---
|
||||
src/gallium/drivers/zink/zink_device_info.py | 6 +-
|
||||
src/gallium/drivers/zink/zink_instance.py | 15 ++--
|
||||
src/gallium/drivers/zink/zink_screen.c | 76 +++++++++++++-------
|
||||
src/gallium/drivers/zink/zink_types.h | 1 +
|
||||
4 files changed, 66 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/src/gallium/drivers/zink/zink_device_info.py b/src/gallium/drivers/zink/zink_device_info.py
|
||||
index 17222001180d5..b0bc38218922c 100644
|
||||
--- a/src/gallium/drivers/zink/zink_device_info.py
|
||||
+++ b/src/gallium/drivers/zink/zink_device_info.py
|
||||
@@ -470,14 +470,16 @@ zink_get_physical_device_info(struct zink_screen *screen)
|
||||
// enumerate device supported extensions
|
||||
VkResult result = screen->vk.EnumerateDeviceExtensionProperties(screen->pdev, NULL, &num_extensions, NULL);
|
||||
if (result != VK_SUCCESS) {
|
||||
- mesa_loge("ZINK: vkEnumerateDeviceExtensionProperties failed (%s)", vk_Result_to_str(result));
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: vkEnumerateDeviceExtensionProperties failed (%s)", vk_Result_to_str(result));
|
||||
} else {
|
||||
if (num_extensions > 0) {
|
||||
VkExtensionProperties *extensions = MALLOC(sizeof(VkExtensionProperties) * num_extensions);
|
||||
if (!extensions) goto fail;
|
||||
result = screen->vk.EnumerateDeviceExtensionProperties(screen->pdev, NULL, &num_extensions, extensions);
|
||||
if (result != VK_SUCCESS) {
|
||||
- mesa_loge("ZINK: vkEnumerateDeviceExtensionProperties failed (%s)", vk_Result_to_str(result));
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: vkEnumerateDeviceExtensionProperties failed (%s)", vk_Result_to_str(result));
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < num_extensions; ++i) {
|
||||
diff --git a/src/gallium/drivers/zink/zink_instance.py b/src/gallium/drivers/zink/zink_instance.py
|
||||
index 0fbd14e5a5826..fec0844593b78 100644
|
||||
--- a/src/gallium/drivers/zink/zink_instance.py
|
||||
+++ b/src/gallium/drivers/zink/zink_instance.py
|
||||
@@ -156,12 +156,14 @@ zink_create_instance(struct zink_screen *screen, bool display_dev)
|
||||
// Build up the extensions from the reported ones but only for the unnamed layer
|
||||
uint32_t extension_count = 0;
|
||||
if (vk_EnumerateInstanceExtensionProperties(NULL, &extension_count, NULL) != VK_SUCCESS) {
|
||||
- mesa_loge("ZINK: vkEnumerateInstanceExtensionProperties failed");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: vkEnumerateInstanceExtensionProperties failed");
|
||||
} else {
|
||||
VkExtensionProperties *extension_props = malloc(extension_count * sizeof(VkExtensionProperties));
|
||||
if (extension_props) {
|
||||
if (vk_EnumerateInstanceExtensionProperties(NULL, &extension_count, extension_props) != VK_SUCCESS) {
|
||||
- mesa_loge("ZINK: vkEnumerateInstanceExtensionProperties failed");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: vkEnumerateInstanceExtensionProperties failed");
|
||||
} else {
|
||||
for (uint32_t i = 0; i < extension_count; i++) {
|
||||
%for ext in extensions:
|
||||
@@ -179,12 +181,14 @@ zink_create_instance(struct zink_screen *screen, bool display_dev)
|
||||
uint32_t layer_count = 0;
|
||||
|
||||
if (vk_EnumerateInstanceLayerProperties(&layer_count, NULL) != VK_SUCCESS) {
|
||||
- mesa_loge("ZINK: vkEnumerateInstanceLayerProperties failed");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: vkEnumerateInstanceLayerProperties failed");
|
||||
} else {
|
||||
VkLayerProperties *layer_props = malloc(layer_count * sizeof(VkLayerProperties));
|
||||
if (layer_props) {
|
||||
if (vk_EnumerateInstanceLayerProperties(&layer_count, layer_props) != VK_SUCCESS) {
|
||||
- mesa_loge("ZINK: vkEnumerateInstanceLayerProperties failed");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: vkEnumerateInstanceLayerProperties failed");
|
||||
} else {
|
||||
for (uint32_t i = 0; i < layer_count; i++) {
|
||||
%for layer in layers:
|
||||
@@ -256,7 +260,8 @@ zink_create_instance(struct zink_screen *screen, bool display_dev)
|
||||
|
||||
VkResult err = vk_CreateInstance(&ici, NULL, &screen->instance);
|
||||
if (err != VK_SUCCESS) {
|
||||
- mesa_loge("ZINK: vkCreateInstance failed (%s)", vk_Result_to_str(err));
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: vkCreateInstance failed (%s)", vk_Result_to_str(err));
|
||||
return false;
|
||||
}
|
||||
|
||||
diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
|
||||
index 9d4952eb4ef1b..39194c7a89bf2 100644
|
||||
--- a/src/gallium/drivers/zink/zink_screen.c
|
||||
+++ b/src/gallium/drivers/zink/zink_screen.c
|
||||
@@ -1695,7 +1695,8 @@ choose_pdev(struct zink_screen *screen, int64_t dev_major, int64_t dev_minor)
|
||||
VkPhysicalDevice *pdevs;
|
||||
VkResult result = VKSCR(EnumeratePhysicalDevices)(screen->instance, &pdev_count, NULL);
|
||||
if (result != VK_SUCCESS) {
|
||||
- mesa_loge("ZINK: vkEnumeratePhysicalDevices failed (%s)", vk_Result_to_str(result));
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: vkEnumeratePhysicalDevices failed (%s)", vk_Result_to_str(result));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1703,7 +1704,8 @@ choose_pdev(struct zink_screen *screen, int64_t dev_major, int64_t dev_minor)
|
||||
|
||||
pdevs = malloc(sizeof(*pdevs) * pdev_count);
|
||||
if (!pdevs) {
|
||||
- mesa_loge("ZINK: failed to allocate pdevs!");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: failed to allocate pdevs!");
|
||||
return;
|
||||
}
|
||||
result = VKSCR(EnumeratePhysicalDevices)(screen->instance, &pdev_count, pdevs);
|
||||
@@ -1730,7 +1732,8 @@ choose_pdev(struct zink_screen *screen, int64_t dev_major, int64_t dev_minor)
|
||||
unsigned pdev_count = 1;
|
||||
VkResult result = VKSCR(EnumeratePhysicalDevices)(screen->instance, &pdev_count, &pdev);
|
||||
if (result != VK_SUCCESS && result != VK_INCOMPLETE) {
|
||||
- mesa_loge("ZINK: vkEnumeratePhysicalDevices failed (%s)", vk_Result_to_str(result));
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: vkEnumeratePhysicalDevices failed (%s)", vk_Result_to_str(result));
|
||||
return;
|
||||
}
|
||||
screen->pdev = pdev;
|
||||
@@ -3238,10 +3241,12 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev
|
||||
|
||||
struct zink_screen *screen = rzalloc(NULL, struct zink_screen);
|
||||
if (!screen) {
|
||||
- mesa_loge("ZINK: failed to allocate screen");
|
||||
+ if (!config->implicit_driver_load)
|
||||
+ mesa_loge("ZINK: failed to allocate screen");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+ screen->implicitly_loaded = config->implicit_driver_load;
|
||||
screen->drm_fd = -1;
|
||||
|
||||
glsl_type_singleton_init_or_ref();
|
||||
@@ -3261,7 +3266,8 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev
|
||||
|
||||
screen->loader_lib = util_dl_open(VK_LIBNAME);
|
||||
if (!screen->loader_lib) {
|
||||
- mesa_loge("ZINK: failed to load "VK_LIBNAME);
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: failed to load "VK_LIBNAME);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -3269,7 +3275,8 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev
|
||||
screen->vk_GetDeviceProcAddr = (PFN_vkGetDeviceProcAddr)util_dl_get_proc_address(screen->loader_lib, "vkGetDeviceProcAddr");
|
||||
if (!screen->vk_GetInstanceProcAddr ||
|
||||
!screen->vk_GetDeviceProcAddr) {
|
||||
- mesa_loge("ZINK: failed to get proc address");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: failed to get proc address");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -3289,7 +3296,8 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev
|
||||
if (zink_debug & ZINK_DEBUG_VALIDATION) {
|
||||
if (!screen->instance_info.have_layer_KHRONOS_validation &&
|
||||
!screen->instance_info.have_layer_LUNARG_standard_validation) {
|
||||
- mesa_loge("Failed to load validation layer");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("Failed to load validation layer");
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
@@ -3304,12 +3312,15 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev
|
||||
zink_verify_instance_extensions(screen);
|
||||
|
||||
if (screen->instance_info.have_EXT_debug_utils &&
|
||||
- (zink_debug & ZINK_DEBUG_VALIDATION) && !create_debug(screen))
|
||||
- debug_printf("ZINK: failed to setup debug utils\n");
|
||||
+ (zink_debug & ZINK_DEBUG_VALIDATION) && !create_debug(screen)) {
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ debug_printf("ZINK: failed to setup debug utils\n");
|
||||
+ }
|
||||
|
||||
choose_pdev(screen, dev_major, dev_minor);
|
||||
if (screen->pdev == VK_NULL_HANDLE) {
|
||||
- mesa_loge("ZINK: failed to choose pdev");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: failed to choose pdev");
|
||||
goto fail;
|
||||
}
|
||||
screen->is_cpu = screen->info.props.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU;
|
||||
@@ -3324,7 +3335,8 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev
|
||||
VK_FORMAT_D32_SFLOAT_S8_UINT);
|
||||
|
||||
if (!zink_get_physical_device_info(screen)) {
|
||||
- debug_printf("ZINK: failed to detect features\n");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ debug_printf("ZINK: failed to detect features\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -3367,18 +3379,21 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev
|
||||
|
||||
setup_renderdoc(screen);
|
||||
if (screen->threaded_submit && !util_queue_init(&screen->flush_queue, "zfq", 8, 1, UTIL_QUEUE_INIT_RESIZE_IF_FULL, screen)) {
|
||||
- mesa_loge("zink: Failed to create flush queue.\n");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("zink: Failed to create flush queue.\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
zink_internal_setup_moltenvk(screen);
|
||||
if (!screen->info.have_KHR_timeline_semaphore && !screen->info.feats12.timelineSemaphore) {
|
||||
- mesa_loge("zink: KHR_timeline_semaphore is required");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("zink: KHR_timeline_semaphore is required");
|
||||
goto fail;
|
||||
}
|
||||
if (zink_debug & ZINK_DEBUG_DGC) {
|
||||
if (!screen->info.have_NV_device_generated_commands) {
|
||||
- mesa_loge("zink: can't use DGC without NV_device_generated_commands");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("zink: can't use DGC without NV_device_generated_commands");
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
@@ -3497,14 +3512,16 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev
|
||||
if (!zink_screen_resource_init(&screen->base))
|
||||
goto fail;
|
||||
if (!zink_bo_init(screen)) {
|
||||
- mesa_loge("ZINK: failed to initialize suballocator");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: failed to initialize suballocator");
|
||||
goto fail;
|
||||
}
|
||||
zink_screen_fence_init(&screen->base);
|
||||
|
||||
zink_screen_init_compiler(screen);
|
||||
if (!disk_cache_init(screen)) {
|
||||
- mesa_loge("ZINK: failed to initialize disk cache");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: failed to initialize disk cache");
|
||||
goto fail;
|
||||
}
|
||||
if (!util_queue_init(&screen->cache_get_thread, "zcfq", 8, 4,
|
||||
@@ -3520,12 +3537,14 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev
|
||||
screen->total_video_mem = get_video_mem(screen);
|
||||
screen->clamp_video_mem = screen->total_video_mem * 0.8;
|
||||
if (!os_get_total_physical_memory(&screen->total_mem)) {
|
||||
- mesa_loge("ZINK: failed to get total physical memory");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: failed to get total physical memory");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!zink_screen_init_semaphore(screen)) {
|
||||
- mesa_loge("zink: failed to create timeline semaphore");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("zink: failed to create timeline semaphore");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -3533,35 +3552,40 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev
|
||||
{
|
||||
if (!screen->info.have_EXT_descriptor_buffer) {
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
- mesa_loge("Cannot use db descriptor mode without EXT_descriptor_buffer");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("Cannot use db descriptor mode without EXT_descriptor_buffer");
|
||||
goto fail;
|
||||
}
|
||||
can_db = false;
|
||||
}
|
||||
if (!screen->resizable_bar) {
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
- mesa_loge("Cannot use db descriptor mode without resizable bar");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("Cannot use db descriptor mode without resizable bar");
|
||||
goto fail;
|
||||
}
|
||||
can_db = false;
|
||||
}
|
||||
if (!screen->info.have_EXT_non_seamless_cube_map) {
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
- mesa_loge("Cannot use db descriptor mode without EXT_non_seamless_cube_map");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("Cannot use db descriptor mode without EXT_non_seamless_cube_map");
|
||||
goto fail;
|
||||
}
|
||||
can_db = false;
|
||||
}
|
||||
if (!screen->info.rb2_feats.nullDescriptor) {
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
- mesa_loge("Cannot use db descriptor mode without robustness2.nullDescriptor");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("Cannot use db descriptor mode without robustness2.nullDescriptor");
|
||||
goto fail;
|
||||
}
|
||||
can_db = false;
|
||||
}
|
||||
if (ZINK_FBFETCH_DESCRIPTOR_SIZE < screen->info.db_props.inputAttachmentDescriptorSize) {
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
- mesa_loge("Cannot use db descriptor mode with inputAttachmentDescriptorSize(%u) > %u", (unsigned)screen->info.db_props.inputAttachmentDescriptorSize, ZINK_FBFETCH_DESCRIPTOR_SIZE);
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("Cannot use db descriptor mode with inputAttachmentDescriptorSize(%u) > %u", (unsigned)screen->info.db_props.inputAttachmentDescriptorSize, ZINK_FBFETCH_DESCRIPTOR_SIZE);
|
||||
goto fail;
|
||||
}
|
||||
mesa_logw("zink: bug detected: inputAttachmentDescriptorSize(%u) > %u", (unsigned)screen->info.db_props.inputAttachmentDescriptorSize, ZINK_FBFETCH_DESCRIPTOR_SIZE);
|
||||
@@ -3620,12 +3644,14 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev
|
||||
zink_init_screen_pipeline_libs(screen);
|
||||
|
||||
if (!init_layouts(screen)) {
|
||||
- mesa_loge("ZINK: failed to initialize layouts");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: failed to initialize layouts");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!zink_descriptor_layouts_init(screen)) {
|
||||
- mesa_loge("ZINK: failed to initialize descriptor layouts");
|
||||
+ if (!screen->implicitly_loaded)
|
||||
+ mesa_loge("ZINK: failed to initialize descriptor layouts");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
diff --git a/src/gallium/drivers/zink/zink_types.h b/src/gallium/drivers/zink/zink_types.h
|
||||
index 739838d0dce14..512c5c571ba84 100644
|
||||
--- a/src/gallium/drivers/zink/zink_types.h
|
||||
+++ b/src/gallium/drivers/zink/zink_types.h
|
||||
@@ -1413,6 +1413,7 @@ struct zink_screen {
|
||||
bool is_cpu;
|
||||
bool abort_on_hang;
|
||||
bool frame_marker_emitted;
|
||||
+ bool implicitly_loaded;
|
||||
uint64_t curr_batch; //the current batch id
|
||||
uint32_t last_finished;
|
||||
VkSemaphore sem;
|
||||
--
|
||||
GitLab
|
||||
|
Loading…
Reference in New Issue
Block a user