This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MGD changes behavior of my Vulkan app and crashes

Hello,

I am trying to get Mali Graphics Debugger v4.8 to trace my Vulkan application on a rooted Samsung Galaxy S7 (Exynos) but it is causing the application to crash. The application is running correctly without MGD, I have turned the Android validation layers on and no error or serious warning is displayed.

If I start it with MGD tracing, it causes the error:

Fullscreen
1
2
3
4
ERROR: [IMAGE] Code 710936520 : vkGetImageSubresourceLayout():
Image must have tiling of VK_IMAGE_TILING_LINEAR. The spec valid usage text states
'image must have been created with tiling equal to VK_IMAGE_TILING_LINEAR'
(https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkGetImageSubresourceLayout-image-00996)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

to appear, and the application to crash afterwards.

I had to include libMGD.so in my APK libs and also rename it to libVkLayer_MGD.so to make it work.

Are there limitations in the way MGD handles Vulkan images?

Here's the crash report:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
8414-8414/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
8414-8414/? A/DEBUG: Build fingerprint: 'samsung/heroltexx/herolte:7.0/NRD90M/G930FXXU1DQCG:user/release-keys'
8414-8414/? A/DEBUG: Revision: '8'
8414-8414/? A/DEBUG: ABI: 'arm64'
8414-8414/? A/DEBUG: pid: 8296, tid: 8348, name: stscene.classic >>> virtualarts.testscene.classic <<<
8414-8414/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
8414-8414/? A/DEBUG: x0 0000000000000025 x1 00000075f9984088 x2 0000000000000000 x3 00000075f9984050
8414-8414/? A/DEBUG: x4 00000075f9984050 x5 0000000000000000 x6 000000760976b000 x7 0000000000000000
8414-8414/? A/DEBUG: x8 0000000000000006 x9 0000000000000000 x10 00000075e033f980 x11 0000000000000000
8414-8414/? A/DEBUG: x12 00000075e0341820 x13 00000003e8000000 x14 0000000000000000 x15 00164aee3d780d3e
8414-8414/? A/DEBUG: x16 00000075e07a3948 x17 00000076087fc01c x18 0000000000000000 x19 00000075f9984088
8414-8414/? A/DEBUG: x20 0000007604fa6800 x21 0000000000000001 x22 0000000000000001 x23 0000000000000000
8414-8414/? A/DEBUG: x24 0000000000000037 x25 00000075f32760c0 x26 0000000000000025 x27 00000000094006d8
8414-8414/? A/DEBUG: x28 00000076087fb124 x29 00000075f9983660 x30 00000075e050acc8
8414-8414/? A/DEBUG: sp 00000075f9983540 pc 00000075e050ae68 pstate 0000000060000000
8414-8414/? A/DEBUG: backtrace:
8414-8414/? A/DEBUG: #00 pc 00000000000d9e68 /data/app/virtualarts.testscene.classic-1/lib/arm64/libVkLayer_core_validation.so
8414-8414/? A/DEBUG: #01 pc 0000000000017ea8 /data/app/virtualarts.testscene.classic-1/lib/arm64/libVkLayer_threading.so
8414-8414/? A/DEBUG: #02 pc 00000000005717f4 /data/app/virtualarts.testscene.classic-1/lib/arm64/libVkLayer_MGD.so
8414-8414/? A/DEBUG: #03 pc 00000000005593b4 /data/app/virtualarts.testscene.classic-1/lib/arm64/libVkLayer_MGD.so
8414-8414/? A/DEBUG: #04 pc 0000000000544b2c /data/app/virtualarts.testscene.classic-1/lib/arm64/libVkLayer_MGD.so (vkCreateFramebuffer+80)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

0