pal1000 / mesa-dist-win

Pre-built Mesa3D drivers for Windows
MIT License
860 stars 77 forks source link

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

Open fkiliver opened 1 year ago

fkiliver commented 1 year ago

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?

pal1000 commented 1 year ago

/cc @yourWaifu @driver1998 @Maxim766

yourWaifu commented 1 year ago

I personally never tried it or seen it working. My guess is no. But you're welcome to try and see if it works. I've only seen it work for openGL 3.3

On Fri, Feb 17, 2023, 3:03 PM pal1000 @.***> wrote:

/cc @yourWaifu https://github.com/yourWaifu @driver1998 https://github.com/driver1998 @Maxim766 https://github.com/Maxim766

— Reply to this email directly, view it on GitHub https://github.com/pal1000/mesa-dist-win/issues/139#issuecomment-1435175805, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3OO5NLX27OVEQ7D5BJTN3WX7KSPANCNFSM6AAAAAAU7T5EEY . You are receiving this because you were mentioned.Message ID: @.***>

driver1998 commented 1 year ago

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).

driver1998 commented 1 year ago

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

fkiliver commented 1 year ago

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?

driver1998 commented 1 year ago

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.

stormenergy91 commented 1 year ago

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

driver1998 commented 1 year ago

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).