Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#74091 - [mesa] 22.0.0 should use vulkan-icd-loader 1.3.204+

Attached to Project: Arch Linux
Opened by Marcell Meszaros (MarsSeed) - Thursday, 10 March 2022, 23:59 GMT
Last edited by Laurent Carlier (lordheavy) - Sunday, 13 March 2022, 09:16 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Laurent Carlier (lordheavy)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
Mesa 22.0.0 development (unstable) release is based on vulkan-headers 1.3.204.
Its anv ([vulkan-intel]) and radv ([vulkan-radeon]) drivers support Vulkan 1.3.

It is logical that this Mesa version should use [vulkan-icd-loader] 1.3.204+. :)

Problem:
- [mesa] 22.0.0-1 is in testing.
- [vulkan-icd-loader] 1.2.203-1 is in extra.
- no [vulkan-icd-loader] 1.3.204+ exists yet in testing.

Additional reference:
# Relevant commits from tag 'mesa-22.0.0':
** vulkan: Update the XML and headers to 1.3.204 (Jan 25, 2022)
-- https://gitlab.freedesktop.org/mesa/mesa/-/commit/6a3928615bfb3276217753bbec32b5a91ad70e4a
** radv: advertise Vulkan 1.3 (Jan 25, 2022)
-- https://gitlab.freedesktop.org/mesa/mesa/-/commit/08c6f437cf63234f4a5d52b6058d53fb551835ff
** anv: Advertise Vulkan 1.3 (Jan 27, 2022)
-- https://gitlab.freedesktop.org/mesa/mesa/-/commit/df8ac77af8093c87d5d56d6f1b36c0144a607c40
This task depends upon

Closed by  Laurent Carlier (lordheavy)
Sunday, 13 March 2022, 09:16 GMT
Reason for closing:  Upstream
Comment by Jonathon (jonathon) - Friday, 11 March 2022, 01:47 GMT
The correct approach would be to flag vulkan-icd-loader as out-of-date rather than file a bug report; it's right there at the top of the page:

"Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List."
"REPEAT: Do NOT report bugs for outdated packages!"
Comment by Jonathon (jonathon) - Friday, 11 March 2022, 01:51 GMT
This said, vulkan-icd-loader is already flagged and is four versions behind upstream...
Comment by Marcell Meszaros (MarsSeed) - Friday, 11 March 2022, 01:55 GMT
@jonathon [vulkan-icd-loader] is flagged as out-of-date since 2022-01-30.

My request is completely valid, as now it is time to update it in testing
for Mesa 22.0.0 / vulkan-intel / vulkan-radeon Vulkan 1.3 support.
Comment by Marcell Meszaros (MarsSeed) - Friday, 11 March 2022, 04:16 GMT
Tested: [mesa] and [vulkan-intel] works fine for me. (Intel Broadwell iGPU)

Only Vulkan 1.2 though.

Btw previously Vulkan didn't work at all with vulkan-intel (mesa) 21.3.7:
// Previous error message with mesa 21.3.7:
// error: [Loader Message] Code 0 : loader_scanned_icd_add:
// Driver /usr/lib/libvulkan_intel.so supports Vulkan 1.2,
// but only supports loader interface version 4.
// Interface version 5 or newer required to support
// this version of Vulkan (Policy #LDP_DRIVER_7)

But mesa/vulkan-intel 22.0.0 resolves the above issue.

Vulkan 1.3 on the other hand doesn't work (no wonder with 1.2 based vulkan-icd-loader).


See vulkaninfo_summary.txt attachment -- Excerpt:
$ vulkaninfo --summary
# Vulkan Instance Version: 1.2.203
#
# VK_LAYER_INTEL_nullhw: 1.1.73
# VK_LAYER_KHRONOS_validation: 1.2.203
# VK_LAYER_LUNARG_api_dump: 1.2.189
# VK_LAYER_LUNARG_device_simulation: 1.2.189
# VK_LAYER_LUNARG_monitor: 1.2.189
# VK_LAYER_LUNARG_screenshot: 1.2.189
# VK_LAYER_MESA_device_select: 1.2.73
# VK_LAYER_MESA_overlay: 1.2.199
# VK_LAYER_NV_optimus: 1.3.194


My packages and their versions
(latest including testing repos):
###############################
$ pacman -Q | grep -E 'vulkan|mesa'
lib32-mesa 22.0.0-1
lib32-vulkan-icd-loader 1.2.203-1
lib32-vulkan-intel 22.0.0-1
mesa 22.0.0-1
mesa-utils 8.4.0-7
vulkan-caps-viewer-x11 1:3.20-2
vulkan-extra-layers 1.2.189.0-1
vulkan-extra-tools 1.2.189.0-1
vulkan-headers 1:1.3.206-1
vulkan-icd-loader 1.2.203-1
vulkan-intel 22.0.0-1
vulkan-mesa-layers 22.0.0-1
vulkan-tools 1.2.203-2
vulkan-validation-layers 1.2.203-1
Comment by Marcell Meszaros (MarsSeed) - Friday, 11 March 2022, 19:18 GMT
Segmentation fault (core dumped):

* when trying VK_KHR_dynamic_rendering on [vulkan-intel]
- device: Intel Broadwell iGPU: HD Graphics 5500 (BDW GT2)

Tested with full suite of Vulkan-Samples by Khronos.
- https://github.com/KhronosGroup/Vulkan-Samples

Most of the demos work but some require Vulkan 1.3 and render only some glitch.


Crash details:
Segmentation fault (core dumped) when running Vulkan-Samples 'dynamic_rendering' demo:
- https://github.com/KhronosGroup/Vulkan-Samples/tree/master/samples/extensions/dynamic_rendering

VK_KHR_dynamic_rendering got newly promoted to Vulkan 1.3 core.

Mesa 22.0.0's ANV (Vulkan-Intel) driver ships with Vulkan 1.3 support.

Release note's list of new features claims in first line:
- lavapipe,radv,anv: KHR_dynamic_rendering*
* https://docs.mesa3d.org/relnotes/22.0.0.html#new-features

Other sample apps that require VK extensions that are not exposed (not supported)
by the driver just print out the error and gracefully exit.

But VK_KHR_dynamic_rendering is reported by vulkaninfo as being available in my driver.
Therefore 'dynamic_rendering' sample app tries to execute the render and segfaults.
Vulkan rendering GUI window appears for a sec before the crash.

See attached log file.

Excerpt:
$ vulkan_samples sample dynamic_rendering
#
# [info] Selected GPU: Intel(R) HD Graphics 5500 (BDW GT2)
# [info] Dedicated Allocation enabled
# [info] Device supports the following requested extensions:
# [info] VK_KHR_get_memory_requirements2
# [info] VK_KHR_dedicated_allocation
# [info] VK_KHR_swapchain
# [info] VK_KHR_dynamic_rendering
# [warning] 2044605652 - VUID_Undefined:
## Validation Warning: [ VUID_Undefined ] Object 0: handle = 0x5560add85b00,
## type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x79de34d4 |
## Device Extension VK_KHR_dynamic_rendering support is incomplete, incorrect results are possible.
[...]
# Segmentation fault (core dumped)


My packages and their versions
(latest incl. testing repos):
###############################
$ pacman -Q | grep -E 'vulkan|mesa'
lib32-mesa 22.0.0-1
lib32-vulkan-icd-loader 1.2.203-1
lib32-vulkan-intel 22.0.0-1
mesa 22.0.0-1
mesa-utils 8.4.0-7
vulkan-caps-viewer-x11 1:3.20-2
vulkan-extra-layers 1.2.189.0-1
vulkan-extra-tools 1.2.189.0-1
vulkan-headers 1:1.3.206-1
vulkan-icd-loader 1.2.203-1
vulkan-intel 22.0.0-1
vulkan-mesa-layers 22.0.0-1
vulkan-tools 1.2.203-2
vulkan-validation-layers 1.2.203-1
Comment by Laurent Carlier (lordheavy) - Saturday, 12 March 2022, 08:58 GMT
Is it better with recent vulkan packages update ?
Comment by Marcell Meszaros (MarsSeed) - Saturday, 12 March 2022, 12:27 GMT
@lordheavy thanks for the updates. Unfortunately I get the exact same results.

In Vulkan-Samples 'dynamic_rendering',
I still get the validation warning about
VK_KHR_dynamic_rendering support being incomplete.
And then it still segfaults.

I've noticed that [vulkan-mesa-layers] (pkgbase [mesa]) is still not updated and their layers are VK 1.2 based.

Could you maybe trigger a full rebuild of [mesa] packages in testing?


My packages and their versions
(latest incl. testing repos):
###############################
$ pacman -Q | grep -E 'vulkan|mesa'
lib32-mesa 22.0.0-1
lib32-vulkan-icd-loader 1.3.207-1
lib32-vulkan-intel 22.0.0-1
mesa 22.0.0-1
mesa-utils 8.4.0-7
vulkan-caps-viewer-x11 1:3.20-2
vulkan-extra-layers 1.3.204.1-1
vulkan-extra-tools 1.3.204.1-1
vulkan-headers 1:1.3.207-1
vulkan-icd-loader 1.3.207-1
vulkan-intel 22.0.0-1
vulkan-mesa-layers 22.0.0-1
vulkan-tools 1.3.207-1
vulkan-validation-layers 1.3.204.1-1
Comment by Laurent Carlier (lordheavy) - Saturday, 12 March 2022, 13:03 GMT
It works fine here with a radeon vega64 card, so it's not a packaging issue. You should file a bug report upstream here https://gitlab.freedesktop.org/mesa/mesa/-/issues

[info] Logger initialized
[info] Initializing Vulkan sample
[info] Vulkan debug utils enabled (VK_EXT_debug_utils)
[info] Extension VK_KHR_get_physical_device_properties2 found, enabling it
[info] Extension VK_EXT_debug_utils found, enabling it
[info] Extension VK_KHR_xcb_surface found, enabling it
[info] Enabled Validation Layers:
[info] Found GPU: AMD RADV VEGA10
[info] Selected GPU: AMD RADV VEGA10
[info] Dedicated Allocation enabled
[info] Device supports the following requested extensions:
[info] VK_KHR_get_memory_requirements2
[info] VK_KHR_dedicated_allocation
[info] VK_KHR_swapchain
[info] VK_KHR_dynamic_rendering
[info] Surface supports the following surface formats:
[info] VK_FORMAT_B8G8R8A8_SRGB, VK_COLORSPACE_SRGB_NONLINEAR_KHR
[info] VK_FORMAT_B8G8R8A8_UNORM, VK_COLORSPACE_SRGB_NONLINEAR_KHR
[info] Surface supports the following present modes:
[info] VK_PRESENT_MODE_IMMEDIATE_KHR
[info] VK_PRESENT_MODE_MAILBOX_KHR
[info] VK_PRESENT_MODE_FIFO_KHR
[info] VK_PRESENT_MODE_FIFO_RELAXED_KHR
[warning] (Swapchain) Image extent (0, 0) not supported. Selecting (1280, 720).
[warning] (Swapchain) Surface format (VK_FORMAT_UNDEFINED, VK_COLORSPACE_SRGB_NONLINEAR_KHR) not supported. Selecting (VK_FORMAT_B8G8R8A8_SRGB, VK_COLORSPACE_SRGB_NONLINEAR_KHR).
[info] (Swapchain) Image usage flags: VK_IMAGE_USAGE_TRANSFER_SRC_BIT VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
[info] (Swapchain) Present mode selected: VK_PRESENT_MODE_MAILBOX_KHR
[info] (Swapchain) Surface format selected: VK_FORMAT_B8G8R8A8_UNORM, VK_COLORSPACE_SRGB_NONLINEAR_KHR
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Total device memory leaked: 0 bytes.
Comment by Marcell Meszaros (MarsSeed) - Saturday, 12 March 2022, 13:27 GMT
@lordheavy please kindly install/enable [vulkan-validation-layers].

The Vulkan-Samples app should then write:

[info] Enabled Validation Layers:
[info] VK_LAYER_KHRONOS_validation

Can you please check if it complains to you as well about
VK_KHR_dynamic_rendering support being incomplete?

Also could you show your output for the following?
$ vulkaninfo --summary
$ pacman -Q | grep -E 'vulkan|mesa'

Thank you (in advance as well) for assisting me in debugging this issue!

This could help to possibly narrow it down to upstream's vulkan-intel driver if that's the culprit.
Comment by Laurent Carlier (lordheavy) - Saturday, 12 March 2022, 16:15 GMT
indeed, adding 'VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation' there is a segfault:

[info] Depth format selected: VK_FORMAT_D32_SFLOAT
[info] Depth format selected: VK_FORMAT_D32_SFLOAT
VUID-vkCmdDrawIndexed-renderPass-06198(ERROR / SPEC): msgNum: -515934184 - Validation Error: [ VUID-vkCmdDrawIndexed-renderPass-06198 ] Object 0: handle = 0x55c8aca26480, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xe13f7818 | vkCmdDrawIndexed: Currently bound pipeline VkPipeline 0x56c9bd0000000040[] must have been created with a VkGraphicsPipelineCreateInfo::renderPass equal to VK_NULL_HANDLE The Vulkan spec states: If the current render pass instance was begun with vkCmdBeginRendering, the currently bound pipeline must have been created with a VkGraphicsPipelineCreateInfo::renderPass equal to VK_NULL_HANDLE (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDrawIndexed-renderPass-06198)
Objects: 1
[0] 0x55c8aca26480, type: 6, name: NULL
VUID-vkCmdDrawIndexed-viewMask-06178(ERROR / SPEC): msgNum: -295923467 - Validation Error: [ VUID-vkCmdDrawIndexed-viewMask-06178 ] Object 0: handle = 0x55c8aca26480, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xee5c90f5 | vkCmdDrawIndexed: Currently bound pipeline VkPipeline 0x56c9bd0000000040[] viewMask ([16449536) must be equal to pBeginRendering->viewMask ([0) The Vulkan spec states: If the current render pass instance was begun with vkCmdBeginRendering, the currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::viewMask equal to VkRenderingInfo::viewMask (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDrawIndexed-viewMask-06178)
Objects: 1
[0] 0x55c8aca26480, type: 6, name: NULL
VUID-vkCmdDrawIndexed-colorAttachmentCount-06179(ERROR / SPEC): msgNum: -52447566 - Validation Error: [ VUID-vkCmdDrawIndexed-colorAttachmentCount-06179 ] Object 0: handle = 0x55c8aca26480, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xfcdfb6b2 | vkCmdDrawIndexed: Currently bound pipeline VkPipeline 0x56c9bd0000000040[] colorAttachmentCount ([16449787) must be equal to pBeginRendering->colorAttachmentCount ([1) The Vulkan spec states: If the current render pass instance was begun with vkCmdBeginRendering, the currently bound graphics pipeline must have been created with a VkPipelineRenderingCreateInfo::colorAttachmentCount equal to VkRenderingInfo::colorAttachmentCount (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDrawIndexed-colorAttachmentCount-06179)
Objects: 1
[0] 0x55c8aca26480, type: 6, name: NULL
Erreur de segmentation (core dumped)
Comment by Marcell Meszaros (MarsSeed) - Sunday, 13 March 2022, 08:51 GMT
The VK_LAYER_KHRONOS_validation causes segfault even on latest NVIDIA proprietary driver
in the Vulkan-Samples 'dynamic_rendering' app (only the app crashes, the system/OS/DE etc. stays stable).

But on [vulkan-intel], that demo app segfaults even without the validation layer.

That means there is an upstream issue in [vulkan-intel] (Mesa ANV)
regarding the new Vulkan 1.3 core feature VK_KHR_dynamic_rendering.

Whereas without validation, 'dynamic_rendering' sample works on NVIDIA proprietary (tested by me)
and on Mesa's [vulkan-radeon] (RADV) (tested by @lordheavy).

Conclusion:
The valiation-related segfault seems not to be specific to [mesa] itself.
Comment by Marcell Meszaros (MarsSeed) - Sunday, 13 March 2022, 09:06 GMT
I was also wrong to report that other samples in general have glitches.
Only one Vulkan Sample showed in garbled colors, 'specialization_constants', on [vulkan-intel].
But it has now been resolved after [vulkan-icd-loader] update and rebuilding Vulkan-Samples.

In testing [vulkan-intel] without validation layer,
apart from the 'dynamic_rendering' segfault,
all other Vulkan-Samples apps either work or gracefully error out.

I've also tested [mesa] 22.0.0 with OpenGL benchmarks like Basemark and Unigine Superposition.
All of them worked without any glitch.
Comment by Laurent Carlier (lordheavy) - Sunday, 13 March 2022, 09:16 GMT
closing as upstream bug

Loading...