Code Monkey home page Code Monkey logo

Comments (7)

ROCKNROLLKID avatar ROCKNROLLKID commented on July 16, 2024

#749

from rbdoom-3-bfg.

SRSaunders avatar SRSaunders commented on July 16, 2024

I have prototyped the merge, and found a few things:

  1. The vulkan.hpp thing was easy to fix, but I had to be careful with VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1
  2. I didn't face any issues with FrameBufferInfoEx
  3. The new shader build system was the majority of the work: CMakeLists changes, RenderProgs_NVRHI changes, compileshaders.cmake changes (lots of iterations to get this right since some defaults have changed for Vulkan), shaders.cfg changes (shader model moved out to compiler options now), plus a few macOS-specific type, build and parallel compilation issues (had to port my previous PRs into the new stream, will likely offer these upstream with a PR).

I'm not sure if the new shader build system (ShaderMake) is any better than the previous one integrated with nvrhi. It seems like a sideways move with some changes providing less flexibility (e.g. fixed compiler options vs. pass-through to DXC which was more flexible before, and a less-complete shader blob library). However, I suspect nVidia sees a benefit for this to be separate. Just more work on the user side now.

It's up and working now against the current master of RBDoom3BFG (including MoltenVK/macOS). @RobertBeckebans I could contribute some of this if you are interested. Let me know.

from rbdoom-3-bfg.

RobertBeckebans avatar RobertBeckebans commented on July 16, 2024

@SRSaunders does the new NVRHI version have any impact on the performance? I think there is a general flaw in the Vulkan implementation of NVRHI which affects the performance. If you can wrap together your changes for a PR then I would be happy to look at it. ShaderMake was introduced 1 month before I wanted the feature freeze for RBDoom 1.5 so we went out of time to integrate it and seeing if it makes any trouble.

from rbdoom-3-bfg.

SRSaunders avatar SRSaunders commented on July 16, 2024

I can do some benchmarking this weekend and report back.

Regarding contributions, I can provide the RBDoom3BFG changes in a PR. However, It might be best if you would fast-forward your nvrhi fork yourself plus open a new fork for ShaderMake. I could then add fixes on those, as well as pushing them upstream.

The nvrhi merge itself was pretty easy. I just had to resolve one conflict to preserve some work from Stephen Pridham.

I have not merged any new stuff from Donut’s DeviceManager. I’m not sure if that’s important or even desirable at this point if you are happy with vulkan 1.2.

from rbdoom-3-bfg.

RobertBeckebans avatar RobertBeckebans commented on July 16, 2024

I looked into this today for several hours. I'm not really sure if I like the split of ShaderMake into another external repo and that it requires Vulkan 1.3 which might break it for some users and especially Linux users who just apt get Vulkan headers on older systems like I do. It seems that the new NVRHI version only adds minor bugfixes and some Nvidia specific Raytracing extensions.

from rbdoom-3-bfg.

SRSaunders avatar SRSaunders commented on July 16, 2024

A couple of things I have found:

  1. The split was a bit of a pain, but not that bad once you see the implementation.
  2. ShaderMake does not require Vulkan 1.3 - that is only the default. I have set the implementation to 1.2 but with ShaderModel 6.0, which is the minimum for DXC anyways. Note that DXC was already silently moving the 5.0 setting to 6.0 before these changes. It's just that we couldn't see it due to suppressed messages from the compiler.
  3. Performance of the updated nvrhi does look the same. No major changes on that front.

The reason I have delayed pushing the PR until today was:

  1. I ran into a dependency on the Windows side where ShaderMake requires a minimum Windows SDK version 2104 (10.0.20348.0). Fortunately this is available for Windows 10 at https://go.microsoft.com/fwlink/?linkid=2164145.
  2. I ran into another issue on the Linux side where Vulkan-Headers are installed at a system level by package managers and conflict with the Vulkan-Headers included with nvrhi. This issue shows up as build failures when precompiled headers are enabled for linux. I had to juggle things a bit to limit where <vulkan/vulkan.hpp> was included and change a few vk:: namespace references, but it is all working fine now on Windows, Linux, and macOS. While only a linux issue, it forced me to look closer at the #includes and the implementation is probably more robust now.

I will push a PR later today so you can look at it and decide the path forward.

from rbdoom-3-bfg.

RobertBeckebans avatar RobertBeckebans commented on July 16, 2024

NVRHI is update to date to the newest version now.

from rbdoom-3-bfg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.