Forums - VK_INCOMPLETE

4 posts / 0 new
Last post
VK_INCOMPLETE
alexander_1
Join Date: 4 Dec 20
Posts: 7
Posted: Fri, 2020-12-04 15:49

Hello,

I cannot create kernels for some complex shaders.
The Vulkan reports VK_INCOMPLETE error during pipeline creation.
AdrenoVK-0: Failed to link shaders.
The same shader under OpenGLES runtime generates the following crash dump:

backtrace:
#00 pc 000000000094ec30  /vendor/lib64/libllvm-glnext.so (!!!0000!4317ff6b28d05014dd26ee358abb0a!380077c!+384) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
#01 pc 00000000009bdf70  /vendor/lib64/libllvm-glnext.so (!!!0000!b676ecec6a4d46a33a7dd7342025a4!380077c!+432) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
#02 pc 00000000009d1340  /vendor/lib64/libllvm-glnext.so (!!!0000!227587e0dcc7ac26294c1c4bf50016!380077c!+168) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
#03 pc 00000000009d6660  /vendor/lib64/libllvm-glnext.so (!!!0000!1ebc82ca710bca46214e5b139511ee!380077c!+176) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
#04 pc 0000000000984324  /vendor/lib64/libllvm-glnext.so (!!!0000!ef44d4a36e3d55668957c008de469d!380077c!+948) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
#05 pc 0000000000985eb8  /vendor/lib64/libllvm-glnext.so (!!!0000!43937d4708f11302c9ae831d4e20b2!380077c!+48) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
#06 pc 0000000000b14934  /vendor/lib64/libllvm-glnext.so (!!!0000!092e7b3583d7764864b45acabc42c8!380077c!+1172) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
#07 pc 000000000030d208  /vendor/lib64/libllvm-glnext.so (!!!0000!b9c69828c384dc46eb5a73e774f971!380077c!+336) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
#08 pc 000000000030cab4  /vendor/lib64/libllvm-glnext.so (!!!0000!1417f22fd9f4decd39c82f3b2b94b8!380077c!+292) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
#09 pc 000000000030c910  /vendor/lib64/libllvm-glnext.so (!!!0000!37cd170f840a4673df210f61ad6d02!380077c!+56) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
#10 pc 0000000000899868  /vendor/lib64/libllvm-glnext.so (!!!0000!6b33cb4cd5ea14e9890651c8144ed9!380077c!+2680) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
#11 pc 000000000089a6c4  /vendor/lib64/libllvm-glnext.so (!!!0000!eca60020c053e7cabab7710d1ede9d!380077c!+2516) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
#12 pc 0000000000b4a26c  /vendor/lib64/libllvm-glnext.so (!!!0000!680f006d6aad63f0a3838df4670f76!380077c!+2676) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
#13 pc 0000000000b5304c  /vendor/lib64/libllvm-glnext.so (!!!0000!4606f10278d8b101530ad31dfd1460!380077c!+1164) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
#14 pc 0000000000b5033c  /vendor/lib64/libllvm-glnext.so (!!!0000!a0c8f6997b328c2ada5569b4d52918!380077c!+1484) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
#15 pc 0000000000b2ec88  /vendor/lib64/libllvm-glnext.so (!!!0000!c3aaf8fe6cfe7eeacc6c0fa604b005!380077c!+392) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
#16 pc 0000000000c1aaa4  /vendor/lib64/libllvm-glnext.so (QGLCLinkProgram(void*, unsigned int, QGLC_SRCSHADER_IRSHADER**, QGLC_LINKPROGRAM_DATA*, QGLC_LINKPROGRAM_RESULT*)+100) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
#17 pc 000000000025a238  /vendor/lib64/egl/libGLESv2_adreno.so (!!!0000!21c3d0e01b653442370882debb8a54!380077c!+736) (BuildId: e138fdbe91d17938f24870ae60d63f4d)
#18 pc 0000000000232a08  /vendor/lib64/egl/libGLESv2_adreno.so (!!!0000!8b96d97b28460c2822a5897b3ff6e2!380077c!+344) (BuildId: e138fdbe91d17938f24870ae60d63f4d)
#19 pc 000000000016b3d0  /vendor/lib64/egl/libGLESv2_adreno.so (!!!0000!5094ab766f406130e15d3aad524265!380077c!+88) (BuildId: e138fdbe91d17938f24870ae60d63f4d)

 

Device is Samsung Galaxy Tab S7.
Driver info:
AdrenoVK-0: QUALCOMM build         : 380077c, Ifdda647016
AdrenoVK-0: Build Date             : 09/01/20
AdrenoVK-0: Shader Compiler Version : EV031.29.00.09

Are there any ideas on how to solve such problems?
We are using our in-house SPIR-V shader compiler.

Thank you!

  • Up0
  • Down0
alexander_1
Join Date: 4 Dec 20
Posts: 7
Posted: Fri, 2020-12-04 20:54

The crash is related to high number of variables inside the shader. Reducing the size of arrays solves the problem temporarily. What the actual limit in the number of shader stack variables?

void main() {
    vec4 a[size_0], b[size_0], c[size_0];
    vec4 d[size_1], e[size_1], f[size_1];
}

Shader is compiled when the size_0 = 8 and size_1 = 2.
But the crash described below happens when the sizes are bigger.
That arrays cannot be shared. Changing shader group size changes the variable count limit as well.

Could the shader compiler be more verbose during compilation?

PS: OpenGLES is still crashing even when the size is small.

Thank you!

  • Up0
  • Down0
alexander_1
Join Date: 4 Dec 20
Posts: 7
Posted: Sat, 2020-12-05 15:37

Timestamp: 2020-12-05 15:34:20-0800
 pid: 18688, tid: 19169, name: Thread-12  >>> com.tellusim.TellusimRenderBrepd <<<
 uid: 10349
 signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
 Cause: null pointer dereference
     x0  00000000000003d9  x1  00000077ab9b5890  x2  0000007733c9d5d0  x3  0000000000000000
     x4  0000007733cac780  x5  0000000000000752  x6  0000000000000003  x7  0000000000001800
     x8  00000000000001ff  x9  0000007733c9d000  x10 0000000000000200  x11 0000007733c9f000
     x12 0000000000000000  x13 000000000000005d  x14 31fda0d108f4162c  x15 0000000000000f52
     x16 0000000000000025  x17 0000000000008e5d  x18 00000077424e0000  x19 00000077a2431a00
     x20 00000077ab8eb980  x21 00000077440af020  x22 000000773274ac00  x23 00000077a4344354
     x24 00000077ab8b9fa0  x25 0000007733c9e520  x26 000000000000005f  x27 00000077ab8b9fa0
     x28 0000000000008e5d  x29 00000077329fcf90
     sp  00000077440ab9e0  lr  00000077a4f45948  pc  00000077a4f45a5c
 backtrace:
       #00 pc 0000000000d32a5c  /vendor/lib64/libllvm-glnext.so (!!!0000!15aa491ab67e39994f05a7da464642!380077c!+1468) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
       #01 pc 0000000000d39b88  /vendor/lib64/libllvm-glnext.so (!!!0000!943fdac6524ef03da12c84cbbff19b!380077c!+520) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
       #02 pc 0000000000d54f08  /vendor/lib64/libllvm-glnext.so (!!!0000!d49599a40965508ac577c49e7c01e5!380077c!+384) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
       #03 pc 0000000000d55308  /vendor/lib64/libllvm-glnext.so (!!!0000!f250bbeae4787d84d80d43e35a8b6d!380077c!+416) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
       #04 pc 0000000000d613e4  /vendor/lib64/libllvm-glnext.so (!!!0000!d4b3104e6a37ce8c57eba970e8b2e1!380077c!+380) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
       #05 pc 0000000000b2b13c  /vendor/lib64/libllvm-glnext.so (!!!0000!c03b43b7629d6f1414578265c7e520!380077c!+332) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
       #06 pc 0000000000c1a9fc  /vendor/lib64/libllvm-glnext.so (QGLCCompileToIRShader(void*, QGLC_SRCSHADER*, QGLC_COMPILETOIR_RESULT*)+76) (BuildId: eb11c934d11d8775f6dc8c96b638d4ff)
       #07 pc 00000000001a8710  /vendor/lib64/hw/vulkan.kona.so (!!!0000!408a0df45472c0e06e44d798996f89!380077c!+3768) (BuildId: 379729ce6b6d3120086698757f2c0742)
       #08 pc 0000000000196f60  /vendor/lib64/hw/vulkan.kona.so (!!!0000!ba674506108e26854f1a64f25e8277!380077c!+120) (BuildId: 379729ce6b6d3120086698757f2c0742)
       #09 pc 0000000000170650  /vendor/lib64/hw/vulkan.kona.so (qglinternal::vkCreateGraphicsPipelines(VkDevice_T*, VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*, VkAllocationCallbacks const*, VkPipeline_T**)+2176) (BuildId: 379729ce6b6d3120086698757f2c0742)
       #10 pc 000000000001f04c  /system/lib64/libvulkan.so (vulkan::api::(anonymous namespace)::CreateGraphicsPipelines(VkDevice_T*, VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*, VkAllocationCallbacks const*, VkPipeline_T**)+224) (BuildId: 52ae8d22a82dad5c793c00d9efb2c3cc)
     

  • Up0
  • Down0
alexander_1
Join Date: 4 Dec 20
Posts: 7
Posted: Mon, 2020-12-07 22:32

The reason of the last crash is Structure with SpvOpStore SpvOpLoad instructions.

It was a geometry shader with the out interface block:

layout(location = 0) out FragmentBlock {
    vec2 position;
} OUT;
void main {
    OUT = OUT;    // causes driver crash
}

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.