protonscr

Hellblade: Senua's Sacrifice radv hang

dxvkclosed amd radv
doitsujin/dxvk#212 · opened 2018-03-26 by notaz · updated 2018-04-20 · 5 comments · github
2 matching comments, n / p to jump
Nnotaz 2018-03-26 github

https://bugs.freedesktop.org/show_bug.cgi?id=105613
This is a driver bug, but it's worth tracking it here too for possible workarounds.

The radv bug report contains a modified GLSL version of the shader as a workaround.
Question: how to compile it to a working .spv? All my attempts produce a .spv that crashes radv (instead of hanging the GPU).

Ddoitsujin maintainer 2018-03-26 github

Running glslangValidator -V shader.glsl -o shader.spv works just fine on mesa-git in combination with DXVK_SHADER_READ_PATH.

Since there are a ton of rendering issues even with the "fixed" shader, it's best to start the game with the -dx10 command line option - most of the post processing effects will be missing, but at least it'll render something reasonable.

Just FYI, I'm the one who reported that bug. Probably an LLVM issue, which means that we'll probably have to wait several months for a fix, if it gets fixed at all.

Nnotaz 2018-03-27 github

Which version of glslangValidator is that?

With one from VulkanSDK 1.1.70.1 it just dumps the help text and exits.
If I add "-S comp", it then complains:

ERROR: CS_ae92bee6ed42b6b9e549e18b88e2dcce98901167.glsl:20: 'binding' : sampler/texture/image requires layout(binding=X)

Older versions complain:

ERROR: CS_ae92bee6ed42b6b9e549e18b88e2dcce98901167.glsl:18: 'binding' : sampler binding not less than gl_MaxCombinedTextureImageUnits

If I hack that out, it works, but the resulting .spv crashes radv.
Could you share your .spv?

Ddoitsujin maintainer 2018-04-07 github

Here's the SPIR-V. I wonder why the compiler is complaining about OpenGL-related limits though, they do not apply to Vulkan.

CS_ae92bee6ed42b6b9e549e18b88e2dcce98901167.zip

Anyway, closing this in favour of #252.

Nnotaz 2018-04-20 github

radv is not accepting this binary for me:

SPIR-V parsing FAILED:
    In file spirv/spirv_to_nir.c:331
    count >= 1 && w + count <= end
    560 bytes into the SPIR-V binary

Additionally, when running without DXVK_SHADER_READ_PATH, there seem to be some validation issues with current dxvk:

DS(ERROR): object: 0x0 type: 0 location: 2912 msgCode: 6: Layout for depth attachment is VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR but can only be DEPTH_STENCIL_ATTACHMENT_OPTIMAL, DEPTH_STENCIL_READ_ONLY_OPTIMAL or GENERAL.
...
DS(ERROR): object: 0x1a5a030 type: 6 location: 2664 msgCode: 6: Cannot submit cmd buffer using image (0x2b55) [sub-resource: aspectMask 0x1 array layer 28, mip level 0], with layout VK_IMAGE_LAYOUT_UNDEFINED when first use is VK_IMAGE_LAYOUT_GENERAL.

Ddoitsujin maintainer 2018-04-20 github

I'm aware of the validation errors and I'm pretty sure those are actually bugs in the validation layers. They don't seem to handle 2D array views into 3D images properly.

Launch options