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

nv2a: Add Vulkan renderer #1701

Draft
wants to merge 123 commits into
base: master
Choose a base branch
from
Draft

nv2a: Add Vulkan renderer #1701

wants to merge 123 commits into from

Conversation

mborgerson
Copy link
Member

@mborgerson mborgerson commented Jul 22, 2024

  • Better startup error handling and renderer fallback
  • Runtime renderer switching
  • pvideo overlays
  • rect texture
  • sampler dims
  • fix conv
  • unaligned vertex buffers
  • Physical device selection in GUI
  • Include renderer selection and driver version in compat reports
  • 0 size tex
  • better low-memory handling
  • uma staging simplification path
  • pipeline disk cache / runtime perf
  • cache samplers independently from textures
  • misc
    • math.h include
    • aa/scaling signedness cleanup
    • menubar renderer select

Issues:

  • Halo 2 scaling
  • Halo 2 High charity blackscreen @ 3x
  • Boot anim
  • NGB intro (No repro)
  • BFBB Hub
  • BFBB Perf
  • workgroup size (timesplitters, black, rdr)
  • push constant limit
  • holopox in destroy all humans 2
  • destroy all humans hang
  • 007 artifacts
  • 007 shadows
  • shifted? (555)
  • Conker on Intel Iris Xe
  • Crazy Taxi (filtering)
  • Conker on AMD RX 6600
  • TOCA Race Driver 2 on AMD RX 6600
  • Intel Meteor Lake-P [Intel Arc Graphics]
  • Shadow the hedgehog
    • orbs
    • subtitles
  • texture filtering
  • Halo CE floor lighting, two betrayals pillars
  • timesplitters fp bloom
  • Crash Bandicoot twoc
  • Star Wars Battlefront 2 flickering (likely alignment)
  • Gun Valkyrie shadows on AMD
  • Gun Valkyrie texture stretching
  • Halo 2 active camo
  • Spike Out geometry (buffer alignment)
  • Jade Empire black screen
  • Jade empire shadows, flicker
  • Kung Fu Chaos
    • black screen
    • blending
  • Total Immersion Racing blending?
  • Mercenaries Minimap
  • SegaGT textures
  • conker sampler dims xemu(1).log
  • Phantom Crash rect_tex
  • texture warping
    • Mortal Kombat: Shaolin Monks
    • House of the Dead 2
    • Phantasy Star
    • Sega GT
  • splinter cell meter
  • Battlefront 2 HUD flicker (560.70)
  • GTA
    • geom
    • blur off
  • Gauntlet
  • Group S challenge
  • FMV
    • Black Stone (pvideo)
    • Brute Force (surface blit)
    • World Soccer Winning Eleven 8,9
    • Forza (pvideo)
    • Futurama (texture blit)
    • Serious Sam (pvideo)
  • Halo projectile
  • Halo lightmap
  • draw time

Note to testers:

  • Not on macOS yet. Linux and Windows only for now.
  • Machine > Settings > Display > Backend > Vulkan. Restart xemu. You can switch renderers at runtime.
  • Some features that the GL renderer has are missing. Expect some minor differences. Please report major differences and obvious bugs not listed above.
  • Performance may be better, or may be worse--we are focusing on correctness more than performance rn.

@mborgerson mborgerson force-pushed the feat/vulkan branch 6 times, most recently from 3355a00 to 62e31ff Compare July 22, 2024 08:27
@Triticum0

This comment was marked as off-topic.

@HadetTheUndying
Copy link

Hey Matt, i haven't been around in awhile but is it possible to bundle moltenVK with this or is there any interest in porting to Metal API as well? I'll do some testing on my vacation next week.

@Lagahan
Copy link

Lagahan commented Jul 22, 2024

Significantly improved performance in Mercenaries (2x scaling, Windows, 7800x3d, 4090)
OGL 1x render scale couldn't hit 60fps in this scene, nvm 2x!

OGL: (RTSS' fps & frametime measurements freak out when fps drops below fullspeed)
Screenshot 2024-07-23 001258
Vulkan:
Screenshot 2024-07-23 001123

@mborgerson mborgerson force-pushed the feat/vulkan branch 3 times, most recently from ddab87e to da59a60 Compare July 23, 2024 06:57
@Spidy123222
Copy link

Hey Matt, i haven't been around in awhile but is it possible to bundle moltenVK with this or is there any interest in porting to Metal API as well? I'll do some testing on my vacation next week.

There is interest just will take some work as there is stuff needed to be changed to work under moltenvk. Probably won't be in the pr but we will have to see.

@Lagahan

This comment was marked as resolved.

@rizaumami

This comment was marked as resolved.

@rizaumami
Copy link

rizaumami commented Jul 24, 2024

Artifact when using Vulkan renderer.
OpenGL works fine, except for no HUD in Halo 2.

simplescreenrecorder-2024-07-24_13.30.35.webm
AppImage log.
~$ ./xemu-v0.7.131-33-g81b72e79bc-x86_64.AppImage 
xemu_version: 0.7.131-33-g81b72e79bc
xemu_branch: 
xemu_commit: 81b72e79bcbdbb42a65e9df7041f67a487c4ab25
xemu_date: Wed Jul 24 05:31:08 UTC 2024
xemu_settings_get_base_path: base path: /home/anu/.local/share/xemu/xemu/
xemu_settings_get_path: config path: /home/anu/.local/share/xemu/xemu/xemu.toml
CPU: 
OS_Version: Debian GNU/Linux trixie/sid
GL_VENDOR: Intel
GL_RENDERER: Mesa Intel(R) Arc(tm) Graphics (MTL)
GL_VERSION: 4.6 (Core Profile) Mesa 24.1.3-2
GL_SHADING_LANGUAGE_VERSION: 4.60
Created QEMU launch parameters: ./xemu-v0.7.131-33-g81b72e79bc-x86_64.AppImage -machine xbox,bootrom=/mnt/data/Software/XEMU/Boot ROM image/mcpx_1.0.bin,kernel-irqchip=off,avpack=hdtv -device smbus-storage,file=/home/anu/.local/share/xemu/xemu/eeprom.bin -bios /mnt/data/Software/XEMU/BIOS/Complex_4627.bin -m 128 -drive index=0,media=disk,file=/mnt/data/Software/XEMU/ogxhd.img,locked=on -drive index=1,media=cdrom,file=/mnt/data/Software/XEMU/Halo_2.iso -display xemu -device usb-hub,port=1,ports=4 
WARNING: Image format was not specified for '/mnt/data/Software/XEMU/ogxhd.img' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
Enabled instance extensions:
- VK_KHR_surface
- VK_KHR_xlib_surface
- VK_KHR_get_physical_device_properties2
- VK_KHR_external_semaphore_capabilities
- VK_KHR_external_memory_capabilities
Available physical devices:
- Intel(R) Arc(tm) Graphics (MTL)
- llvmpipe (LLVM 17.0.6, 256 bits)
Selected physical device: Intel(R) Arc(tm) Graphics (MTL)
- Vendor: 8086, Device: 7d55
- Driver Version: 24.1.3
Enabled device extensions:
- VK_KHR_external_semaphore
- VK_KHR_external_memory
- VK_KHR_external_memory_fd
- VK_KHR_external_semaphore_fd
- VK_EXT_custom_border_color
- VK_EXT_provoking_vertex
- VK_EXT_memory_budget
System spec.
~$ inxi -SG
System:
  Host: sid Kernel: 6.9.10-amd64 arch: x86_64 bits: 64
  Desktop: Cinnamon v: 6.0.4 Distro: Debian GNU/Linux trixie/sid
Graphics:
  Device-1: Intel Meteor Lake-P [Intel Arc Graphics] driver: i915 v: kernel
  Device-2: SenseTek FHD Camera driver: uvcvideo type: USB
  Display: x11 server: X.Org v: 21.1.11 with: Xwayland v: 24.1.0 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: iris gpu: i915
    resolution: 2880x1920~120Hz
  API: EGL v: 1.5 drivers: iris,swrast platforms: gbm,x11,surfaceless,device
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.1.3-2
    renderer: Mesa Intel Arc Graphics (MTL)

@mborgerson
Copy link
Member Author

@rizaumami Can you please try the latest build and see if that resolves your issue

@rizaumami
Copy link

@rizaumami Can you please try the latest build and see if that resolves your issue

Still have the same issue in 0.7.131-34-ged26a2383d.

@mborgerson mborgerson force-pushed the feat/vulkan branch 2 times, most recently from aa52e7f to e8d494f Compare July 24, 2024 10:12
@mborgerson
Copy link
Member Author

@rizaumami Can you please try the latest build and see if that resolves your issue

@rizaumami
Copy link

@rizaumami Can you please try the latest build and see if that resolves your issue

Still have the issue in 0.7.131-36-g5d49845579
It's not only in a game but also in the Microsoft dashboard, so not game issue.
The orangish colour in Halo 2 is different issue (#952?)

simplescreenrecorder.webm

@Triticum0

This comment was marked as resolved.

@Triticum0
Copy link

Breakdown exhibit worse performance on vulkan than opengl
Vulkan 20f/15ps
Opengl 30/25fps

@Triticum0

This comment was marked as resolved.

@Triticum0
Copy link

Triticum0 commented Jul 25, 2024

Total Immersion racing sound volume bars and car stat bars are not rendered on vulkan correctly.
vulkan
xemu-2024-07-25-13-48-30
xemu-2024-07-25-14-04-01

opengl
xemu-2024-07-25-13-48-36
xemu-2024-07-25-14-04-09

@Mechanism8

This comment was marked as resolved.

@thatsprettygood
Copy link

#109 (comment)

Regarding performance: Vulkan does offer a lot of flexibility but, based on my experimental work, GL is more than capable of reaching xemu performance targets.

Is this still true?

@mborgerson mborgerson force-pushed the feat/vulkan branch 3 times, most recently from 46143e8 to 1f7d9f9 Compare November 11, 2024 07:37
@ehw
Copy link

ehw commented Nov 12, 2024

To add to the distortion issue, I changed the internal resolution with the Vulkan backend to 2x and it seems to fix it. It looks similar to the OpenGL backend now but it still seems a little different.

Vulkan 1x:
image

Vulkan 2x:
image

OpenGL 2x:
image

Version: 0.7.132-118-g3e4ce6cf38
Branch:
Commit: 3e4ce6c
Date: Mon Nov 11 09:24:21 UTC 2024
CPU: AMD Ryzen 7 5800X 8-Core Processor
OS Platform: Windows
OS Version: 22H2
Manufacturer: NVIDIA Corporation
GPU Model: NVIDIA GeForce RTX 3080/PCIe/SSE2
Driver: 4.0.0 NVIDIA 566.03
Shader: 4.00 NVIDIA via Cg compiler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.