AI prompts
base on # NVRHI
[](https://github.com/NVIDIA-RTX/NVRHI/actions/workflows/build.yml)
## Introduction
NVRHI (**NV**IDIA **R**endering **H**ardware **I**nterface) is a library that implements a common abstraction layer over multiple graphics APIs (GAPIs): Direct3D 11, Direct3D 12, and Vulkan 1.2. It works on Windows (x64 only) and Linux (x64 and ARM64).
Key features:
- Automatic tracking of resource states and barrier placement (optional).
- Automatic tracking of resource usage and lifetime, deferred and safe resource destruction.
- Convenient and efficient resource binding model with little runtime overhead.
- Easy direct interaction with the underlying GAPI when necessary.
- Easy portability of the rendering code between the supported GAPIs.
- Hidden sub-allocation of upload buffers and versioning of constant buffers.
- Parallel command list recording and multi-queue rendering.
- Supports all types of pipelines: Graphics, Compute, Ray Tracing, and Meshlet.
- Validation layer and resource reflection for easy debugging.
NVRHI is used in several NVIDIA SDKs:
- [Adaptive and Variable-Rate Shading SDK](https://github.com/NVIDIAGameWorks/nas-sample)
- [Donut Framework](https://github.com/NVIDIA-RTX/Donut) and its [Samples](https://github.com/NVIDIA-RTX/Donut-Samples)
- [In-Game Inference (NVIGI) Sample](https://github.com/NVIDIA-RTX/NVIGI-3d-Sample)
- [Opacity Micro-Map SDK](https://github.com/NVIDIA-RTX/OMM)
- [RTX Character Rendering SDK](https://github.com/NVIDIA-RTX/RTXCR)
- [RTX Mega Geometry SDK](https://github.com/NVIDIA-RTX/RTXMG)
- [RTX Neural Shading SDK](https://github.com/NVIDIA-RTX/RTXNS)
- [RTX Neural Texture Compression SDK](https://github.com/NVIDIA-RTX/RTXNTC)
- [RTX Path Tracing SDK](https://github.com/NVIDIA-RTX/RTXPT)
- [RTX Texture Filtering SDK](https://github.com/NVIDIA-RTX/RTXTF)
- [RTX Texture Streaming SDK](https://github.com/NVIDIA-RTX/RTXTS)
- [RTXDI SDK](https://github.com/NVIDIA-RTX/RTXDI)
- [RTXGI SDK](https://github.com/NVIDIA-RTX/RTXGI)
Notable third-party projects using NVRHI:
- [RBDoom3-BFG](https://github.com/RobertBeckebans/RBDOOM-3-BFG)
Various early versions of NVRHI have been used in various projects created at NVIDIA, including:
- [Asteroids demo](https://developer.nvidia.com/blog/using-turing-mesh-shaders-nvidia-asteroids-demo)
- [DLSS SDK](https://developer.nvidia.com/dlss)
- [VRWorks](https://developer.nvidia.com/vrworks)
- [VXGI](https://developer.nvidia.com/vxgi)
- [WaveWorks](https://developer.nvidia.com/waveworks)
## Requirements
* Windows or Linux (x64 or ARM64)
* CMake 3.10
* A C++ 17 compiler (Visual Studio 2019, GCC 8 or Clang 6)
* Windows SDK version 10.0.22621.0 or later for DX12 support
## Building NVRHI
NVRHI can be configured to be used a set of static libraries in CMake-based projects, or as a single dynamic library.
To include NVRHI into a CMake project as static libraries:
1. Add this repository as a submodule.
2. Add a `add_subdirectory(nvrhi)` directive to the parent CMakeLists.txt.
3. Add dependencies to the necessary targets:
* `nvrhi` for the interface headers, common utilities, and validation;
* `nvrhi_d3d11` for DX11 (enabled when `NVRHI_WITH_DX11` is `ON`);
* `nvrhi_d3d12` for DX12 (enabled when `NVRHI_WITH_DX12` is `ON`); and
* `nvrhi_vk` for Vulkan (enabled when `NVRHI_WITH_VULKAN` is `ON`).
To build NVRHI as a shared library (DLL or .so):
1. Clone this repository recursively (including submodules).
2. Generate the project with CMake:
* Set the `NVRHI_BUILD_SHARED` variable to `ON`.
* Make sure to set the target platform to a 64-bit one. 32-bit builds are not supported.
3. Build and install as normal.
## Using NVRHI in Applications
See the [programming guide](doc/ProgrammingGuide.md) and the [tutorial](doc/Tutorial.md).
## NVAPI Support
NVRHI includes optional support for certain DX11 and DX12 extensions available through the NVAPI library. The library is not distributed with NVRHI but is available separately [here](https://developer.nvidia.com/nvapi).
To enable NVAPI support, extract the NVAPI SDK into the `nvapi` subfolder of your main project and set the `NVRHI_WITH_NVAPI` CMake variable to `ON`.
The following extensions are supported:
- Cluster Level Acceleration Structures (DX12)
- Linear Swept Spheres (DX12, Blackwell+)
- Opacity Micro-Maps (DX12, Ada+)
- Shader Execution Reordering on DX12 (DX12, Ada+)
- Single Pass Stereo (Pascal+)
- Fast Geometry Shader with optional coordinate swizzling (Maxwell+)
- Conservative Raster and other rasterizer features (Maxwell+)
- HLSL Extensions through a fake UAV slot (see [this blog post](https://developer.nvidia.com/unlocking-gpu-intrinsics-hlsl))
## RTXMU Integration
NVRHI includes an optional integration of the [RTXMU](https://github.com/NVIDIA-RTX/RTXMU) library. The library is included as a git submodule, and can be enabled with the `NVRHI_WITH_RTXMU` CMake variable.
When RTXMU integration is enabled, all bottom-level ray tracing acceleration structures (BLAS'es) are managed by that library. All built BLAS'es that have the `AllowCompaction` flag set are automatically compacted when `ICommandList::compactBottomLevelAccelStructs` method is called. No other configuration is necessary.
## License
NVRHI is licensed under the [MIT License](LICENSE.txt).", Assign "at most 3 tags" to the expected json: {"id":"13368","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"