Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows On ARM - Vulkan renderer on Snapdragon X Series CPUs #1878

Open
RaulMerelli opened this issue Jan 20, 2025 · 3 comments
Open

Windows On ARM - Vulkan renderer on Snapdragon X Series CPUs #1878

RaulMerelli opened this issue Jan 20, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@RaulMerelli
Copy link

RaulMerelli commented Jan 20, 2025

Bug Description

Following #791 issue, on Snapdragon X Series PCs, we stated that OpenGL renderer works fine but Vulkan renderer has issues.

I have made some research about the topic, especially about the error:
Error: Device does not support required feature shaderTessellationAndGeometryPointSize

It turns out that by installing OpenCL™, OpenGL®, and Vulkan® Compatibility Pack, that is actually required to get OpenGL working for Xemu, also replaces the Vulkan native driver (Qualcomm(R) Adreno(TM) X1-85 GPU) to a wrapper to DirectX12 Microsoft Direct3D12 (Qualcomm(R) Adreno(TM) X1-85 GPU).

Comparing the two "drivers" (not sure it's also the correct name to name the Vulkan Wrapper on DirectX12), we can see the native one has more feature support, including shaderTessellationAndGeometryPointSize, that is missing in the DX12 wrapper:

Image

The only way to get back the Native Vulkan driver that I found out, is uninstalling the "OpenCL™, OpenGL®, and Vulkan® Compatibility Pack".
Doing this I lost most of the OpenGL compatibility.

I set the default renderer in Xemu via the xemu.toml file to Vulkan:


[general]
show_welcome = false
last_viewed_menu_index = 2

[input.bindings]
port1 = 'keyboard'

[display.window]
last_width = 1440
last_height = 739

[display]
renderer = 'VULKAN'

[display.debug.video]
x_pos = 827
y_pos = 22
advanced_tree_state = true

Trying to launch Xemu I anyway get an error about OpenGL:

Image

Since I don't think Microsoft decides to provide the wrappers separately, in the next few days I will try to find a way to install the compatibility package excluding the Vulkan wrapper installation and see if it works.

In the meantime, I was wondering, if the backend set up is Vulkan, is it correct for Xemu to check for OpenGL availability? Even with the Vulkan backend, is there still a need for OpenGL for some features?

Expected Behavior

Skip OpenGL check and run directly Xemu with Vulkan

xemu Version

0.8.10-4-g928f84d06b

System Information

OS: Windows 11 On ARM (Home) 24H2
CPU: Snapdragon(R) X Plus - X1P42100 - Qualcomm(R) Oryon(TM) CPU 3.24 GHz
GPU: Qualcomm(R) Adreno(TM) X1-45 GPU (Adreno 726)
GPU Driver: 31.0.82.0 / Win 11 Arm64

Additional Context

@RaulMerelli RaulMerelli added the bug Something isn't working label Jan 20, 2025
@RaulMerelli
Copy link
Author

I managed to remove the Vulkan DX12 Wrapper, by installing the compatibility pack and brutally deleting the Vulkan wrapper dlls (dzn_layer.dll and vulkan_dzn.dll) from C:\Program Files\WindowsApps\Microsoft.D3DMappingLayers_1.2409.2.0_arm64__8wekyb3d8bbwe.

now that's the error I get:

Image

this is the new log:

xemu_version: 0.8.10-4-g928f84d06b
xemu_branch: 
xemu_commit: 928f84d06b5af477c9bf41cb092203832d8a646c
xemu_date: Wed Jan 15 12:50:39 UTC 2025
xemu_settings_get_base_path: base path: C:\Users\RaulM\AppData\Roaming\xemu\xemu\
xemu_settings_get_path: config path: C:\Users\RaulM\AppData\Roaming\xemu\xemu\xemu.toml
CPU: 
OS_Version:  24H2
GL_VENDOR: Microsoft Corporation
GL_RENDERER: D3D12 (Qualcomm(R) Adreno(TM) X1-45 GPU)
GL_VERSION: 4.6 (Core Profile) Mesa 24.3.0-devel (git-370ac36d5d)
GL_SHADING_LANGUAGE_VERSION: 4.60
Created QEMU launch parameters: C:\Users\RaulM\Desktop\xemu\xemu.exe -machine xbox,bootrom=C:\Users\RaulM\AppData\Roaming\xemu\mcpx\mcpx_1.0.bin,kernel-irqchip=off,avpack=hdtv -device smbus-storage,file=C:\Users\RaulM\AppData\Roaming\xemu\xemu\eeprom.bin -bios C:\Users\RaulM\AppData\Roaming\xemu\bios\Complex_4627v1.03.bin -m 128 -drive index=0,media=disk,file=C:\Users\RaulM\AppData\Roaming\xemu\hdd\xbox_hdd.qcow2,locked=on -drive index=1,media=cdrom,file= -display xemu -device usb-hub,port=1,ports=4 
Enabled instance extensions:
- VK_KHR_surface
- VK_KHR_win32_surface
- VK_KHR_get_physical_device_properties2
- VK_KHR_external_semaphore_capabilities
- VK_KHR_external_memory_capabilities
Available physical devices:
- Qualcomm(R) Adreno(TM) X1-45 GPU
required device extension not found: VK_KHR_external_memory

Ironically VK_KHR_external_memory is available in the DX12 wrapper 😁.

@ArminiusTux
Copy link

The irony even goes further, as all who want Dozen (needed e.g. for the grandpa generation of Snapdragons) can not get it and not few who could use, would rather get rid of it in favour of a native Vulkan driver. 😏

Perhaps we should skip informal requests to MS like this one, and create an official issue aksing for a switch mechanism for all 3 wrappers @ https://github.com/microsoft/OpenCLOn12 .

As for Xemu's Vulkan renderer on WinARM64, I can confirm the behaviour:

xemu_version: 0.8.8
xemu_branch: master
xemu_commit: ebcacad78b496604291a168aa3bc64ac96823cf9
xemu_date: Thu Jan  9 22:51:04 UTC 2025
xemu_settings_get_base_path: base path: C:\Users\ArminiusTux\AppData\Roaming\xemu\xemu\
xemu_settings_get_path: config path: C:\Users\ArminiusTux\AppData\Roaming\xemu\xemu\xemu.toml
CPU: 
OS_Version:  24H2
GL_VENDOR: Microsoft Corporation
GL_RENDERER: D3D12 (Qualcomm(R) Adreno(TM) 685 GPU)
GL_VERSION: 4.1 (Core Profile) Mesa 24.3.0-devel (git-370ac36d5d)
GL_SHADING_LANGUAGE_VERSION: 4.10
Created QEMU launch parameters: D:\Games\Xemu\xemu.exe -machine xbox,bootrom=D:\Games\Xemu\stuff\mcpx_1.0.bin,kernel-irqchip=off,avpack=hdtv -device smbus-storage,file=C:\Users\ArminiusTux\AppData\Roaming\xemu\xemu\eeprom.bin -bios D:\Games\Xemu\stuff\bios_debug_4627.bin -m 64 -drive index=0,media=disk,file=D:\Games\Xemu\stuff\xbox_harddisk-XDK4627.qcow2,locked=on -drive index=1,media=cdrom,file= -display xemu -device usb-hub,port=1,ports=4 -audio none 
Enabled instance extensions:
- VK_KHR_surface
- VK_KHR_win32_surface
- VK_KHR_get_physical_device_properties2
- VK_KHR_external_semaphore_capabilities
- VK_KHR_external_memory_capabilities
Available physical devices:
- Qualcomm(R) Adreno(TM) 685 GPU
required device extension not found: VK_KHR_external_memory

@RaulMerelli
Copy link
Author

A small update after some tests.

I tried to debug with vkconfig to check what the native driver is missing that Xemu require.

This I think is the full list:

  • VK_KHR_external_semaphore
  • VK_KHR_external_memory
  • VK_KHR_external_memory_win32
  • VK_KHR_external_semaphore_win32
  • VK_EXT_memory_budget

Here is my debug log with the Native driver:

Enabled device extensions:
- VK_KHR_external_semaphore
- VK_KHR_external_memory
- VK_KHR_external_memory_win32
- VK_KHR_external_semaphore_win32
- VK_EXT_memory_budget
INFO | LAYER:      Failed to find vkGetDeviceProcAddr in layer "C:\VulkanSDK\1.3.296.0\Bin\.\VkLayer_khronos_profiles.dll"
INFO | LAYER:      Inserted device layer "VK_LAYER_KHRONOS_validation" (C:\VulkanSDK\1.3.296.0\Bin\.\VkLayer_khronos_validation.dll)
DRIVER | LAYER:    vkCreateDevice layer callstack setup to:
DRIVER | LAYER:       <Application>
DRIVER | LAYER:         ||
DRIVER | LAYER:       <Loader>
DRIVER | LAYER:         ||
LAYER:                VK_LAYER_KHRONOS_validation
LAYER:                        Type: Explicit
LAYER:                        Manifest: C:\VulkanSDK\1.3.296.0\Bin\VkLayer_khronos_validation.json
LAYER:                        Library:  C:\VulkanSDK\1.3.296.0\Bin\.\VkLayer_khronos_validation.dll
LAYER:                  ||
DRIVER | LAYER:       <Device>
DEBUG | DRIVER:    vkCreateDevice extension VK_KHR_external_memory not available for devices associated with ICD C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_0143648ac43926cc\.\qcvkarm64xum.dll
DEBUG | DRIVER:    vkCreateDevice extension VK_KHR_external_memory_win32 not available for devices associated with ICD C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_0143648ac43926cc\.\qcvkarm64xum.dll
DEBUG | DRIVER:    vkCreateDevice extension VK_EXT_memory_budget not available for devices associated with ICD C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_0143648ac43926cc\.\qcvkarm64xum.dll
DRIVER | LAYER:           Using "Qualcomm(R) Adreno(TM) X1-45 GPU" with driver: "C:\Windows\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_0143648ac43926cc\.\qcvkarm64xum.dll"

I tried also with the DX12 wrapper. Seems that this one is only missing VK_EXT_memory_budget.


Enabled device extensions:
- VK_KHR_external_semaphore
- VK_KHR_external_memory
- VK_KHR_external_memory_win32
- VK_KHR_external_semaphore_win32
- VK_EXT_memory_budget
INFO | LAYER:      Failed to find vkGetDeviceProcAddr in layer "C:\VulkanSDK\1.3.296.0\Bin\.\VkLayer_khronos_profiles.dll"
INFO | LAYER:      Inserted device layer "VK_LAYER_KHRONOS_validation" (C:\VulkanSDK\1.3.296.0\Bin\.\VkLayer_khronos_validation.dll)
INFO | LAYER:      Failed to find vkGetDeviceProcAddr in layer "C:\Program Files\WindowsApps\Microsoft.D3DMappingLayers_1.2409.2.0_arm64__8wekyb3d8bbwe\arm64\dzn_layer.dll"
DRIVER | LAYER:    vkCreateDevice layer callstack setup to:
DRIVER | LAYER:       <Application>
DRIVER | LAYER:         ||
DRIVER | LAYER:       <Loader>
DRIVER | LAYER:         ||
LAYER:                VK_LAYER_KHRONOS_validation
LAYER:                        Type: Explicit
LAYER:                        Manifest: C:\VulkanSDK\1.3.296.0\Bin\VkLayer_khronos_validation.json
LAYER:                        Library:  C:\VulkanSDK\1.3.296.0\Bin\.\VkLayer_khronos_validation.dll
LAYER:                  ||
DRIVER | LAYER:       <Device>
DEBUG | DRIVER:    vkCreateDevice extension VK_EXT_memory_budget not available for devices associated with ICD C:\Program Files\WindowsApps\Microsoft.D3DMappingLayers_1.2409.2.0_arm64__8wekyb3d8bbwe\arm64\vulkan_dzn.dll
DRIVER | LAYER:           Using "Microsoft Direct3D12 (Qualcomm(R) Adreno(TM) X1-45 GPU)" with driver: "C:\Program Files\WindowsApps\Microsoft.D3DMappingLayers_1.2409.2.0_arm64__8wekyb3d8bbwe\arm64\vulkan_dzn.dll"
ERROR | DRIVER:    terminator_CreateDevice: Failed in ICD C:\Program Files\WindowsApps\Microsoft.D3DMappingLayers_1.2409.2.0_arm64__8wekyb3d8bbwe\arm64\vulkan_dzn.dll vkCreateDevice call
ERROR:             vkCreateDevice:  Failed to create device chain.
DEBUG | LAYER:     Unloading layer library C:\Program Files\WindowsApps\Microsoft.D3DMappingLayers_1.2409.2.0_arm64__8wekyb3d8bbwe\arm64\dzn_layer.dll
DEBUG | LAYER:     Unloading layer library C:\VulkanSDK\1.3.296.0\Bin\.\VkLayer_khronos_profiles.dll
DEBUG | LAYER:     Unloading layer library C:\VulkanSDK\1.3.296.0\Bin\.\VkLayer_khronos_validation.dll

vkconfig also seems to let you decide what Vulkan device you can use, so I can try both the drivers without uninstalling completely or partially the compatibility pack.

Image

@ArminiusTux I agree with you about opening an official issue in the Microsoft repo. Later I will open it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants