Git Product home page Git Product logo

Comments (13)

vertver avatar vertver commented on June 12, 2024 1

It seems like all currently existing d3d12_feature_data_d3d12_options have to be present and options8 and up are Windows 11 only it seems.

I have already fixed this in my PR. It looks like you don't have the Agility SDK installed, so it just doesn't know about the new D3D12 feature options.

from nri.

pollend avatar pollend commented on June 12, 2024 1

I don't really have an immediate problem with this at the moment. I guess its better not to clutter the API.

from nri.

dzhdanNV avatar dzhdanNV commented on June 12, 2024

I'm happy to help. But, please, explain a bit more your request. Something like:

  • currently we have "this"
  • but I would like to get something like "that", because...
  • to achieve this I need to extend NriDeviceCreationDesc (or more) and expose ...

from nri.

Nielsbishere avatar Nielsbishere commented on June 12, 2024

@dzhdanNV I'd like to expand on what he might mean, because we're having a similar issue. Currently when we create NRI, it will assume all features are used. This basically results in querying all DirectX12 features, which fails when older windows versions are used (Windows 10 for example). It seems like all currently existing d3d12_feature_data_d3d12_options have to be present and options8 and up are Windows 11 only it seems. This means that dependencies such as NRD would get this requirement too if updated and that's not very desired, as that'd restrict usage for products as lots of customers still use Windows 10 (even I haven't switched yet, only on my other PC).

from nri.

vertver avatar vertver commented on June 12, 2024

Fixed in #33

from nri.

pollend avatar pollend commented on June 12, 2024

I just wanted a way to disable raytracing, mesh shaders, and a couple other extensions. The default API checks what is available for the GPU and enables all of these? At the moment I'm just using the other API where it takes in a custom device. nriCreateDeviceFromVkDevice. umm, I guess if you need more control this is better but I would just like to init nri without having to opt into all these extensions since I'm porting this into an older game where none of these extensions are relevant.

from nri.

vertver avatar vertver commented on June 12, 2024

The default API checks what is available for the GPU and enables all of these?

What do you mean by "enables"? If you are talking about extensions on Vulkan, an extension is only enabled if it is available on your GPU. In D3D12 there is thing called "feature data" which does not affect the feature set of the device, all features are enabled by default if your GPU supports them. In Vulkan, however, you need to add an extension string to enable them when you create a device.

from nri.

dzhdanNV avatar dzhdanNV commented on June 12, 2024

Fixed in #33

To avoid mixing apples and oranges I will comment on D3D12 topic in the PR.

@pollend A few questions about your problem - is it a:

  • compilation problem?
  • "I can't run" problem?

Fancy VK exts get enabled only if available, but for compilation, yes, you need to have most recent VK SDK.

from nri.

dzhdanNV avatar dzhdanNV commented on June 12, 2024

@pollend another question - are you "creating" device or "wrapping" it via nriCreateDeviceFromVkDevice? Please, clarify the symptoms of the outcome (can't compile, can't run, validation error, crash...).

from nri.

pollend avatar pollend commented on June 12, 2024

I ended up using nriCreateDeviceFromVkDevice to just enable vulkan with the minimum set of extensions I would need. not sure if its worth having flags to disable extensions.

in DeviceVK under CreateLogicalDevice; if the extension is supported then its added CreateDevice. If I'm never using VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME would it make sense to have flags to opt out raytracing if I'm not currenting using the feature under DeviceVK? does it even matter if I would want to opt out of extensions?

from nri.

dzhdanNV avatar dzhdanNV commented on June 12, 2024

In DeviceVK under CreateLogicalDevice; if the extension is supported then its added CreateDevice. If I'm never using VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME would it make sense to have flags to opt out raytracing if I'm not currenting using the feature under DeviceVK?

I believe this is free. VK is super strict, but I just don't see any overhead on the driver side if RT is enabled but never used. Let me ask ;)

from nri.

dzhdanNV avatar dzhdanNV commented on June 12, 2024

@pollend The next release will get DeviceCreationDesc::vkDisableRayTracing, as it turned out:

Testing bench:
App creates 3 windows:
2 - on RTX 4080
1 - on Intel UHD graphics
Rendering is very simple: clear + UI rendering
A breakpoint is set at the very beginning of the 1st frame

Below is memory usage of the entire process if all windows use same GAPI:
D3D11                - 34 Mb
D3D11 (+debug layer) - 34 Mb
D3D12                - 66 Mb
D3D12 (+debug layer) - 81 Mb
VK                   - 159 Mb
VK (+validation)     - 203 Mb

If RT extensions are disabled in VK, the memory usage matches D3D12, i.e. 66 Mb. So, it's worth pursuing. Thanks for bringing it up!

from nri.

Nielsbishere avatar Nielsbishere commented on June 12, 2024

@vertver good stuff

from nri.

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.