protonscr

Path of Exile - vkCreateImage and vkCreateImageView errors

dxvkclosed bug
doitsujin/dxvk#147 · opened 2018-03-10 by jmis · updated 2018-06-29 · 58 comments · github
1 matching comments, n / p to jump
Jjmis 2018-03-10 github

IMAGE(ERROR): object: 0x0 type: 0 location: 666 msgCode: 165676976: vkCreateImage: usage bit VK_IMAGE_USAGE_STORAGE_BIT is not supported for format VK_FORMAT_R8G8B8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL. The spec valid usage text states 'If tiling is VK_IMAGE_TILING_OPTIMAL, and VkFormatProperties::optimalTilingFeatures (as returned by vkGetPhysicalDeviceFormatProperties with the same value of format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, usage must not contain VK_IMAGE_USAGE_STORAGE_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-tiling-00984)

IMAGE(ERROR): object: 0x0 type: 0 location: 3533 msgCode: 180357100: vkCreateImageView() pCreateInfo->format VK_FORMAT_R8G8B8A8_SRGB cannot be used with an image having the VK_IMAGE_TILING_OPTIMAL and VK_IMAGE_USAGE_STORAGE_BIT flags set. The spec valid usage text states 'If image was created with VK_IMAGE_TILING_OPTIMAL and usage contains VK_IMAGE_USAGE_STORAGE_BIT, format must be supported for storage images, as specified by the VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT flag in VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties with the same value of format' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageViewCreateInfo-image-01014)

Software information

  • Game: Path of Exile
  • Version: 3.2b - 64bit

System information

  • GPU: Geforce GTX 970
  • Driver: 390.25
  • Wine version: wine-vulkan 3.3
  • DXVK version: 85d28f7

Log files

Ddoitsujin maintainer 2018-03-10 github

That's a general bug in the swapchain code, it should check whether the image format can be used for storage images at all before creating the back buffer. Will fix that.

Don't get your hopes up though, that bug doesn't have any impact on any game on any hardware.

GGlog78 2018-03-10 github

i can play poe with dxvk already. I am on an gtx 970 with wine-staging 3.3 +wic patch with vulkan.dll's from wine-staging 2.25 and d3dcompiler_43 + d3dcompiler_47 set native. Not sure if that helps you ?

TThaodan 2018-03-10 github

what is wic patch?

GGlog78 2018-03-10 github
Jjmis 2018-03-10 github

@Glog78 What driver are you using?

GGlog78 2018-03-10 github

https://i.imgur.com/bgu4KRC.jpg / here a screenshot
Driver: 390.25.0

Jjmis 2018-03-10 github

@Glog78 Did you ever encounter a "TextureD3d11.cpp" application error when loading into the city?

GGlog78 2018-03-10 github

Not as extra message on the screen. But i can try a new character if it helps and play to the first city. Maybe its the first portal or something like this.

@jmis on my end even with a new character i can get into the first city and no problems so far

Jjmis 2018-03-11 github

I'm guessing the error is related to wine 3.3. Maybe I can figure something out from looking at the staging patches.

GGlog78 2018-03-11 github

the last commit 5b9e4c1faa41494d83a878fe621ee16f11bce2ab broke it for me too.

Update old version doesn't work for me either now. I dunno what changed since yesterday. This is really strange.

GGlog78 2018-03-11 github

Update: the last git works again for me. I hope @jmis you figure out what isn't working for you. The DX11 code seems to be much more responsive than the older dx9 or dx9ex renderer. So thank you for dxvk.

Jjmis 2018-03-12 github

@Glog78 You have a strange wine setup for DXVK. I'm using wine-vulkan 3.3 and the latest DXVK. Wine-staging lets me load the game using DX11 to OpenGL but it lacks the vulkan interface so DXVK fails. Some patch in wine-staging is fixing the issue. I have an email out to GGG support asking for more information about the error. Hopefully that will help figure it out.

Ddoitsujin maintainer 2018-03-12 github

The validation errors should be fixed in 56c826be85f107ce0c08cae2309ac669a556c0b9, please let me know if that is the case.

GGlog78 2018-03-12 github

@jmis i have both setups. wine-vulkan 3.3 with lunar sdk and so on. But the sdk is blowing the size of the wineprefix. So i did compile wine-staging-git and added into the system32 and syswow64 folders the precompiled vulkan dlls from wine-staging 2.25. Both prefixes works with DXVK but i prefer the much smaller second on and this is the prefix i tested path of exile before and it works for me.
Tomorow i will also test the new commits.

GGlog78 2018-03-13 github

@doitsujin i tested the 06cff50453abcda2cadd0e485e6e4327704889c3

DXVK_SHADER_VALIDATE=1 DXVK_DEBUG_LAYERS=1 DXVK_LOG_LEVEL=trace DXVK_HUD=1 wine ./PathOfExile_x64.exe

....

IMAGE(ERROR / SPEC): object: 0x0 type: 0 msgNum: 165676926 - vkCreateImage: Image mip levels exceed image format maxMipLevels for format VK_FORMAT_R8G8_UNORM. The spec valid usage text states 'mipLevels must be less than or equal to VkImageFormatProperties::maxMipLevels (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-extent-00959)
IMAGE(ERROR): object: 0x0 type: 0 location: 769 msg_code: 165676926: Object: 0x0 | vkCreateImage: Image mip levels exceed image format maxMipLevels for format VK_FORMAT_R8G8_UNORM. The spec valid usage text states 'mipLevels must be less than or equal to VkImageFormatProperties::maxMipLevels (as returned by vkGetPhysicalDeviceImageFormatProperties with format, imageType, tiling, usage, and flags equal to those in this structure)' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkImageCreateInfo-extent-00959)
err: DxvkImage::DxvkImage: Failed to create image
...

There are also shaders with unknown vertex semantic:
debug: D3D11Device: No such vertex shader semantic: TANGENT0
debug: Compiling shader VS_74bda68a39ac4fb17be9fc18f861ab7a0db3003e
debug: D3D11Device: No such vertex shader semantic: TANGENT0
debug: D3D11Device: No such vertex shader semantic: TEXCOORD0
debug: D3D11Device: No such vertex shader semantic: TANGENT0
debug: D3D11Device: No such vertex shader semantic: TEXCOORD0
debug: D3D11Device: No such vertex shader semantic: TANGENT0
debug: D3D11Device: No such vertex shader semantic: TANGENT0
debug: D3D11Device: No such vertex shader semantic: TEXCOORD0
debug: D3D11Device: No such vertex shader semantic: TANGENT0
debug: D3D11Device: No such vertex shader semantic: TEXCOORD0
debug: D3D11Device: No such vertex shader semantic: TANGENT0
debug: D3D11Device: No such vertex shader semantic: TEXCOORD0
debug: D3D11Device: No such vertex shader semantic: TANGENT0

I hope this helps

Ddoitsujin maintainer 2018-03-13 github

I'd need an apitrace to debug the validation issue. Although it's extremely weird that the number of mip levels appears to be limited for a given format.

There are also shaders with unknown vertex semantic:

Not a bug.

GGlog78 2018-03-13 github

@doitsujin do you need one from inside of wine or is it enough to give you one from linux with wine on top ?

Ddoitsujin maintainer 2018-03-13 github

inside wine or windows, because only then apitrace can capture the D3D commands. Running the Linux version of apitrace with wine only records OpenGL commands, which is completely useless in this case.

GGlog78 2018-03-13 github

cleaned all shader caches and started with:

DXVK_SHADER_VALIDATE=1 DXVK_DEBUG_LAYERS=1 DXVK_LOG_LEVEL=trace DXVK_HUD=1 wine ./apitrace/bin/apitrace.exe trace -a dxgi PathOfExile_x64.exe

in wine-vulkan (git)

https://www.dropbox.com/s/2le2uym83orjk5x/logs.7z?dl=0

GGlog78 2018-03-13 github

disabling image mapping e6814332e741ac7222fe1c372fda7aed86ce657b fixes it for me again

Jjmis 2018-03-14 github

@Glog78 Did you have any luck when trying wine-vulkan 3.3 + latest DXVK?

GGlog78 2018-03-14 github

@jmis no wine-vulkan (git) doesn't work for me.

if you are on arch i can provide you my PKGBUILDS and the files i dropped into wine-staging (git).

Ddumpsters 2018-03-14 github

Did some testing

Linux:

Using wine-vulkan-git with the WIC patch applied I also get the TextureD3d11.cpp game crash window popup when initially loading into the city, login screen works normally.

  • Patched wine-vulkan-git (AUR) with WIC patch and installed it
  • Installed Vulkan SDK (latest?) and created the registry entries/json files in the PoE preffix as said in the wine-vulkan git page
  • Compiled latest DXVK and ran /usr/bin/setup_dxvk64 inside the PoE preffix
  • Set d3dcompiler_43 and d3dcompiler_47 to native like Glog78 said he was using

DXVK_SHADER_VALIDATE=1 DXVK_DEBUG_LAYERS=1 DXVK_LOG_LEVEL=trace DXVK_HUD=1 WINEARCH=win64 WINEPREFIX=~/.wine_vms/PoE wine 'C:\Games\Path of Exile\PathOfExile_x64.exe'
logs:
[same run]
d3d11 log: https://pastebin.com/raw/qD85JwUM
dxgi log: https://pastebin.com/raw/JL8ZxuYM

[different runs, same crash]
wine output: https://pastebin.com/raw/3pCU8qgx
apitrace: https://mega.nz/#!HYh1jIKI!jpwlFPLcOaZkOjEobSETtHf0XDWZXT-uMCi3IxlkyEg

Windows:

Using DXVK .dll compiled with the above setup it works pretty well, even with dynamic resolution although it stays on low quality for most of the time and doesn't improve performance that much. Loading screens seem to be a bit longer than DX11 and there is very annoying stutter/framedrops
[SAME ENVIRONMENT VARS] .../installdir/PathOfExile_x64.exe --nointro --nologo --noasync
logs (longer since I played for a bit):
d3d11 log: https://pastebin.com/raw/4QUjmDAz
dxgi log: https://pastebin.com/raw/HttaQTTH

Does anyone know if the installdir/CachedHLSLShaders or installdir/ShaderCacheD3D11 can mess with DXVK?

Vvamur 2018-03-14 github

Path of Exile works on wine staging 3.3 + AMD + mesa git with both image tiling and without. Maybe an issue with Nvidia driver? Or Wine and Nvidia combination.

GGlog78 2018-03-14 github

for me ->

works:
without tiling -> wine staging git + wine staging 2.21 vulkan dlls + wic patch (CoInitialize Patch) + nvidia

doesn't work:
with tiling -> wine staging 3.3 + wine staging 2.21 vulkan dlls + wic patch (CoInitialize Patch) + nvidia -> the old version had vkCreateImage Errors
with and without tiling -> wine vulkan git + wic patch (CoInitialize Patch) + nvidia -> TextureD3d11.cpp

can't test because i don't have this wine setup -> wine staging git + wine vulkan patches ....

GGlog78 2018-03-15 github

One more information. I updated today wine-staging (git) and since today i get the TextureD3d11.cpp error with wine-staging too. So it might actually be a commit in wine which creates this error.

GGloriousEggroll 2018-03-16 github

@Glog78 I was getting the same TextureD3d11.cpp error with wine-staging-git. Overwatch also has a weird render issue with current wine-staging-git. Rolling back wine-staging to this hash e8d98eb7ba2e7aaf610196b67c713f2be13a15ff (and wine mainline hash dfde1195385df5ddb11f1104a0e744596b99477f) fixes the problem. You still need the CoInitialize Patch to launch the game.

Xxethm55 2018-03-16 github

Attempted to run this with https://aur.archlinux.org/packages/wine-staging-vulkan-git/ and https://aur.archlinux.org/packages/dxvk-git/ following the guide from @dumpsters above.
I get the following error:
err: ExtensionSet::addInstanceExtensions: Failed to query instance extensions
wine: Unhandled page fault on read access to 0x00000000 at address 0x1404f622e (thread 002e), starting debugger...
Unhandled exception: page fault on read access to 0x00000000 in 64-bit code (0x00000001404f622e).

Computer:
Ryzen 5 1600
16 GB Ram
2GB RX560
Running amdgpu Driver
Up-to-date Manjaro with kernel 4.15.8

Any ideas what I did wrong?

Full run log attached (note I don't have any WINEDEBUG explicity set)
dxvk_poe.txt

Xxethm55 2018-03-16 github

Ok, I figured out what I did wrong. I input the registry keys wrong. Once I corrected them with the attached file I was able to get into game. However my Performance was really bad with the HUD up I was getting ~1-5FPS. Also was not able to get into the Town as I had the same error as others: TextureD3d11.cpp

vulkan.reg.txt

GGloriousEggroll 2018-03-16 github

@xethm55 read my reply. it tells you why the Textured3d.cpp error is happening. it's not dxvk related.

Xxethm55 2018-03-16 github

I rebuilt https://aur.archlinux.org/packages/wine-staging-vulkan-git/ with pinning wine-vulkan and wine-staging the the above mentioned versions. When I attempt to run with them I just get an error that VK_KHR_surface cannot be found.

The VulkanSDK test Cube.exe only runs normally after commit 32eef26a7dbbd755d20494454e3b657c48ba1bc1

GGloriousEggroll 2018-03-17 github

@xethm55 looks like its fixed as of 3.4 staging (rebased a few minutes ago)
https://github.com/wine-staging/wine-staging/tree/v3.4

poe34

Jjmis 2018-03-17 github

Fixed as well for me with wine-staging 3.4 + latest DVXK.

I wish we knew the root cause though.

Ddumpsters 2018-03-17 github

I managed to load into town as well with wine-staging 3.4 but performance is abysmal, like 1~8FPS. Performance in the login screen is worse than before as well

Vvamur 2018-03-17 github

Performance is about 30%-100% better than WineDX11 on low end AMD with wine-staging 3.4 + old DXVK with image tiling. Getting about 40-120 in various areas in Act 1, with average of 60+ on all low settings 1080p. There is however lots of initial stuttering, somewhat more than on DX11, due to shader compilation. Using code from Lutris.

DXVK_HUD=1 WINEDEBUG=-all mesa_glthread=true wine64 "/homedir/.wine/drive_c/Program Files (x86)/Grinding Gear Games/Path of Exile/PathOfExile_x64.exe" --waitforpreload --nologo --gc2

Ddoitsujin maintainer 2018-03-17 github

Can anyone please test this with the direct-image-mapping branch?

GGlog78 2018-03-17 github

doitsujin direct-image-mapping branch now works for me too.

https://i.imgur.com/Q9VK7jn.jpg

Great work.

Oh yeah this is wine-staging 3.4 + sdk + dxvk + the patch needed for poe (coinitialize)

Xxethm55 2018-03-17 github

With wine-staging 3.4 I am able to get into the game and performance seems better than Directx9, but I am missing a lot of textures. This is on master with the command
DXVK_HUD=1 WINEARCH=win64 WINEDEBUG=-all mesa_glthread=true wine PathOfExile.exe --waitforpreload --gc2

screenshot_2018-03-17_10-38-39

Xxethm55 2018-03-17 github

I get the same results with the direct-image-mapping branch.

Ddoitsujin maintainer 2018-03-17 github

@xethm55 please try with mesa-git. mesa 17.3 has a bunch of bugs that affect DXVK.

GGloriousEggroll 2018-03-17 github

PoE Renders properly on mesa-git with direct-image-mapping branch, but stutters pretty badly. fps stayed around 30-40 on low settings. I will also test with master and pull master changes into image mapping and test that way. Used --nologo --waitforpreload

0:58 and 1:18 for some stuttering:
https://www.youtube.com/watch?v=2Qptidx0M_w

Vvamur 2018-03-17 github

For stuttering it's a PoE issue - https://bugs.winehq.org/show_bug.cgi?id=34011

fps stayed around 30-40 on low settings

What about the Ledge and Climb in Act 1? Have you disabled Engine Multithreading?

Can anyone please test this with the direct-image-mapping branch?

Is there a precompiled version? Compiling mingw is a lot of hassle on arch.

GGloriousEggroll 2018-03-17 github

@vamur I already had glsl disabled and -gc 1. -ns makes no difference. stuttering is still there. also tried various combinations of noasync and waitforpreload

Xxethm55 2018-03-17 github

@vamour see https://wiki.archlinux.org/index.php/Unofficial_user_repositories#mingw-w64
There is also https://wiki.archlinux.org/index.php/Unofficial_user_repositories#mesa-git to upgrade mesa.
Note: I put SigLevel = Never under the section of each user repo as they are unsigned.
Note 2: The above can be dangerous and it not recommeneded.

Xxethm55 2018-03-17 github

I have updated to mesa-git. Runing glxinfo -B I get:
glxinfo -B name of display: :0.0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: X.Org (0x1002) Device: Radeon RX 560 Series (POLARIS11 / DRM 3.23.0 / 4.15.8-1-MANJARO, LLVM 7.0.0) (0x67ff) Version: 18.1.0 Accelerated: yes Video memory: 2024MB Unified memory: no Preferred profile: core (0x1) Max core profile version: 4.5 Max compat profile version: 3.1 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.1
However when I run Path of Exile with DXVK HUD it still shows 17.3.6 and I have all the same graphical glitches. I have rebuilt Wine and DXVK. Cleared out the shader caches in PoE, and created a fresh production_config.ini as well.
Any Ideas?

GGlog78 2018-03-17 github

xethm55 i supose you are starting the 32bit executable instead of the 64bit executable and since you only upgrade to mesa-git you don't have upgraded your 32bit libs. Besides mesa-git you might want to have lib32-mesa-git most likely.

GGloriousEggroll 2018-03-18 github

Game's running great now. GLSL disabled, anti-aliasing and multithreading disabled in game, using launch options -gc 2 --softwareaudio:

https://www.youtube.com/watch?v=Oml17BUf760

Xxethm55 2018-03-18 github

I have both mesa-git and lib32-mesa-git installed. I tried it with both the 32bit and 64bit executables.
Same results. I am at a loss.

Edit: If figured it out. I need to also install vulkan-radeon-git and lib32-vulkan-radeon-git. Once I did that i was able to run just fine -- except for the low FPS when loading shaders.

Ppingubot 2018-03-18 github

@GloriousEggroll : Afaik, the glsl option should not have any impact cause itis an option for dx->opengl, which is not in use when using dxvk. In addition, could ou specifiy which version of dxvk you are using to have the game running grea now ?

GGloriousEggroll 2018-03-18 github

@pingubot thats what i thought about glsl, but i had it disabled before i set up dxvk anwyay. I compiled it last night. latest commit when i compiled was a8eecfbfe59e4aecc5d0332ce5c1394a53d065ea

Ddoitsujin maintainer 2018-03-18 github

Closing this because apparently the game runs fine now.

Ddumpsters 2018-03-21 github

6550e8d broke the game on my end (screenshot), reverted to 894444d and it works fine. Anyone else?
2
1
it's supposed to look like this https://i.imgur.com/Pmq1q6h.jpg

DXVK_DEBUG_LAYERS=1 DXVK_LOG_LEVEL=trace DXVK_HUD=1 WINEARCH=win64 WINEPREFIX=~/.wine_vms/PoE wine 'C:\Games\Path of Exile\PathOfExile_x64.exe' --nointro --nologo --noasync --waitforpreload &> wine.txt
wine: https://pastebin.com/raw/ZqeWFrcj
d3d11: https://pastebin.com/raw/y0ZHrajZ
dxgi: https://pastebin.com/raw/ucUbzixU

Ddoitsujin maintainer 2018-03-21 github

Please open a new issue and record an apitrace if possible, I can't debug this issue without one.

Ddumpsters 2018-03-21 github

@doitsujin So this is pretty weird... I checked 4 different commits and they gave me different results. I'm compiling using the dxvk-git package in the AUR and changing the source line in PKGBUILD, example for the bugged one:
source=($pkgname::"git+https://github.com/doitsujin/dxvk.git#commit=6550e8d623cafd9390c897cdc91adfbef13d31f5")

Results of my testing in order of commit date:
works - 894444d43d412190b8328a6843d5f3a2d090e732
bugged - 6550e8d623cafd9390c897cdc91adfbef13d31f5
bugged - 4518b1b76e59ef09430031928479e8387e19df73
works (wtf) - bd71f256e58ba7c136385dd98a3184b94429254e

I triple checked 6550e8d623cafd9390c897cdc91adfbef13d31f5 and bd71f256e58ba7c136385dd98a3184b94429254e and they gave me the same results three times so yeah. What's weird is that the latest commit seems to be rendering fine again, if you're still interested in the apitrace let me know and I'll generate one for 6550e8d623cafd9390c897cdc91adfbef13d31f5

Ddoitsujin maintainer 2018-03-21 github

bd71f256e58ba7c136385dd98a3184b94429254e fixes a bug in the D3D11.1 features that were first exposed in 6550e8d623cafd9390c897cdc91adfbef13d31f5, so that would make sense, thanks for testing.

It would still be great to have an apitrace for the game so that i'll be able to do some regression testing in the future.

Ddumpsters 2018-03-21 github

In a new commit or here? I can generate the apitrace for both bd71f25 and 6550e8d

Ddoitsujin maintainer 2018-03-21 github

The newest one (although it shouldn't make any difference, since the bug mostly affected the Vulkan backend) if you want to record it with dxvk. Which probably makes sense since wined3d doesn't even support D3D11.1 as far as I'm aware.

Ddumpsters 2018-03-21 github

@doitsujin Alright I did it with bd71f25, here you go:
{removed}

I included d3d11.log dxgi.log and wine.log in as well, I noticed a lot more warnings than before in the d3d11.log so you might want to check those out.
I tried replaying it with my normal .wine prefix and it crashed, it only worked on the one I have dxvk installed so I think it did it right. It's worth noting that you can't really notice the 30+ seconds freeze in the login screen before you are able to click anything when you open the game in the replay (at least here it was sped up).
Let me know if you need any more info.

Launch options

Upstream links

DLLs