Bug 111092 - Devil May Cry 5 segfaults with "unsupported nir load_const bit_size: 1", first bad commit: "radv: Use NIR barycentric intrinsics", 118a66df9907772bb9e5503b736c95d7bb62d52c
Summary: Devil May Cry 5 segfaults with "unsupported nir load_const bit_size: 1", firs...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/radeon (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-09 08:08 UTC by Kyle De'Vir
Modified: 2019-07-10 09:02 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
All of the captured pipelines (779.08 KB, application/x-xz)
2019-07-09 10:22 UTC, Kyle De'Vir
Details
Terminal output (7.07 KB, text/plain)
2019-07-09 10:23 UTC, Kyle De'Vir
Details

Description Kyle De'Vir 2019-07-09 08:08:42 UTC
Devil May Cry 5 segfaults with the error "unsupported nir load_const bit_size: 1"

The first bad commit: "radv: Use NIR barycentric intrinsics", 118a66df9907772bb9e5503b736c95d7bb62d52c
Comment 1 Connor Abbott 2019-07-09 09:04:16 UTC
Can you upload a trace that shows the problem? I think the easiest way is to use vkpipeline-db (https://gitlab.freedesktop.org/mesa/vkpipeline-db) to capture the shaders using a mesa before the problem commit and then compile them using mesa master to find the problematic pipeline_test file.
Comment 2 Kyle De'Vir 2019-07-09 09:11:43 UTC
Yeah, I will.

Just realized I should have specified I ran it using DXVK, not VKD3D. Not that it makes a difference, perhaps.
Comment 3 Kyle De'Vir 2019-07-09 09:42:03 UTC
vkpipeline-db isn't dumping any shaders... despite my environment variables being correct.

This is how I run it:

export VK_LAYER_PATH="/run/media/valmar/DataSSD/Games/WineLibraries/x64/VkLayer_vkpipeline_db.json"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/run/media/valmar/DataSSD/Games/WineLibraries/x64/libVkLayer_vkpipeline_db.so"
export VK_INSTANCE_LAYERS="VK_LAYER_vkpipeline_db"

mkdir -p "/run/media/valmar/DataSSD/Games/SteamLibraryLinux/steamapps/common/Devil May Cry 5/CapturedShaders"
export VKPIPELINE_DB_CAPTURE_PATH="/run/media/valmar/DataSSD/Games/SteamLibraryLinux/steamapps/common/Devil May Cry 5/CapturedShaders"
export ENABLE_VKPIPELINE_DB="1"

${ProtonWineBinary} "${GameDir}/${GameBinary}"
Comment 4 Rhys Perry 2019-07-09 09:52:40 UTC
(In reply to kyle.devir from comment #3)
> vkpipeline-db isn't dumping any shaders... despite my environment variables
> being correct.
> 
> This is how I run it:
> 
> export
> VK_LAYER_PATH="/run/media/valmar/DataSSD/Games/WineLibraries/x64/
> VkLayer_vkpipeline_db.json"
> export
> LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/run/media/valmar/DataSSD/Games/
> WineLibraries/x64/libVkLayer_vkpipeline_db.so"
> export VK_INSTANCE_LAYERS="VK_LAYER_vkpipeline_db"
> 
> mkdir -p
> "/run/media/valmar/DataSSD/Games/SteamLibraryLinux/steamapps/common/Devil
> May Cry 5/CapturedShaders"
> export
> VKPIPELINE_DB_CAPTURE_PATH="/run/media/valmar/DataSSD/Games/
> SteamLibraryLinux/steamapps/common/Devil May Cry 5/CapturedShaders"
> export ENABLE_VKPIPELINE_DB="1"
> 
> ${ProtonWineBinary} "${GameDir}/${GameBinary}"

Try setting LD_LIBRARY_PATH to "$LD_LIBRARY_PATH:/run/media/valmar/DataSSD/Games/WineLibraries/x64/" instead?
I also set VK_LAYER_PATH to the directory containing VkLayer_vkpipeline_db.json
Comment 5 Kyle De'Vir 2019-07-09 10:05:07 UTC
Always the obvious things. :P
Comment 6 Kyle De'Vir 2019-07-09 10:22:50 UTC
Created attachment 144733 [details]
All of the captured pipelines
Comment 7 Kyle De'Vir 2019-07-09 10:23:16 UTC
Created attachment 144734 [details]
Terminal output
Comment 8 Kyle De'Vir 2019-07-09 10:24:04 UTC
Okay, I've uploaded the shaders, and terminal output.
Comment 9 Connor Abbott 2019-07-09 10:32:56 UTC
Thanks, I managed to reproduce the crash with 124.pipeline_test. I'll look into it now.
Comment 10 Connor Abbott 2019-07-09 12:09:53 UTC
Hopefully https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1298 should fix it. It now gets further with my machine, but it fails on 27.pipeline_test with:

run: /home/cwabbott/src/vkpipeline-db/serialize.c:723: deserialize_depth_stencil_state: Assertion `pInfo->sType == VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO' failed.

I have no idea why though, and it seems like a vkpipeline-db problem and not a problem with the game.
Comment 11 Kyle De'Vir 2019-07-09 12:45:11 UTC
Thanks! :)
Comment 12 Connor Abbott 2019-07-10 08:39:29 UTC
That MR is now merged, does the game work?
Comment 13 Kyle De'Vir 2019-07-10 09:02:38 UTC
It works, thank you. :)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.