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!
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!
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
}