pal1000/mesa-dist-win

Can mesa be used to provide vulkan support for Windows on Arm?

fkiliver opened this issue · 8 comments

For Windows on Arm devices using Qualcomm chips, only d3d12 is supported. but many applications are developed based on vulkan.
I've checked the mesa documentation, but I'm still not quite sure how to install the vulkan driver. Can anyone help me?

I tried dozen on my Snapdragon 8cx Gen 2, and no, it crashes in the Qualcomm GPU driver.

WARNING: dzn is not a conformant Vulkan implementation, testing use only.
WARNING: dzn is not a conformant Vulkan implementation, testing use only.
Device 0 : Microsoft Direct3D12 (Qualcomm(R) Adreno(TM) 680 GPU)
Device 1 : Microsoft Direct3D12 (Microsoft Basic Render Driver)
FATAL ERROR: (QIC != QIC_TEX && QIC != QIC_LDST) && "TEX LDST instruction still needs rematerialization"
Assertion failed: (vk_res) == VK_SUCCESS, file Cube.cpp, line 791
(lldb) target create "a.exe"
(rrent executable set to 'D:\Documents\Desktop\Vulkan-Cube-master\a.exe' (aarch64).
(lldb) r
(lldb) Process 6764 launched: 'D:\Documents\Desktop\Vulkan-Cube-master\a.exe' (aarch64)
Process 6764 stopped
* thread #1, stop reason = Exception 0x80000003 encountered at address 0x7ffebe1fd770
    frame #0: 0x00007ffebe1fd774 qcdxarm64xcompiler8180.DLL`compile + 347764
qcdxarm64xcompiler8180.DLL`compile:
->  0x7ffebe1fd774 <+347764>: adrp   x8, 5424
    0x7ffebe1fd778 <+347768>: add    x8, x8, #0xd40
    0x7ffebe1fd77c <+347772>: cmp    x22, #0x0
    0x7ffebe1fd780 <+347776>: csel   x0, x22, x8, ne
(lldb)

It might be possible with future driver updates or mesa fixes, or maybe it already works on Gen 3 (which uses different driver).

lavapipe should work fine if you just need some Vulkan support.

I tried dozen on my Snapdragon 8cx Gen 2, and no, it crashes in the Qualcomm GPU driver.

WARNING: dzn is not a conformant Vulkan implementation, testing use only.
WARNING: dzn is not a conformant Vulkan implementation, testing use only.
Device 0 : Microsoft Direct3D12 (Qualcomm(R) Adreno(TM) 680 GPU)
Device 1 : Microsoft Direct3D12 (Microsoft Basic Render Driver)
FATAL ERROR: (QIC != QIC_TEX && QIC != QIC_LDST) && "TEX LDST instruction still needs rematerialization"
Assertion failed: (vk_res) == VK_SUCCESS, file Cube.cpp, line 791
(lldb) target create "a.exe"
(rrent executable set to 'D:\Documents\Desktop\Vulkan-Cube-master\a.exe' (aarch64).
(lldb) r
(lldb) Process 6764 launched: 'D:\Documents\Desktop\Vulkan-Cube-master\a.exe' (aarch64)
Process 6764 stopped
* thread #1, stop reason = Exception 0x80000003 encountered at address 0x7ffebe1fd770
    frame #0: 0x00007ffebe1fd774 qcdxarm64xcompiler8180.DLL`compile + 347764
qcdxarm64xcompiler8180.DLL`compile:
->  0x7ffebe1fd774 <+347764>: adrp   x8, 5424
    0x7ffebe1fd778 <+347768>: add    x8, x8, #0xd40
    0x7ffebe1fd77c <+347772>: cmp    x22, #0x0
    0x7ffebe1fd780 <+347776>: csel   x0, x22, x8, ne
(lldb)

It might be possible with future driver updates or mesa fixes, or maybe it already works on Gen 3 (which uses different driver).

I have 8cx gen 3 device, but I don't know how to load the dozen driver.How did you load it?

A friend of mine tested for me and said that dozen works on Gen 3 (Dev Kit 2023), with driver version 30.0.3681.5800.

A friend of mine tested for me and said that dozen works on Gen 3 (Dev Kit 2023), with driver version 30.0.3681.5800.

Where he find that driver? I also have the devkit but i can get only the 30.0.3542.2200

You can get it here:
https://github.com/WOA-Project/Qualcomm-Reference-Drivers/blob/master/8280_QRD/200.0.37.0/qcdx8280.cab

Note: This is the driver pulled from the Qualcomm Reference Device (an internal engineering unit produced by Qualcomm themselves to test the platform), it may not work on your specific device.

Backup your data and get your recovery image ready first as it may break your Windows installation.

You can also see there are newer version in the 200.0.38.0 and 200.0.39.0 directory, you may also want to try that.

DO NOT BLINDLY INSTALL EVERYTHING IN THAT DRIVER SET, just the GPU driver (qcdx8280.cab) should be harmless, but other stuff have a high tendency to break things (I did this once on my 8cx Gen 1 device).