Hi!
I use Tessellation shaders for creating VkPipeline. But during calling vkCreateGraphicsPipelines I got crash
Vulkan driver info: Conformance Version: 1.2.2.0 ID: VK_DRIVER_ID_ARM_PROPRIETARY Name: Mali-G57 MC2 Info: v1.r26p0-01eac0.db14d76a92163ae64c7b9e4d58c437a5
I attached Debug APK
I attached shaders original + spirv (old)
I attached Android Studio project with source and shaders
See VkPipelineAndroid_template\app\src\main\shaderSources
Small test apk
I can provide additional information.
Hi Pavel Rudko I attached Android Studio project with source and shaders
Hi,
Mali Best Practice is not to have Tessellation shaders (they give bad performance), but in this case there's also likely a bug you're hitting, in the HLSL->DXC->SPIR-V process. DXC-compiled tessellation shaders don't work on Mali (since R26), they create a problematic pattern.
A proposed workaround exists:
-> round-trip the SPIR-V through GLSL (using SPIRV-Cross) and back to SPIR-V again.
There are DXC patterns that SPIRV-Cross can't cope with either, so depends whether you hit those (it didn't work for another developer who hit this issue). In that case it might just need the SPIR-V to be patched.
Hi, Thank you Ben Clarkfor you reply.
Ben Clark said:but in this case there's also likely a bug you're hitting, in the HLSL->DXC->SPIR-V process. DXC-compiled tessellation shaders don't work on Mali (since R26), they create a problematic pattern.
I use glslang for creating SPIR-V from HLSL, see "Android studio project with source and shader":
VkPipelineAndroid_template\app\src\main\shaderSources\compile_hull.cmd
glslangValidator.exe -V -D -e hMain hs.tesc
VkPipelineAndroid_template\app\src\main\shaderSources\compile_domain.cmd:
glslangValidator.exe -V -D -e dMain ds.tese
Ben Clark said:round-trip the SPIR-V through GLSL (using SPIRV-Cross) and back to SPIR-V again.
I think this is a strange solution, Will ARM fix driver's bug for new GPU or drivers ?
Qualcomm will fix the same problem: developer.qualcomm.com/.../68860
It is already in the system as a bug, although I don't know how quickly it will be got to. Regardless, if/when it is fixed for new drivers, they only tend to get loaded on new phones, so you'll have a set of phones out there that you'll need a workaround for.
And if we can encourage you away from tessellation shaders all the better :)
Hi Ben Clark I will wait this fix and check this bug on new phones...