Cxbx-reloaded: Vulkan HLE thoughts

Created on 14 May 2018  路  6Comments  路  Source: Cxbx-Reloaded/Cxbx-Reloaded

Since we're now using d3d8to9, that got me thinking:

On the one side, this project helps us (a little) to get our code base ported to Direct3D 9. (Still major work to do, but slowly we'll be getting there eventually)

But on the other hand, what can be done once, can be done repeatedly, and that is : use wrappers all the way up to vulkan

Here a blog post describing (part of) the setup needed for that : https://techtinker.blogspot.nl/2018/05/vk9-status-report-march.html?m=1

graphics informational

Most helpful comment

I'd say.

Stay on DX8 to DX9.

Look at Vulkan, if you can get things hooked up without a major rewrite and more like fix a few imports etc, (it might be because calling things wrong in one of the layers)

But don't aim for it really in HLE, more like an LLE aim.

All 6 comments

Doesn't appear to work out of the box.. (Going from D3D8 -> d3d8to9 -> VK9)
VK9 outputs a short log upon starting a game and then crashes:

[]: C9::GetAdapterCount is not implemented!
[]: RealInstance::RealInstance
[]: StateManager::CreateInstance vkCreateDevice failed with return code of VK_ERROR_EXTENSION_NOT_PRESENT

It appears the error has to do with the function that gets the graphics adapter count, sure enough if you open the Video Options menu in Cxbx it also will crash. So some more work may be required here.

Vulkan significant raises GPU requirements, so I am against making Vulkan primary GPU backend.

Personally, we should stay on DirectX9 goal. Since it is the minimal we need to support any non-xbox's gpu instructions. I'm sure any later DirectX versions doesn't have the xbox's instruction support anyway.

If we want to use Vulkan, all we have to do is copy a compiled dll/so wrapper, from dx9 to vulkan, into same folder where Cxbx-Reloaded executable is at. There's no reason to enforce others to upgrade their computer's OS and graphic cards in order to use Vulkan.

actually I am surprised vulkan hasn't been started sooner. From my understanding it is much lower level, allows running graphic code on the gpu and quite a but faster than dx... one could, in theory, take all the xbox functions and code them to be native in vulkan. no reason really they couldn't run concurrent as they do in others emulations out there such as dolphin.. let the user decide which API to use. It would require someone good at vulkan programming though as, from what I read, it is not for the faint of heart..lol Just my 2 cents...

I'd say.

Stay on DX8 to DX9.

Look at Vulkan, if you can get things hooked up without a major rewrite and more like fix a few imports etc, (it might be because calling things wrong in one of the layers)

But don't aim for it really in HLE, more like an LLE aim.

Yeah, the cost/benefit for this isn't worth it at the current moment in time, or even in the near future.
Implementing Vulkan for HLE will require a complete rewrite of the whole EmuD3D core.

Was this page helpful?
0 / 5 - 0 ratings