GPUOpen-Drivers / AMDVLK

AMD Open Source Driver For Vulkan
MIT License
1.69k stars 160 forks source link

Feature Request: Enable Vulkan Support for ASTC Textures in Mesa 21.1.8 #358

Closed cnzzzlk closed 3 months ago

cnzzzlk commented 3 months ago

Hello,

We encountered a crash in our game NBA2KM on Mesa 21.1.8 due to the Vulkan implementation’s lack of support for ASTC textures. The error stack trace from the game is as follows:

04-10 11:48:22.681 11525 11585 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x3ffebfc00040 in tid 11585 (Thread-178), pid 11525 (catdaddy.nba2km)
04-10 11:48:22.744 11712 11712 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-10 11:48:22.744 11712 11712 F DEBUG   : Build fingerprint: 'HUAWEI/NXT-AL10/HWNXT:9/PSV1.210329.021/root04101016:user/release-keys'
04-10 11:48:22.744 11712 11712 F DEBUG   : Revision: '0'
04-10 11:48:22.744 11712 11712 F DEBUG   : ABI: 'arm64'
04-10 11:48:22.744 11712 11712 F DEBUG   : pid: 11525, tid: 11585, name: Thread-178  >>> com.catdaddy.nba2km <<<
04-10 11:48:22.744 11712 11712 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x3ffebfc00040
04-10 11:48:22.744 11712 11712 F DEBUG   : Abort message: '=========================='
04-10 11:48:22.744 11712 11712 F DEBUG   :     x0  ffff800154800000  x1  00000000000002f0  x2  0000000000000000  x3  0000000000000000
04-10 11:48:22.744 11712 11712 F DEBUG   :     x4  0000000000000000  x5  0000000000000000  x6  0000000000000000  x7  0000000000000000
04-10 11:48:22.744 11712 11712 F DEBUG   :     x8  00003ffebfbfffc0  x9  000000000000000d  x10 0000000000000000  x11 0000000000000000
04-10 11:48:22.744 11712 11712 F DEBUG   :     x12 00003ffe941f1f30  x13 0000000000000000  x14 0000000000000000  x15 0000000000000020
04-10 11:48:22.744 11712 11712 F DEBUG   :     x16 00003ffeafa0df50  x17 00003fff8399ffe0  x18 0000000078ba0f0c  x19 00003ffec1d3c880
04-10 11:48:22.744 11712 11712 F DEBUG   :     x20 0000000000000002  x21 00003ffe9779bc00  x22 00003ffec2bc5c40  x23 0000000000000001
04-10 11:48:22.744 11712 11712 F DEBUG   :     x24 0000000000000001  x25 00000000000000c4  x26 0000000000000001  x27 0000000000000020
04-10 11:48:22.744 11712 11712 F DEBUG   :     x28 0000000000000003  x29 00003ffee21c9770
04-10 11:48:22.744 11712 11712 F DEBUG   :     sp  00003ffee21c96d0  lr  00003ffeaf4c3e80  pc  00003ffeaf4c3ef4
04-10 11:48:22.787 11712 11712 F DEBUG   :
04-10 11:48:22.787 11712 11712 F DEBUG   : backtrace:
04-10 11:48:22.787 11712 11712 F DEBUG   :     #00 pc 0000000000424ef4  /system/vendor/lib64/hw/vulkan.radv.so (si_set_mutable_tex_desc_fields+276)
04-10 11:48:22.787 11712 11712 F DEBUG   :     #01 pc 000000000042398c  /system/vendor/lib64/hw/vulkan.radv.so (radv_image_view_make_descriptor+936)
04-10 11:48:22.787 11712 11712 F DEBUG   :     #02 pc 0000000000423210  /system/vendor/lib64/hw/vulkan.radv.so (radv_image_view_init+1900)
04-10 11:48:22.787 11712 11712 F DEBUG   :     #03 pc 000000000042cdc4  /system/vendor/lib64/hw/vulkan.radv.so (image_view_init+228)
04-10 11:48:22.787 11712 11712 F DEBUG   :     #04 pc 000000000042ca3c  /system/vendor/lib64/hw/vulkan.radv.so (radv_meta_decode_astc+696)
04-10 11:48:22.787 11712 11712 F DEBUG   :     #05 pc 000000000044da00  /system/vendor/lib64/hw/vulkan.radv.so (radv_CmdCopyBufferToImage2KHR+728)
04-10 11:48:22.787 11712 11712 F DEBUG   :     #06 pc 00000000004cf688  /system/vendor/lib64/hw/vulkan.radv.so (vk_common_CmdCopyBufferToImage+532)
04-10 11:48:22.787 11712 11712 F DEBUG   :     #07 pc 0000000005a7bff8  /data/app/com.catdaddy.nba2km-03mI5EwZkaespUgUjITS7g==/lib/arm64/libnba2km.so (offset 0x5241000)
04-10 11:48:22.787 11712 11712 F DEBUG   :     #08 pc 0000000005a75b78  /data/app/com.catdaddy.nba2km-03mI5EwZkaespUgUjITS7g==/lib/arm64/libnba2km.so (offset 0x5241000)
04-10 11:48:22.787 11712 11712 F DEBUG   :     #09 pc 00000000058b8380  /data/app/com.catdaddy.nba2km-03mI5EwZkaespUgUjITS7g==/lib/arm64/libnba2km.so (offset 0x5241000)
04-10 11:48:22.787 11712 11712 F DEBUG   :     #10 pc 00000000058b842c  /data/app/com.catdaddy.nba2km-03mI5EwZkaespUgUjITS7g==/lib/arm64/libnba2km.so (offset 0x5241000)

We have identified a potential solution, which can be found at the following link. However, even after merging the fix ourselves, the issue remains unresolved.We suspect that there may be other fixes required that need to be merged.

You can download the game from the website. We are hoping to resolve this issue.

Thank you.

jinjianrong commented 3 months ago

@cnzzzlk This is an issue in RADV. You could report it on https://gitlab.freedesktop.org/mesa/mesa/-/issues