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

Vulkan Support #427

Closed
MegaTKC opened this issue Nov 25, 2021 · 8 comments
Closed

Vulkan Support #427

MegaTKC opened this issue Nov 25, 2021 · 8 comments

Comments

@MegaTKC
Copy link

MegaTKC commented Nov 25, 2021

Hello! I am running dhewm3 on my Raspberry Pi 4 running Ubuntu 21.10. It runs about under 30 fps, but anyway does dhewm3 already have Vulkan driver support and if it doesn't, will this project contain vulkan support soon?

@symbios24
Copy link

symbios24 commented Nov 29, 2021

Nobody knows,for sure run doom from raspbian it goes faster there since the os its lighter
30fps i get with my Rpi4 1gb

@HarrievG
Copy link
Contributor

HarrievG commented Dec 10, 2021

AFAIK,
If work will be done on the renderer, it will be to integrate BGFX.

You can check here if you want to give it a go yourself
https://github.com/DustinHLand/vkDOOM3

An DX 12 rtx impl here:
https://github.com/jmarshall23/DoomRTX

@DanielGibson
Copy link
Member

DanielGibson commented Feb 6, 2022

If work will be done on the renderer, it will be to integrate BGFX.

Or maybe the upcoming SDL2 3D API: https://discourse.libsdl.org/t/future-3d-api/33485 and https://gist.github.com/icculus/f731224bef3906e4c5e8cbed6f98bb08

Either way, there's no immediate plans to do this - and Vulkan looks like a way too painful API for me to use without getting paid shitloads of money for it.

@warriormaster12
Copy link

Hi, just wanted to let you know that I'm currently working on a Vulkan port of dhewm3. It's really early days since I just gotta rectangle with a uniform buffer working, it basically shows that we can actually do stuff with the renderer. The challenging part is going to hook up this backend with the rendering code and translating arb shaders to glsl/spirv but I'm willing to figure it out how it works.

Here's basically the code. Still WIP visually as well :)

You can toggle between Vulkan and OpenGl with r_renderApi cvar in dhewm.cfg file.

image

@warriormaster12
Copy link

@DanielGibson @MegaTKC

@DanielGibson
Copy link
Member

DanielGibson commented Oct 17, 2022

Interesting!
Please keep us posted on the progress :)

It's still unlikely that I'll merge this - even if I don't have to write a Vulkan backend myself, I don't want to maintain one either - but maybe we could move the renderers into DLLs (.so on Linux), like in Quake2, so the Vulkan renderer could be maintained and build independently of dhewm3, but still work by just putting ref_vk.dll next to dhewm3.exe and setting a CVar to select the render DLL to use (no idea how hard that would be with Doom3/dhewm3, haven't investigated it at all). Incidentally, that's exactly what we're doing in Yamagi Quake II (the Vulkan renderer is half-official and in a separate repo, and it's just another render DLL that can be selected at runtime).

Furthermore, if you implement translating OpenGL ARB shader code to GLSL that can be reused for other renderers that might be implemented in the future (maybe with BGFX or the SDL 3D API)

@warriormaster12
Copy link

For now my goal is just to glue the renderer back together which also means that I'm not going to do any arb glsl tranlation layers. Instead, I'm going to write them manually. Maybe once everything works we can think about shader translation.

I'll try to keep you posted on the progress.

@warriormaster12
Copy link

@DanielGibson
https://media.discordapp.net/attachments/1017487672052306040/1036718365126959206/unknown.png

A milestone has been reached. We can render objects from the game :D

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

No branches or pull requests

5 participants