I attached apk with RenderDoc’s capture from Adreno 660(vk_adreno660.rdc), screenshot(Adreno660_RenderDoc.jpg), PowerVR Gm9446.logcat.txt, stack trace(stack.txt).
Also Vertex and pixel Shaders (Spirv) and source HLSL code
Hi @AlejandroC, Thank you for your Answer, The result from PowerVR GE 8100 ZTEBlade (DDK 1.9)
… ZEUS androidvulkan.androidvulkan E < ERROR>: [zeus/core/pipeline.c:3362 PipelineCompileFragmentStage]
*******
… ZEUS androidvulkan.androidvulkan E PipelineCompileFragmentStage: Failed to compile UF to HW (UF_ERR_INTERNAL 0x8)
… ZEUS androidvulkan.androidvulkan E < ERROR>: [zeus/core/pipeline.c:4201 IMG_vkCreateGraphicsPipelines]
*******
… ZEUS androidvulkan.androidvulkan E Failed to create Graphics Pipeline 0
… 3DMove androidvulkan.androidvulkan D Error: Vulkan Error: Function vkCreateGraphicsPipelines has returned error VK_ERROR_OUT_OF_HOST_MEMORY
2023-12
Thanks for all the material and information provided. I tried to reproduce the crash on several PowerVR GPUs with no luck, one of them with a driver version quite close to the one in the device reported having issues (1.13@5793700 vs 1.13@5776728).
Reviewing the logcat attached PowerVR Gm9446.logcat I can see several Invalid color format errors, which are also reported in the PVRCarbon recording trace_adreno_660.pvrcbn (tab Static Analysis on the lower part of the UI) and one validation error VkImageMemoryBarrier-newLayout-parameter. I would recommend to fix those errors first and then verify if the issue is still happening, as it could be related with them. Some GPU manufacturers have robustness implemented at driver level, which can explain why the same application with the same errors works on some platforms and fails on others.
2023-12-07 10:34:24.026 15964-18459 IMGSRV androidvulkan.androidvulkan E :1415: GrallocTestAlloc: Invalid color format (56)
2023-12-07 10:34:24.026 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:216 Invalid BufferDescriptorInfo
2023-12-07 10:34:24.026 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:217 width -> 1
2023-12-07 10:34:24.026 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:218 height -> 1
2023-12-07 10:34:24.026 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:219 format -> 56
2023-12-07 10:34:24.026 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:220 usage -> 0x0b00
2023-12-07 10:34:24.027 15964-18459 IMGSRV androidvulkan.androidvulkan E :1415: GrallocTestAlloc: Invalid color format (56)
2023-12-07 10:34:24.027 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:216 Invalid BufferDescriptorInfo
2023-12-07 10:34:24.027 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:217 width -> 1
2023-12-07 10:34:24.027 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:218 height -> 1
2023-12-07 10:34:24.027 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:219 format -> 56
2023-12-07 10:34:24.027 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:220 usage -> 0x0b00
2023-12-07 10:34:24.028 15964-18459 IMGSRV androidvulkan.androidvulkan E :1415: GrallocTestAlloc: Invalid color format (56)
2023-12-07 10:34:24.028 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:216 Invalid BufferDescriptorInfo
2023-12-07 10:34:24.028 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:217 width -> 1
2023-12-07 10:34:24.028 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:218 height -> 1
2023-12-07 10:34:24.029 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:219 format -> 56
2023-12-07 10:34:24.029 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:220 usage -> 0x0b00
2023-12-07 10:34:24.029 15964-18459 IMGSRV androidvulkan.androidvulkan E :1415: GrallocTestAlloc: Invalid color format (56)
2023-12-07 10:34:24.029 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:216 Invalid BufferDescriptorInfo
2023-12-07 10:34:24.029 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:217 width -> 1
2023-12-07 10:34:24.029 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:218 height -> 1
2023-12-07 10:34:24.029 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:219 format -> 56
2023-12-07 10:34:24.029 15964-18459 IMGMapper androidvulkan.androidvulkan E isSupported:220 usage -> 0x0b00
2023-12-07 10:34:24.050 15964-18459 3DMove androidvulkan.androidvulkan D Vulkan Debug Ouput: Validation Error: [ VUID-VkImageMemoryBarrier-newLayout-parameter ] | MessageID = 0x43f5a56f | vkCmdPipelineBarrier(): pImageMemoryBarriers[0].newLayout (1000241000) does not fall within the begin..end range of the core VkImageLayout enumeration tokens and is not an extension added token. The Vulkan spec states: newLayout must be a valid VkImageLayout value (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkImageMemoryBarrier-newLayout-parameter) Code 1140172143
I Fixed this error, but crash is still happens, may be driver can’t compile big pixel shader with multiple texture sampling (PCSS Shadows) (my message about PowerVR GE 8100)
New Apk: Vulkan_crash_PowerVR-GM-9446-debug_new.apk
Regarding a possible shader compilation failure, it would lead to a graphics pipeline creation error, unless the shader compilation fails silently which is unlikely.
Just in case I extracted the vertex and fragment shaders used in the only two draw calls in the app you are testing, vkCmdDrawIndexed(24576, 1) and vkCmdDrawIndexed(6, 570). I tested all four with our offline shader compilers (which are now public by the way, you can get them from the Profiling Compilers download in Downloads - Imagination Developers ). I was able to compile the shaders with no problem. I used glslangValidator.exe from Vulkan 1.3.211.0 and target environment Vulkan 1.1
glslangValidator.exe --target-env vulkan1.1 -V vertex_shader_0.vert -o vertex_shader_0.spv
# BVNC GPU HW indentificator 24.50.208.504 is Series 9 XM GM9445, MT6779 Helio P90
ProfilingCompilerCLIWrapper.exe -a spv -b 24.50.208.504 -i vertex_shader_0.spv . -x -t v
Since I cannot seem to reproduce the issue even with a quite close driver version, I would say something else is involved. One case could be numerical precission affecting the conditions to exit the while loop.
I would recommend to follow an incremental approach. For the vkCmdDrawIndexed(24576, 1) draw call I would follow the steps below, trying to identify at what point the issue happens so it can be related to the latest code fragments added:
Start with a plain color fragment shader.
Use just one of the two textures combined in the shader.
Use the two textures.
Add the shadow mapping part.
Please let me know if after those steps you still do not get the issue identified.
Hi, our Android application is experimenting a similar issue, crashing inside the vulkan driver when calling to vkCmdDrawIndexed. In this case the issue was found out on a Motorola G73 with GPU IMG BXM-8-256 and Android version 13 and 14. Here is the top part of the callstack with vulkan validations layer enabled:
Thanks for your message and welcome to the PowerVR Developer Forum!
I would suggest following the steps below:
Review the Vulkan validation layer error implementation in your engine in case it is not outputting any information to the logcat which could indicate the source of the issue you are experiencing.
Review the logcat, looking for any graphics / compute pipeline creation failure errors from the driver and any other errors which could be related.
Does your engine verify the result of each Vulkan operation returning a VkRresult value? In that case you could add extra logging information to the logcat so you can see any possible errors reported.
Try to use our offline shader compilers to verify all shaders used can be compiled. You have an example in this same thread in message PowerVR GM 9446: vkCmdDrawIndexed crash - #9 by AlejandroC (you can download the offline shader compilers in our Developer Portal, in Login - Imagination Developers in the section Profiling Compilers. Please note you will need to make a new account in our Portal to access this downloads section.
Are you using parameter values in the call to vkCmdDrawIndexed for indexCount or instanceCount beyond what the device supports? please check device limits for those values (also I would verify the values of the other three parameters firstIndex, vertexOffset and firstInstance).