vs-shirokii / gzdoom-rt

GNU General Public License v3.0
268 stars 6 forks source link

[Feature] Intel ARC GPUs support #17

Open NikosDi opened 3 months ago

NikosDi commented 3 months ago

GZDoom version

gzdoom-rt

Which game are you running with GZDoom?

Doom 2

What Operating System are you using?

Windows 11

If Other OS, please describe

No response

Relevant hardware info

Intel ARC A380 dGPU

Is your feature request related to a problem? Please describe.

Add RT support for Intel ARC GPUs - not only nVidia! It seems that for both AMD and Intel GPUs the mod is broken.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Add any other context or screenshots about the feature request here.

No response

KingVulpes commented 3 months ago

Try seeing if disabling rt_fluid in the config does anything. It fixes the issue on AMD

NikosDi commented 3 months ago

@KingVulpes Thank you for the info, but unfortunately it doesn't work for ARC cards.

I tried also the other setting that @Aelussa mentioned in AMD's post with rt_dxgi which was false and I set it to true (the opposite of the suggestion) but it didn't work.

https://github.com/vs-shirokii/gzdoom-rt/issues/14#issuecomment-2295503134

Any other suggestion from you or @Aelussa or @vs-shirokii or any Intel expert reading this post, I would be more than happy to try it.

mjtaryma commented 3 months ago

VkCreateDevice called by gzdoom.exe is requesting features that are not supported by the ARC. This causes a premature crash. Those features are not critical ( I turned them off within a debugger and was able to play the game on ARC A770 ).

Here is the list: VkPhysicalDeviceFeatures.shaderStorageImageMultisample VkPhysicalDeviceFeatures.shaderFloat64 VkPhysicalDeviceFeatures.shaderResourceMinLod

Previous call to vkGetPhysicalDeviceFeatures2 returns properly and provides the right data to the application.

mjtaryma commented 3 months ago

I see those features hard-coded in RTGL's VulkanDevice_Init.cpp ( line #903 ) @vs-shirokii Disabling those features enables support for Intel ARC

vs-shirokii commented 3 months ago

Amazing, thank you very much, I'll make a patch.

NikosDi commented 3 months ago

Great job @mjtaryma...I mean really great job!

Can't wait to try your new version @vs-shirokii

I promise to post some screenshots and performance numbers of my A380.

The root cause of the issue that @mjtaryma found out, could be the same for the work of @sultim-t that crashes most of the times in the same way, since the new RTGL1 is an enhancement of sultim's renderer.

Great job again for both of you.

NikosDi commented 3 months ago

Amazing, thank you very much, I'll make a patch.

Hello @vs-shirokii It's been almost a week since your last reply regarding a patch of gzdoom-rt for Intel GPUs.

I have no idea how difficult that would be.

Is there an ETA ?

TIA

vs-shirokii commented 3 months ago

Hello, sorry!

After working almost every weekend, I rest... I also, sadly, didn't left CI/CD in a good state, so people would be able to see how to compile required projects. I would like to help, writing down the todo list for next patch; I'm just quite exhausted :)

NikosDi commented 3 months ago

@vs-shirokii Well, I'm not a developer so certainly I couldn't help although I would like to.

@mjtaryma did a great job finding exactly where the problem is, maybe you could patch just that for the beginning, because your next to do list could be huge!

After all it is a major enhancement to add a second compatible GPU architecture, unless you want to keep it an nVidia - only project.

mjtaryma commented 3 months ago

@vs-shirokii I create a pull request with the changes, if this helps https://github.com/vs-shirokii/RTGL/pull/1

This should work for now. I suggest adding a check for the device features availability before VkCreateDevice

vs-shirokii commented 3 months ago

@mjtaryma Thank you! Accepted PR. Fixed the CI along the way.

@NikosDi Here are the artifacts, download rtgl-bundle.zip, extract into your gzdoom.exe folder. Source Github Artifacts

NikosDi commented 3 months ago

Hello @vs-shirokii , @mjtaryma After following your instructions with a new extraction of the files, the game doesn't crash immediately to Windows like before, but it stuck at a white screen doing nothing. It is not responding.

My system: Win 11 Pro - Intel ARC A380 - Drivers v5590

image

mjtaryma commented 3 months ago

image

Works on A770

mjtaryma commented 3 months ago

@NikosDi Can you run "vulkaninfo.exe" from a command prompt and paste the output here ? Or redirect to file "vulkaninfo > c:\path\file.txt" and attach it here ?

Also, update the drivers first: https://www.intel.com/content/www/us/en/download/785597/intel-arc-iris-xe-graphics-windows.html

NikosDi commented 3 months ago

Hello @mjtaryma Thank you for reminding me that I had to run gzdoom-rt using Vulkan!

I had already updated to latest driver v5972 but I had set rt_dxgi to true from previous tests, that's why it stuck.

For all Intel users interested in running this version, you must set rt_dxgi to false before running this game.

rt_fluid on or off doesn't change anything, it's disabled (always off)

Running this game at 1920x1080 the performance is:

FSR2 Ultra Performance ~ 67fps FSR2 Performance ~ 42fps FSR2 Balanced ~ 33fps FSR2 Quality ~27fps

I have also included all the metrics of Intel ARC Control and the vulkaninfo text file.

vulkaninfo_ARC_A380.txt The FPS counter of the image at 25fps is for 2560 x 1440 resolution with FSR2 Performance mode. Doom2 RT ARC A380

NikosDi commented 3 months ago

@vs-shirokii Is there an option somewhere in the menus to display the FPS counter ?

I tried to find it but I couldn't.

mjtaryma commented 3 months ago

@NikosDi

There's a "vid_fps" CVAR to show the FPS in Zdoom/GZDoom.

Just add "+vid_fps 1" to the command line or put it in the config file.

NikosDi commented 3 months ago

Perfect! Thank you, it works.

NikosDi commented 3 months ago

@vs-shirokii This is a tribute to Duke Nukem 3D. So many quotes even from the first map!